Get all informations of user's asset
Function Name:
getUserAssetInfoFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getUserAssetInfoFutures(exchange, options) {
try {
let result = await exchange.getUserAssetInfoFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getUserAssetInfoFutures(myMexcExchanges);
Get the user's single currency asset information
Function Name:
getUserSingleCurrencyAssetInfoFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getUserSingleCurrencyAssetInfoFutures(exchange, options) {
try {
let result = await exchange.getUserSingleCurrencyAssetInfoFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getUserSingleCurrencyAssetInfoFutures(myMexcExchanges,
{
currency: "USDT"
});
Get the user's asset transfer records
Function Name:
getUserAssetTransferRecordsFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getUserAssetTransferRecordsFutures(exchange, options) {
try {
let result = await exchange.getUserAssetTransferRecordsFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getUserAssetTransferRecordsFutures(myMexcExchanges,
{
page_size: "10",
currency: "USDT"
});
Get the user’s history position information
Function Name:
getHistoryPositionInformationFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getHistoryPositionInformationFutures(exchange, options) {
try {
let result = await exchange.getHistoryPositionInformationFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getHistoryPositionInformationFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get the user's current holding position
Function Name:
getCurrentHoldingPositionFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getCurrentHoldingPositionFutures(exchange, options) {
try {
let result = await exchange.getCurrentHoldingPositionFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getCurrentHoldingPositionFutures(myMexcExchanges);
Get details of user‘s funding rate
Function Name:
getUserFundingRateDetails()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getUserFundingRateDetails(exchange, options) {
try {
let result = await exchange.getUserFundingRateDetails(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getUserFundingRateDetails(myMexcExchanges);
Get the user's current pending order
Function Name:
getUserCurrentPendingOrderFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getUserCurrentPendingOrderFutures(exchange, options) {
try {
let result = await exchange.getUserCurrentPendingOrderFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getUserCurrentPendingOrderFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get all of the user's historical orders
Function Name:
getAllUserHistoricalOrdersFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getAllUserHistoricalOrdersFutures(exchange, options) {
try {
let result = await exchange.getAllUserHistoricalOrdersFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getAllUserHistoricalOrdersFutures(myMexcExchanges);
Query the order based on the external number
Function Name:
getOrderByExternalNumberFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getOrderByExternalNumberFutures(exchange, options) {
try {
let result = await exchange.getOrderByExternalNumberFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getOrderByExternalNumberFutures(myMexcExchanges,
{
symbol: "ETH_USDT",
external_oid: "_m_f95eb99b061d4eef8f64a04e9ac4dad3"
});
Query the order based on the order number
Function Name:
getOrderByOrderNumberFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getOrderByOrderNumberFutures(exchange, options) {
try {
let result = await exchange.getOrderByOrderNumberFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getOrderByOrderNumberFutures(myMexcExchanges,
{
order_id: "102015012431820288"
});
Get order transaction details based on the order ID
Function Name:
getOrderTransactionDetailsByOIDFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getOrderTransactionDetailsByOIDFutures(exchange, options) {
try {
let result = await exchange.getOrderTransactionDetailsByOIDFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getOrderTransactionDetailsByOIDFutures(myMexcExchanges,
{
order_id: "102015012431820288"
});
Get all transaction details of the user’s order
Function Name:
getAllTranscationDetailsUserOrderFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getAllTranscationDetailsUserOrderFutures(exchange, options) {
try {
let result = await exchange.getAllTranscationDetailsUserOrderFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getAllTranscationDetailsUserOrderFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Gets the trigger order list
Function Name:
getTriggerOrderListFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getTriggerOrderListFutures(exchange, options) {
try {
let result = await exchange.getTriggerOrderListFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getTriggerOrderListFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get the Stop-Limit order list
Function Name:
getStopLimitOrderListFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getStopLimitOrderListFutures(exchange, options) {
try {
let result = await exchange.getStopLimitOrderListFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getStopLimitOrderListFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get risk limits
Function Name:
getRiskLimitsFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getRiskLimitsFutures(exchange, options) {
try {
let result = await exchange.getRiskLimitsFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getRiskLimitsFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Increase or decrease margin
Function Name:
changeMarginFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function changeMarginFutures(exchange, options) {
try {
let result = await exchange.changeMarginFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await changeMarginFutures(myMexcExchanges,
{
positionId: "134321",
amount: "1",
type: "ADD"
});
Get leverage
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getLeverageFutures(exchange, options) {
try {
let result = await exchange.getLeverageFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getLeverageFutures(myMexcExchanges,
{
symbol: "MX_USDT"
});
Get position mode
Function Name:
getPositionModeFutures()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getPositionModeFutures(exchange, options) {
try {
let result = await exchange.getPositionModeFutures(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getPositionModeFutures(myMexcExchanges);