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
  • Contract Information
  • Price & Current Funding Rate
  • Get Swap Open Positions
  • Get K-line Data
  • Query Depth Data
  • Query 24-Hour Price Change
  1. PENDAX
  2. Using PENDAX SDK
  3. BingX Functions

Market Data (Coin-M)

PreviousTrades (USDT-M)NextTrades (Coin-M)

Last updated 7 months ago

Contract Information

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

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.

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.

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.

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.

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.

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);

⚫
💡
💻
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract+Information
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price+&+Current+Funding+Rate
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get+Swap+Open+Positions
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get+K-line+Data
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query+Depth+Data
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query+24-Hour+Price+Change