Compendium Trading Tools Documentation
CompendiumPENDAXCompendexOfficial Links
  • ⭐Platform Overview
  • ⚫PENDAX
    • 🌐What is PENDAX?
    • 🖱️PENDAX Capabilities
    • 💾Installing PENDAX modules
    • 💡Using PENDAX SDK
      • 💻Common Functions
      • 💻OKX Functions
        • Trading & Orders
        • Funding
        • Convert
        • Account & Subaccount
        • Grid Trading
        • Market Data
        • Public Data
        • Trading Data
      • 💻Bitget Functions
        • Public (Spot)
        • Market (Spot)
        • Wallet (Spot)
        • Account (Spot)
        • Trade (Spot)
        • Market (Futures)
        • Account (Futures)
        • Trade (Futures)
        • CopyTrade (Futures)
        • Sub Account Interface (Broker)
        • Sub API Interface (Broker)
      • 💻ByBit Functions
        • Market
        • Trading
        • Position
        • Account
        • Asset
        • User
        • Spot Leverage Token
        • Spot Margin Trade (UTA)
        • Spot Margin Trade (Normal)
        • Institutional Lending
      • 💻Mexc Functions
        • Market
        • Sub-Account
        • Spot Account/Trade
        • Wallet
        • ETF
        • Rebate
        • Futures Market
        • Futures Account and Trading
      • 💻Phemex Functions
        • Contract
        • Hedged Contract
        • Spot
        • Margin Trading
        • Transfer
        • Convert
        • Deposit And Withdraw
      • 💻BloFin Functions
        • Websocket
        • Account
        • Affiliate
        • Public Data
        • Trading
        • User
      • 💻BingX Functions
        • Fund Account
        • Wallet Deposits and Withdrawals
        • Sub-Account Managenent
        • Market Data (USDT-M)
        • Account (USDT-M)
        • Trades (USDT-M)
        • Market Data (Coin-M)
        • Trades (Coin-M)
        • Market Data (Spot)
        • Fund Account (Spot)
        • Trades (Spot)
        • CopyTrader
      • ⚠️FTX Functions
    • 📜License Agreement
  • 🟣Compendium App
    • 📈Compendium Trading Tools
    • 🔗Connect An Exchange Account
      • 🗝️OKX.com API Keys
    • 🤖Verified Trading Bots
      • Explore The Marketplace
      • For Algo & Strategy Authors
        • Get Listed & Verified
        • Strategy Monetization
        • Sending Trading Signals
        • Simplified Signal Program
      • For Users & Subscribers
        • Subscribing To Bots
        • Managing A Subscription
    • 💫Copy Trading Groups
      • For Copy Group Leaders
        • Creating A Copy Group
        • Linking Leader Account
        • Important Trading Notes
        • Manage A Copy Group
        • Discord Webhooks Setup
      • For Users & Subscribers
        • Subscribe To Copy Group
        • Link Account To Group
    • 📶Signal Provider Groups
      • For Group Leaders
        • Creating A Signal Group
        • Managing A Signal Group
        • Sending Trading Signals
      • For Users & Subscribers
        • Subscribing To Signal Groups
        • Manage Signal Group Subscription
  • 🔵Compendex Suite
    • 🔮DeFi With Compendex
    • ☀️Solana Integrations
      • Supported Solana Wallets
      • Overview And News
      • Openbook Spot Markets
      • Smart Swap Aggregator
      • NFT Metaverse Markets
      • Solana DeFi Analytics Portal
      • Community Tools List
  • 🪙The CMFI Token Ecosystem
    • 📊Tokenomics Breakdown
    • 🍎Trade Incentive Program
    • 🌊Staking And Liquidity Pools
      • ✨Raydium Liquidity Pools
      • 🐳Orca Liquidity Whirlpools
      • 🐋Orca Liquidity Pools
    • 🐷Compendi-Pigs NFT
  • 👥Community Info
    • ✅Links And Social Pages
    • 🎨Branding Guidelines
