Market Data (Coin-M)
Contract Information
Please refer to the official BingX API Docs for the Required parameters.
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract+Information
Function Name:
getContractInfoCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "false",
label: "bingx"
});
async function getContractInfoCM(exchange, options) {
try {
let result = await exchange.getContractInfoCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getContractInfoCM(myBingxExchange);
Price & Current Funding Rate
Please refer to the official BingX API Docs for the Required parameters.
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price+&+Current+Funding+Rate
Function Name:
getPriceAndCurrentFundingRateCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "false",
label: "bingx"
});
async function getPriceAndCurrentFundingRateCM(exchange, options) {
try {
let result = await exchange.getPriceAndCurrentFundingRateCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getPriceAndCurrentFundingRateCM(myBingxExchange);
Get Swap Open Positions
Please refer to the official BingX API Docs for the Required parameters.
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get+Swap+Open+Positions
Function Name:
getSwapOpenPositionsCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "false",
label: "bingx"
});
async function getSwapOpenPositionsCM(exchange, options) {
try {
let result = await exchange.getSwapOpenPositionsCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getSwapOpenPositionsCM(myBingxExchange);
Get K-line Data
Please refer to the official BingX API Docs for the Required parameters.
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get+K-line+Data
Function Name:
getKlineCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "false",
label: "bingx"
});
async function getKlineCM(exchange, options) {
try {
let result = await exchange.getKlineCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getKlineCM(myBingxExchange, {
symbol: "<string>",
interval: "<string>"
});
Query Depth Data
Please refer to the official BingX API Docs for the Required parameters.
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query+Depth+Data
Function Name:
getDepthCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "false",
label: "bingx"
});
async function getDepthCM(exchange, options) {
try {
let result = await exchange.getDepthCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getDepthCM(myBingxExchange, {
symbol: "<string>"
});
Query 24-Hour Price Change
Please refer to the official BingX API Docs for the Required parameters.
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query+24-Hour+Price+Change
Function Name:
get24HrPriceChangeCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "false",
label: "bingx"
});
async function get24HrPriceChangeCM(exchange, options) {
try {
let result = await exchange.get24HrPriceChangeCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await get24HrPriceChangeCM(myBingxExchange);
Last updated