Trade order
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function placeTradeOrderCM(exchange, options) {
try {
let result = await exchange.placeTradeOrderCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await placeTradeOrderCM(myBingxExchange, {
symbol: "<string>",
type: "<string>",
side: "<string>"
});
Query Trade Commission Rate
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getComissionRateCM(exchange, options) {
try {
let result = await exchange.getComissionRateCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getComissionRateCM(myBingxExchange);
Query Leverage
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getLeverageCM(exchange, options) {
try {
let result = await exchange.getLeverageCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getLeverageCM(myBingxExchange);
Modify Leverage
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function modifyLeverageCM(exchange, options) {
try {
let result = await exchange.modifyLeverageCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await modifyLeverageCM(myBingxExchange);
Cancel all orders
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function cancelAllOrdersCM(exchange, options) {
try {
let result = await exchange.cancelAllOrdersCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await cancelAllOrdersCM(myBingxExchange);
Close all positions in bulk
Function Name:
closeAllPositionsInBulkCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function closeAllPositionsInBulkCM(exchange, options) {
try {
let result = await exchange.closeAllPositionsInBulkCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await closeAllPositionsInBulkCM(myBingxExchange);
Query warehouse
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getWarehouseCM(exchange, options) {
try {
let result = await exchange.getWarehouseCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getWarehouseCM(myBingxExchange);
Query Account Assets
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getAccountAssetsCM(exchange, options) {
try {
let result = await exchange.getAccountAssetsCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getAccountAssetsCM(myBingxExchange);
Query force orders
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getForceOrdersCM(exchange, options) {
try {
let result = await exchange.getForceOrdersCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getForceOrdersCM(myBingxExchange);
Query Order Trade Detail
Function Name:
getOrderTradeDetailCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getOrderTradeDetailCM(exchange, options) {
try {
let result = await exchange.getOrderTradeDetailCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getOrderTradeDetailCM(myBingxExchange);
Cancel an Order
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function cancelOrderCM(exchange, options) {
try {
let result = await exchange.cancelOrderCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await cancelOrderCM(myBingxExchange, {
symbol: "<string>"
});
Query all current pending orders
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getPendingOrdersCM(exchange, options) {
try {
let result = await exchange.getPendingOrdersCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getPendingOrdersCM(myBingxExchange);
Query Order
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getOrderCM(exchange, options) {
try {
let result = await exchange.getOrderCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getOrderCM(myBingxExchange, {
symbol: "<string>"
});
" Users History Orders "
Function Name:
getUsersHistoryOrdersCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getUsersHistoryOrdersCM(exchange, options) {
try {
let result = await exchange.getUsersHistoryOrdersCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getUsersHistoryOrdersCM(myBingxExchange, {
limit: "<int>"
});
Query Margin Type
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function getMarginTypeCM(exchange, options) {
try {
let result = await exchange.getMarginTypeCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getMarginTypeCM(myBingxExchange, {
symbol: "<string>"
});
Set Margin Type
Function Name:
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function setMarginTypeCM(exchange, options) {
try {
let result = await exchange.setMarginTypeCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await setMarginTypeCM(myBingxExchange, {
symbol: "<string>",
marginType: "<string>"
});
Adjust Isolated Margin
Function Name:
adjustIsolatedMarginCM()
Usage:
import { createExchange } from "./exchanges/exchange.js";
let myBingxExchange = createExchange({
exchange: "bingx",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "bingx"
});
async function adjustIsolatedMarginCM(exchange, options) {
try {
let result = await exchange.adjustIsolatedMarginCM(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await adjustIsolatedMarginCM(myBingxExchange, {
symbol: "<string>",
amount: "<float64>",
type: "<int>",
positionSide: "<string>"
});