bingx
bingx cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
bingx
Kind: global class
Extends: Exchange
- fetchTime
- fetchCurrencies
- fetchMarkets
- fetchOHLCV
- fetchTrades
- fetchOrderBook
- fetchFundingRate
- fetchFundingRates
- fetchFundingRateHistory
- fetchFundingHistory
- fetchOpenInterest
- fetchTicker
- fetchTickers
- fetchMarkPrice
- fetchMarkPrices
- fetchBalance
- fetchPositionHistory
- fetchPositions
- fetchPosition
- createMarketOrderWithCost
- createMarketBuyOrderWithCost
- createMarketSellOrderWithCost
- createOrder
- createOrders
- cancelOrder
- cancelAllOrders
- cancelOrders
- cancelAllOrdersAfter
- fetchOrder
- fetchOrders
- fetchOpenOrders
- fetchClosedOrders
- fetchCanceledOrders
- fetchCanceledAndClosedOrders
- transfer
- fetchTransfers
- fetchDepositAddressesByNetwork
- fetchDepositAddress
- fetchDeposits
- fetchWithdrawals
- setMarginMode
- setMargin
- fetchLeverage
- setLeverage
- fetchMyTrades
- fetchDepositWithdrawFees
- withdraw
- fetchMyLiquidations
- closePosition
- fetchPositionMode
- setPositionMode
- editOrder
- fetchMarginMode
- fetchTradingFee
- fetchMarketLeverageTiers
- watchTicker
- unWatchTicker
- watchTrades
- unWatchTrades
- watchOrderBook
- unWatchOrderBook
- watchOHLCV
- unWatchOHLCV
- watchOrders
- watchMyTrades
- watchBalance
- watchPositions
fetchTime
fetches the current integer timestamp in milliseconds from the bingx server
Kind: instance method of bingx
Returns: int - the current integer timestamp in milliseconds from the bingx server
See: https://bingx-api.github.io/docs/#/swapV2/base-info.html#Get%20Server%20Time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchTime (params?)fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of bingx
Returns: object - an associative dictionary of currencies
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchCurrencies (params?)fetchMarkets
retrieves data on all markets for bingx
Kind: instance method of bingx
Returns: Array<object> - an array of objects representing market data
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Spot%20trading%20symbols
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/USDT-M%20Perp%20Futures%20symbols
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Contract%20Information
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchMarkets (params?)fetchOHLCV
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bingx
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Kline%2FCandlestick%20Data
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Kline%2FCandlestick%20Data
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20Kline%2FCandlestick%20Data
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Get%20K-line%20Data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest candle to fetch |
| params.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bingx.fetchOHLCV (symbol, timeframe, since?, limit?, params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of bingx
Returns: Array<object> - a list of trade structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Recent%20Trades%20List
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Recent%20Trades%20List
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| since | int | No | timestamp in ms of the earliest trade to fetch |
| limit | int | No | the maximum amount of trades to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchTrades (symbol, since?, limit?, params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of bingx
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Order%20Book
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Order%20Book
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Query%20Depth%20Data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchOrderBook (symbol, limit?, params?)fetchFundingRate
fetch the current funding rate
Kind: instance method of bingx
Returns: object - a funding rate structure
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchFundingRate (symbol, params?)fetchFundingRates
fetch the current funding rate for multiple symbols
Kind: instance method of bingx
Returns: Array<object> - a list of funding rate structures
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.subType | string | No | "linear" or "inverse" (default is linear) |
bingx.fetchFundingRates (symbols?, params?)fetchFundingRateHistory
fetches historical funding rate prices
Kind: instance method of bingx
Returns: Array<object> - a list of funding rate structures
See: https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Get%20Funding%20Rate%20History
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the funding rate history for |
| since | int | No | timestamp in ms of the earliest funding rate to fetch |
| limit | int | No | the maximum amount of funding rate structures to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest funding rate to fetch |
| params.paginate | boolean | No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bingx.fetchFundingRateHistory (symbol, since?, limit?, params?)fetchFundingHistory
fetches historical funding received
Kind: instance method of bingx
Returns: Array<object> - a list of funding history structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the funding history for |
| since | int | No | timestamp in ms of the earliest funding to fetch |
| limit | int | No | the maximum amount of funding history structures to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest funding to fetch |
bingx.fetchFundingHistory (symbol, since?, limit?, params?)fetchOpenInterest
retrieves the open interest of a trading pair
Kind: instance method of bingx
Returns: object - an open interest structure/docs/manual#open-interest-structure
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Open%20Interest%20Statistics
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Get%20Swap%20Open%20Positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified CCXT market symbol |
| params | object | No | exchange specific parameters |
bingx.fetchOpenInterest (symbol, params?)fetchTicker
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of bingx
Returns: object - a ticker structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Query%2024-Hour%20Price%20Change
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchTicker (symbol, params?)fetchTickers
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of bingx
Returns: object - a dictionary of ticker structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Query%2024-Hour%20Price%20Change
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchTickers (symbols, params?)fetchMarkPrice
fetches mark prices for the market
Kind: instance method of bingx
Returns: object - a dictionary of ticker structures
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchMarkPrice (symbol, params?)fetchMarkPrices
fetches mark prices for multiple markets
Kind: instance method of bingx
Returns: object - a dictionary of ticker structures
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchMarkPrices (symbols?, params?)fetchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of bingx
Returns: object - a balance structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Account%20Endpoints/Query%20Assets
- https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20account%20data
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Account%20Assets
- https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Fund%20Account/Query%20Assets
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.standard | boolean | No | whether to fetch standard contract balances |
| params.type | string | No | the type of balance to fetch (spot, swap, funding) default is spot |
bingx.fetchBalance (params?)fetchPositionHistory
fetches historical positions
Kind: instance method of bingx
Returns: Array<object> - a list of position structures
See: https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Position%20History
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified contract symbol |
| since | int | No | the earliest time in ms to fetch positions for |
| limit | int | No | the maximum amount of records to fetch |
| params | object | No | extra parameters specific to the exchange api endpoint |
| params.until | int | No | the latest time in ms to fetch positions for |
bingx.fetchPositionHistory (symbol, since?, limit?, params?)fetchPositions
fetch all open positions
Kind: instance method of bingx
Returns: Array<object> - a list of position structures
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20position%20data
- https://bingx-api.github.io/docs/#/en-us/standard/contract-interface.html#position
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20warehouse
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.standard | boolean | No | whether to fetch standard contract positions |
bingx.fetchPositions (symbols, params?)fetchPosition
fetch data on a single open contract trade position
Kind: instance method of bingx
Returns: object - a position structure
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20position%20data
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20warehouse
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market the position is held in |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchPosition (symbol, params?)createMarketOrderWithCost
create a market order by providing the symbol, side and cost
Kind: instance method of bingx
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| side | string | Yes | 'buy' or 'sell' |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.createMarketOrderWithCost (symbol, side, cost, params?)createMarketBuyOrderWithCost
create a market buy order by providing the symbol and cost
Kind: instance method of bingx
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.createMarketBuyOrderWithCost (symbol, cost, params?)createMarketSellOrderWithCost
create a market sell order by providing the symbol and cost
Kind: instance method of bingx
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| cost | float | Yes | how much you want to trade in units of the quote currency |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.createMarketSellOrderWithCost (symbol, cost, params?)createOrder
create a trade order
Kind: instance method of bingx
Returns: object - an order structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Place%20order
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Place%20order
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Place%20TWAP%20Order
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Trade%20order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much you want to trade in units of the base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | a unique id for the order |
| params.postOnly | bool | No | true to place a post only order |
| params.timeInForce | string | No | spot supports 'PO', 'GTC' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK' |
| params.reduceOnly | bool | No | swap only true or false whether the order is reduce only |
| params.triggerPrice | float | No | triggerPrice at which the attached take profit / stop loss order will be triggered |
| params.stopLossPrice | float | No | stop loss trigger price |
| params.takeProfitPrice | float | No | take profit trigger price |
| params.cost | float | No | the quote quantity that can be used as an alternative for the amount |
| params.trailingAmount | float | No | swap only the quote amount to trail away from the current market price |
| params.trailingPercent | float | No | swap only the percent to trail away from the current market price |
| params.takeProfit | object | No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered |
| params.takeProfit.triggerPrice | float | No | take profit trigger price |
| params.stopLoss | object | No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered |
| params.stopLoss.triggerPrice | float | No | stop loss trigger price |
| params.test | boolean | No | swap only whether to use the test endpoint or not, default is false |
| params.positionSide | string | No | contracts only "BOTH" for one way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode |
| params.hedged | boolean | No | swap only whether the order is in hedged mode or one way mode |
bingx.createOrder (symbol, type, side, amount, price?, params?)createOrders
create a list of trade orders
Kind: instance method of bingx
Returns: object - an order structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Place%20multiple%20orders
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Place%20multiple%20orders
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.sync | boolean | No | spot only if true, multiple orders are ordered serially and all orders do not require the same symbol/side/type |
bingx.createOrders (orders, params?)cancelOrder
cancels an open order
Kind: instance method of bingx
Returns: object - an order structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20Order
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20Order
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20TWAP%20Order
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Cancel%20an%20Order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | a unique id for the order |
bingx.cancelOrder (id, symbol, params?)cancelAllOrders
cancel all open orders
Kind: instance method of bingx
Returns: Array<object> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20all%20Open%20Orders%20on%20a%20Symbol
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20All%20Open%20Orders
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Cancel%20all%20orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | 'spot' or 'swap' (default is 'spot' if symbol is not provided) |
| params.subType | string | No | 'linear' or 'inverse' for swap markets (default is 'linear' if symbol is not provided) |
bingx.cancelAllOrders (symbol?, params?)cancelOrders
cancel multiple orders
Kind: instance method of bingx
Returns: object - an list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20multiple%20orders
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20multiple%20orders
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> | Yes | order ids |
| symbol | string | Yes | unified market symbol, default is undefined |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderIds | Array<string> | No | client order ids |
bingx.cancelOrders (ids, symbol, params?)cancelAllOrdersAfter
dead man's switch, cancel all orders after the given timeout
Kind: instance method of bingx
Returns: object - the api result
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20All%20After
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20All%20After
| Param | Type | Required | Description |
|---|---|---|---|
| timeout | number | Yes | time in milliseconds, 0 represents cancel the timer |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | spot or swap market |
bingx.cancelAllOrdersAfter (timeout, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of bingx
Returns: object - an order structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20details
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20details
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/TWAP%20Order%20Details
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | the order id |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.twap | boolean | No | if fetching twap order |
bingx.fetchOrder (id, symbol, params?)fetchOrders
fetches information on multiple orders made by the user
Kind: instance method of bingx
Returns: Array<Order> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/All%20Orders
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history (returns less fields than above)
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch entries for |
| params.orderId | int | No | Only return subsequent orders, and return the latest order by default |
bingx.fetchOrders (symbol, since?, limit?, params?)fetchOpenOrders
fetch all unfilled currently open orders
Kind: instance method of bingx
Returns: Array<object> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Current%20Open%20Orders
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Current%20All%20Open%20Orders
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20all%20current%20pending%20orders
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20TWAP%20Entrusted%20Order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| since | int | No | the earliest time in ms to fetch open orders for |
| limit | int | No | the maximum number of open order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.twap | boolean | No | if fetching twap open orders |
bingx.fetchOpenOrders (symbol, since?, limit?, params?)fetchClosedOrders
fetches information on multiple closed orders made by the user
Kind: instance method of bingx
Returns: Array<Order> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20history
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/User's%20History%20Orders
- https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the closed orders |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the max number of closed orders to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch orders for |
| params.standard | boolean | No | whether to fetch standard contract orders |
bingx.fetchClosedOrders (symbol, since?, limit?, params?)fetchCanceledOrders
fetches information on multiple canceled orders made by the user
Kind: instance method of bingx
Returns: object - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20history
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/User's%20History%20Orders
- https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the canceled orders |
| since | int | No | timestamp in ms of the earliest order |
| limit | int | No | the max number of canceled orders to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch orders for |
| params.standard | boolean | No | whether to fetch standard contract orders |
bingx.fetchCanceledOrders (symbol, since?, limit?, params?)fetchCanceledAndClosedOrders
fetches information on multiple closed orders made by the user
Kind: instance method of bingx
Returns: Array<object> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20history
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/User's%20History%20Orders
- https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20TWAP%20Historical%20Orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | the latest time in ms to fetch orders for |
| params.standard | boolean | No | whether to fetch standard contract orders |
| params.twap | boolean | No | if fetching twap orders |
bingx.fetchCanceledAndClosedOrders (symbol?, since?, limit?, params?)transfer
transfer currency internally between wallets on the same account
Kind: instance method of bingx
Returns: object - a transfer structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | amount to transfer |
| fromAccount | string | Yes | account to transfer from (spot, swap, futures, or funding) |
| toAccount | string | Yes | account to transfer to (spot, swap (linear or inverse), future, or funding) |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.transfer (code, amount, fromAccount, toAccount, params?)fetchTransfers
fetch a history of internal transfers made on an account
Kind: instance method of bingx
Returns: Array<object> - a list of transfer structures
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code of the currency transferred |
| since | int | No | the earliest time in ms to fetch transfers for |
| limit | int | No | the maximum number of transfers structures to retrieve (default 10, max 100) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.fromAccount | string | Yes | (mandatory) transfer from (spot, swap (linear or inverse), future, or funding) |
| params.toAccount | string | Yes | (mandatory) transfer to (spot, swap(linear or inverse), future, or funding) |
| params.paginate | boolean | No | whether to paginate the results (default false) |
bingx.fetchTransfers (code?, since?, limit?, params?)fetchDepositAddressesByNetwork
fetch the deposit addresses for a currency associated with this account
Kind: instance method of bingx
Returns: object - a dictionary address structures, indexed by the network
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchDepositAddressesByNetwork (code, params?)fetchDepositAddress
fetch the deposit address for a currency associated with this account
Kind: instance method of bingx
Returns: object - an address structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.network | string | No | The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency |
bingx.fetchDepositAddress (code, params?)fetchDeposits
fetch all deposits made to an account
Kind: instance method of bingx
Returns: Array<object> - a list of transaction structures
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of deposits structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchDeposits (code?, since?, limit?, params?)fetchWithdrawals
fetch all withdrawals made from an account
Kind: instance method of bingx
Returns: Array<object> - a list of transaction structures
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code |
| since | int | No | the earliest time in ms to fetch withdrawals for |
| limit | int | No | the maximum number of withdrawals structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchWithdrawals (code?, since?, limit?, params?)setMarginMode
set margin mode to 'cross' or 'isolated'
Kind: instance method of bingx
Returns: object - response from the exchange
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Change%20Margin%20Type
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Set%20Margin%20Type
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string | Yes | 'cross' or 'isolated' |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.setMarginMode (marginMode, symbol, params?)setMargin
Either adds or reduces margin in an isolated position in order to set the margin to a specific value
Kind: instance method of bingx
Returns: object - A margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market to set margin in |
| amount | float | Yes | the amount to set the margin to |
| params | object | No | parameters specific to the bingx api endpoint |
bingx.setMargin (symbol, amount, params?)fetchLeverage
fetch the set leverage for a market
Kind: instance method of bingx
Returns: object - a leverage structure
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Leverage%20and%20Available%20Positions
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Leverage
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchLeverage (symbol, params?)setLeverage
set the level of leverage for a market
Kind: instance method of bingx
Returns: object - response from the exchange
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Set%20Leverage
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Modify%20Leverage
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float | Yes | the rate of leverage |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.side | string | No | hedged: ['long' or 'short']. one way: ['both'] |
bingx.setLeverage (leverage, symbol, params?)fetchMyTrades
fetch all trades made by the user
Kind: instance method of bingx
Returns: Array<object> - a list of trade structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20transaction%20details
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20historical%20transaction%20orders
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Order%20Trade%20Detail
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch trades for |
| limit | int | No | the maximum number of trades structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms for the ending date filter, default is undefined |
| params.trandingUnit | string | Yes | COIN (directly represent assets such as BTC and ETH) or CONT (represents the number of contract sheets) |
| params.orderId | string | Yes | the order id required for inverse swap |
bingx.fetchMyTrades (symbol?, since?, limit?, params?)fetchDepositWithdrawFees
fetch deposit and withdraw fees
Kind: instance method of bingx
Returns: object - a list of fee structures
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string>, undefined | Yes | list of unified currency codes |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchDepositWithdrawFees (codes, params?)withdraw
make a withdrawal
Kind: instance method of bingx
Returns: object - a transaction structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| amount | float | Yes | the amount to withdraw |
| address | string | Yes | the address to withdraw to |
| tag | string | No | |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.walletType | int | No | 1 fund (funding) account, 2 standard account, 3 perpetual account, 15 spot account |
bingx.withdraw (code, amount, address, tag?, params?)fetchMyLiquidations
retrieves the users liquidated positions
Kind: instance method of bingx
Returns: object - an array of liquidation structures
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/User's%20Force%20Orders
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20force%20orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified CCXT market symbol |
| since | int | No | the earliest time in ms to fetch liquidations for |
| limit | int | No | the maximum number of liquidation structures to retrieve |
| params | object | No | exchange specific parameters for the bingx api endpoint |
| params.until | int | No | timestamp in ms of the latest liquidation |
bingx.fetchMyLiquidations (symbol?, since?, limit?, params?)closePosition
closes open positions for a market
Kind: instance method of bingx
Returns: object - an order structure
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Close%20All%20Positions
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Close%20position%20by%20position%20ID
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Close%20all%20positions%20in%20bulk
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| side | string | No | not used by bingx |
| params | object | No | extra parameters specific to the bingx api endpoint |
| params.positionId | string, undefined | No | the id of the position you would like to close |
bingx.closePosition (symbol, side?, params?)fetchPositionMode
fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
Kind: instance method of bingx
Returns: object - an object detailing whether the market is in hedged or one-way mode
See: https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20position%20mode
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchPositionMode (symbol, params?)setPositionMode
set hedged to true or false for a market
Kind: instance method of bingx
Returns: object - response from the exchange
See: https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Set%20Position%20Mode
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool | Yes | set to true to use dualSidePosition |
| symbol | string | Yes | not used by bingx setPositionMode () |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.setPositionMode (hedged, symbol, params?)editOrder
cancels an order and places a new order
Kind: instance method of bingx
Returns: object - an order structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20an%20Existing%20Order%20and%20Send%20a%20New%20Order // spot
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20an%20Existing%20Order%20and%20Send%20a%20New%20Orde // swap
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of the currency you want to trade in units of the base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | string | No | Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types. |
| params.takeProfit | object | No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered |
| params.takeProfit.triggerPrice | float | No | take profit trigger price |
| params.stopLoss | object | No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered |
| params.stopLoss.triggerPrice | float | No | stop loss trigger price EXCHANGE SPECIFIC PARAMETERS |
| params.cancelClientOrderID | string | No | the user-defined id of the order to be canceled, 1-40 characters, different orders cannot use the same clientOrderID, only supports a query range of 2 hours |
| params.cancelRestrictions | string | No | cancel orders with specified status, NEW: New order, PENDING: Pending order, PARTIALLY_FILLED: Partially filled |
| params.cancelReplaceMode | string | No | STOP_ON_FAILURE - if the cancel order fails, it will not continue to place a new order, ALLOW_FAILURE - regardless of whether the cancel order succeeds or fails, it will continue to place a new order |
| params.quoteOrderQty | float | No | order amount |
| params.newClientOrderId | string | No | custom order id consisting of letters, numbers, and _, 1-40 characters, different orders cannot use the same newClientOrderId. |
| params.positionSide | string | No | contract only position direction, required for single position as BOTH, for both long and short positions only LONG or SHORT can be chosen, defaults to LONG if empty |
| params.reduceOnly | string | No | contract only true or false, default=false for single position mode. this parameter is not accepted for both long and short positions mode |
| params.priceRate | float | No | contract only for type TRAILING_STOP_Market or TRAILING_TP_SL, Max = 1 |
| params.workingType | string | No | contract only StopPrice trigger price types, MARK_PRICE (default), CONTRACT_PRICE, or INDEX_PRICE |
bingx.editOrder (id, symbol, type, side, amount, price?, params?)fetchMarginMode
fetches the margin mode of the trading pair
Kind: instance method of bingx
Returns: object - a margin mode structure
See
- https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Margin%20Type
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Margin%20Type
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the margin mode for |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchMarginMode (symbol, params?)fetchTradingFee
fetch the trading fees for a market
Kind: instance method of bingx
Returns: object - a fee structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Trading%20Commission%20Rate
- https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20Trading%20Commission%20Rate
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Trade%20Commission%20Rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchTradingFee (symbol, params?)fetchMarketLeverageTiers
retrieve information on the maximum leverage, for different trade sizes for a single market
Kind: instance method of bingx
Returns: object - a leverage tiers structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.fetchMarketLeverageTiers (symbol, params?)watchTicker
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of bingx
Returns: object - a ticker structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/Subscribe%20to%2024-hour%20Price%20Change
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Subscribe%20to%2024-hour%20price%20changes
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscribe%20to%2024-Hour%20Price%20Change
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchTicker (symbol, params?)unWatchTicker
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of bingx
Returns: object - a ticker structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/Subscribe%20to%2024-hour%20Price%20Change
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Subscribe%20to%2024-hour%20price%20changes
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscribe%20to%2024-Hour%20Price%20Change
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the ticker for |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.unWatchTicker (symbol, params?)watchTrades
watches information on multiple trades made in a market
Kind: instance method of bingx
Returns: Array<object> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/Subscription%20transaction%20by%20transaction
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Subscribe%20the%20Latest%20Trade%20Detail
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscription%20transaction%20by%20transaction
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market orders were made in |
| since | int | No | the earliest time in ms to fetch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchTrades (symbol, since?, limit?, params?)unWatchTrades
unsubscribes from the trades channel
Kind: instance method of bingx
Returns: Array<object> - a list of trade structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/Subscription%20transaction%20by%20transaction
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Subscribe%20the%20Latest%20Trade%20Detail
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscription%20transaction%20by%20transaction
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch trades for |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.name | string | No | the name of the method to call, 'trade' or 'aggTrade', default is 'trade' |
bingx.unWatchTrades (symbol, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of bingx
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/Subscribe%20Market%20Depth%20Data
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Partial%20Order%20Book%20Depth
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscribe%20to%20Limited%20Depth
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| limit | int | No | the maximum amount of order book entries to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchOrderBook (symbol, limit?, params?)unWatchOrderBook
unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of bingx
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/Subscribe%20Market%20Depth%20Data
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Partial%20Order%20Book%20Depth
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscribe%20to%20Limited%20Depth
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.unWatchOrderBook (symbol, params?)watchOHLCV
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bingx
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/K-line%20Streamst
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Subscribe%20K-Line%20Data
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscribe%20to%20Latest%20Trading%20Pair%20K-Line
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| since | int | No | timestamp in ms of the earliest candle to fetch |
| limit | int | No | the maximum amount of candles to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchOHLCV (symbol, timeframe, since?, limit?, params?)unWatchOHLCV
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bingx
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Market%20Data/K-line%20Streamst
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Market%20Data/Subscribe%20K-Line%20Data
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Market%20Data/Subscribe%20to%20Latest%20Trading%20Pair%20K-Line
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string | Yes | the length of time each candle represents |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.unWatchOHLCV (symbol, timeframe, params?)watchOrders
watches information on multiple orders made by the user
Kind: instance method of bingx
Returns: Array<object> - a list of order structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Account%20Data/order%20update%20event
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Account%20Data/Order%20update%20push
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Account%20Data/Order%20update%20push
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market orders are made in |
| since | int | No | the earliest time in ms to watch orders for |
| limit | int | No | the maximum number of order structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchOrders (symbol?, since?, limit?, params?)watchMyTrades
watches information on multiple trades made by the user
Kind: instance method of bingx
Returns: Array<object> - a list of trade structures
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Account%20Data/order%20update%20event
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Account%20Data/Order%20update%20push
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Account%20Data/Order%20update%20push
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market the trades are made in |
| since | int | No | the earliest time in ms to watch trades for |
| limit | int | No | the maximum number of trade structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchMyTrades (symbol?, since?, limit?, params?)watchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of bingx
Returns: object - a balance structure
See
- https://bingx-api.github.io/docs-v3/#/en/Spot/Websocket%20Account%20Data/Subscription%20account%20balance%20push
- https://bingx-api.github.io/docs-v3/#/en/Swap/Websocket%20Account%20Data/Account%20balance%20and%20position%20update%20push
- https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Websocket%20Account%20Data/Account%20balance%20and%20position%20update%20push
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchBalance (params?)watchPositions
watch all open positions
Kind: instance method of bingx
Returns: Array<object> - a list of position structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | No | list of unified market symbols |
| since | int | No | the earliest time in ms to fetch positions for |
| limit | int | No | the maximum number of position structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
bingx.watchPositions (symbols?, since?, limit?, params?)