Get the server time
Function Name:
getServerTimeFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getServerTimeFutures(exchange, options) {
try {
let result = await exchange.getServerTimeFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getServerTimeFutures(myMexcExchanges);
Get the contract information
Function Name:
getContractDetailFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractDetailFutures(exchange, options) {
try {
let result = await exchange.getContractDetailFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractDetailFutures(myMexcExchanges);
Get the transferable currencies
Function Name:
getTransferableCurrenciesFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getTransferableCurrenciesFutures(exchange, options) {
try {
let result = await exchange.getTransferableCurrenciesFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getTransferableCurrenciesFutures(myMexcExchanges);
Get a snapshot of the latest N depth information of the contract
Function Name:
getContractNDepthInfoFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractNDepthInfoFutures(exchange, options) {
try {
let result = await exchange.getContractNDepthInfoFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractNDepthInfoFutures(myMexcExchanges,
{
symbol: "MX_USDT",
limit: "20"
});
Get contract fair price
Function Name:
getContractFairPriceFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractFairPriceFutures(exchange, options) {
try {
let result = await exchange.getContractFairPriceFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractFairPriceFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get contract funding rate
Function Name:
getContractFundingRateFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractFundingRateFutures(exchange, options) {
try {
let result = await exchange.getContractFundingRateFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractFundingRateFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
K-line data
Function Name:
getContractKlineFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractKlineFutures(exchange, options) {
try {
let result = await exchange.getContractKlineFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractKlineFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get K-line data of the index price
Function Name:
getContractIndexPriceKlineFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractIndexPriceKlineFutures(exchange, options) {
try {
let result = await exchange.getContractIndexPriceKlineFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractIndexPriceKlineFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get K-line data of the fair price
Function Name:
getContractFairPriceKlineFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractFairPriceKlineFutures(exchange, options) {
try {
let result = await exchange.getContractFairPriceKlineFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractFairPriceKlineFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get contract transaction data
Function Name:
getContractTransactionDataFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractTransactionDataFutures(exchange, options) {
try {
let result = await exchange.getContractTransactionDataFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractTransactionDataFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get contract trend data
Function Name:
getContractTrendDataFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractTrendDataFutures(exchange, options) {
try {
let result = await exchange.getContractTrendDataFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractTrendDataFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get all contract risk fund balance
Function Name:
getAllContractRiskFundBalanceFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getAllContractRiskFundBalanceFutures(exchange, options) {
try {
let result = await exchange.getAllContractRiskFundBalanceFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getAllContractRiskFundBalanceFutures(myMexcExchanges);
Get contract risk fund balance history
Function Name:
getContractRiskFundBalanceHistoryFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractRiskFundBalanceHistoryFutures(exchange, options) {
try {
let result = await exchange.getContractRiskFundBalanceHistoryFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractRiskFundBalanceHistoryFutures(myMexcExchanges,
{
symbol: "MX_USDT",
page_num: "1",
page_size: "20"
});
Get contract funding rate history
Function Name:
getContractFundingRateHistoryFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getContractFundingRateHistoryFutures(exchange, options) {
try {
let result = await exchange.getContractFundingRateHistoryFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractFundingRateHistoryFutures(myMexcExchanges,
{
symbol: "MX_USDT",
page_num: "1",
page_size: "20"
});