Powered by GitBook
On this page
  • Place order
  • Place multiple orders
  • Cancel Order
  • Cancel multiple orders
  • Cancel all Open Orders on a Symbol
  • Cancel an Existing Order and Send a New Orde
  • Query Order details
  • Current Open Orders
  • Query Order history
  • Query transaction details
  • Query Trading Commission Rate
  • Cancel All After
  1. PENDAX
  2. Using PENDAX SDK
  3. BingX Functions

Trades (Spot)

PreviousFund Account (Spot)NextCopyTrader

Last updated 7 months ago

Place order

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

placeOrderSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function placeOrderSpot(exchange, options) {
    try {
        let result = await exchange.placeOrderSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await placeOrderSpot(myBingxExchange, {
	symbol: "<string>",
	side: "<string>",
	type: "<string>"
});

Place multiple orders

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

placeBatchOrderSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function placeBatchOrderSpot(exchange, options) {
    try {
        let result = await exchange.placeBatchOrderSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await placeBatchOrderSpot(myBingxExchange);

Cancel Order

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

cancelOrderSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function cancelOrderSpot(exchange, options) {
    try {
        let result = await exchange.cancelOrderSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await cancelOrderSpot(myBingxExchange, {
	symbol: "<string>"
});

Cancel multiple orders

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

batchCancelOrderSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function batchCancelOrderSpot(exchange, options) {
    try {
        let result = await exchange.batchCancelOrderSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await batchCancelOrderSpot(myBingxExchange, {
	symbol: "<string>",
	orderIds: "<string>"
});

Cancel all Open Orders on a Symbol

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

cancelAllSymbolOrdersSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function cancelAllSymbolOrdersSpot(exchange, options) {
    try {
        let result = await exchange.cancelAllSymbolOrdersSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await cancelAllSymbolOrdersSpot(myBingxExchange);

Cancel an Existing Order and Send a New Orde

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

cancelOrderAndPlaceOrderSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function cancelOrderAndPlaceOrderSpot(exchange, options) {
    try {
        let result = await exchange.cancelOrderAndPlaceOrderSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await cancelOrderAndPlaceOrderSpot(myBingxExchange, {
	symbol: "<string>",
	CancelReplaceMode: "<string>",
	side: "<string>",
	type: "<string>",
	stopPrice: "<string>"
});

Query Order details

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

getOrderDetailsSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getOrderDetailsSpot(exchange, options) {
    try {
        let result = await exchange.getOrderDetailsSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getOrderDetailsSpot(myBingxExchange, {
	symbol: "<string>"
});

Current Open Orders

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

getOpenOrdersSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getOpenOrdersSpot(exchange, options) {
    try {
        let result = await exchange.getOpenOrdersSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getOpenOrdersSpot(myBingxExchange);

Query Order history

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

getOrderHistorySpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getOrderHistorySpot(exchange, options) {
    try {
        let result = await exchange.getOrderHistorySpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getOrderHistorySpot(myBingxExchange);

Query transaction details

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

getTransactionDetailsSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getTransactionDetailsSpot(exchange, options) {
    try {
        let result = await exchange.getTransactionDetailsSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getTransactionDetailsSpot(myBingxExchange, {
	orderId: "<long>"
});

Query Trading Commission Rate

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

getTradingCommissionRateSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getTradingCommissionRateSpot(exchange, options) {
    try {
        let result = await exchange.getTradingCommissionRateSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getTradingCommissionRateSpot(myBingxExchange);

Cancel All After

Please refer to the official BingX API Docs for the Required parameters.

Function Name:

cancelAllAfterSpot()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function cancelAllAfterSpot(exchange, options) {
    try {
        let result = await exchange.cancelAllAfterSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await cancelAllAfterSpot(myBingxExchange);

⚫
💡
💻
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Place+order
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Place+multiple+orders
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel+Order
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel+multiple+orders
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel+all+Open+Orders+on+a+Symbol
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel+an+Existing+Order+and+Send+a+New+Orde
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query+Order+details
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Current+Open+Orders
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query+Order+history
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query+transaction+details
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query+Trading+Commission+Rate
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel+All+After