Futures Market
Documentation on interacting with Mexc's Futures Market API functions through the PENDAX Javascript SDK.
Get the server time
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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
Please refer to the official Mexc API Docs for the Required parameters.
https://mxcdevelop.github.io/apidocs/contract_v1_en/#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"
});
Last updated