BingX

BingX

BingX API Information

BingX Api Link: https://bingx-api.github.io/docs/#/en-us/spot/base-info.html#Service%20Address

Main Endpoints

  • Base Endpoint: https://open-api.bingx.com

Time Parameters

  • Accepted units: Milliseconds or microseconds.

HTTP Return Codes

BingX Api Link: https://bingx-api.github.io/docs/#/en-us/spot/base-info.html#Common%20Error%20Codes

  • 4XX error codes, are used to indicate wrong request content, behavior, format.
  • 5XX error codes, are used to indicate problems with the Bingx service.

Error Codes

  • 100001: Signature verification failed.
  • 100202: Insufficient balance.
  • 100204: No data.
  • 100400: Invalid parameter.
  • 100440: Order price deviates greatly from the market price.
  • 100500: We had a problem with our server.
  • 100503: Server busy.
  • 100202: Insufficient assets.
  • 100421: The current system is busy, please try again later.
  • 100400:
    • quantity/quoteOrderQty can’t both be lte 0 in limit order.
    • The current system is busy, please try again later.
    • The same order can only be submitted once per second.
    • invalid symbol, send symbol like BTC-USDT.
    • The minimum amount per order is *.
    • miss arguments.
  • 100414: The account is abnormal, please contact customer service.
  • 100413:
    • Incorrect apiKey.
    • Null apiKey.

LIMITS

BingX Api Link: https://bingx-api.github.io/docs/#/en-us/spot/base-info.html#Rate%20limit

  • If the request is too frequent, the system will automatically restrict the request and recover after 5 minutes;
  • Based on account UID rate limit, each api has its own independent rate limit, which does not affect each other
  • Users can check the current frequency limit usage and the expiration of the time window according to "X-RateLimit-Requests-Remain" (remaining number of frequency limits) and "X-RateLimit-Requests-Expire" (window expiration time) in the Http Header. time, and dynamically adjust your request frequency based on this value.

REST API

  • Market API Group [1]: The total IP rate limit for all interfaces within the group is 100 requests per 10 seconds.
  • Account API Group [2]: The total IP rate limit for all interfaces within the group is 1000 requests per 10 seconds, with an individual IP rate limit of 100 requests per 10 seconds for each interface.
  • Account API Group [3]: The total IP rate limit for all interfaces within the group is 1000 requests per 10 seconds, with an individual IP rate limit of 200 requests per 10 seconds for each interface.

RCXT BingX API Information

There is 1 Base Endpoint for the BingX exchange:

  • apiUrl: open-api.bingx.com

Rate Limits

The rate limit set for each endpoint on the Bingx exchange is as follows:

Limit (1 minute) Spot Usd Futures Coin Futures TransferIn TransferOut Ticker
Fetch Balances 5 Request Weight 5 Request Weight 5 Request Weight
Fetch Orders 10 Request Weight 5 Request Weight 5 Request Weight
Fetch Trades 10 Request Weight
Fetch DepositWithdrawals 10 Request Weight 10 Request Weight
Ticker 100 Request Weight

Fetch Balances

Spot Balance
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/spot/v1/account/balance.
  • The RCXT Endpoint is api/v1/bingx/balances.

The user sends a GET request to query the BingX wallet balances. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Balance is 5.
Usd Futures Balance
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/swap/v3/user/balance.
  • The RCXT Endpoint is api/v1/bingx/balances.

The user sends a GET request to query the BingX USD Futures wallet balances. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for USD Futures Balance is 5.
Coin Futures Balance
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/cswap/v1/user/balance.
  • The RCXT Endpoint is api/v1/bingx/balances.

The user sends a GET request to query the BingX Coin Futures wallet balances. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Coin Futures Balance is 5.

Response Example:

{
  "spot": [
    {
      "coin": "BTTC", #asset
      "total": "208850.4"
    }
  ],
  "margin": null,
  "isolatedMargin": null,
  "futures": [
    {
      "coin": "USDT", # asset
      "total": "0.03733590"
    },
    {
      "coin": "DOGE", #asset
      "total": "2000.00000000"
    }
  ],
  "earnings": null
}

Fetch Trades

Spot Trades
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/spot/v1/trade/query.
  • The RCXT Endpoint is api/v1/bingx/trades.

The user sends a GET request to query the BingX Spot trades. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the trade (e.g., BTCUSDT).
    • fromId: The trade ID is used to fetch a specific trade’s data.
    • type: The type is set to spot for Spot Trades.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Trades is 10.

Response Example:

{
  "trades": [
    {
      "orderId": "226664511", #orderId
      "tradeId": "27082209",
      "isBuyer": false,
      "isMaker": false,
      "price": "0.07610000", #price
      "quantity": "199.90000000", #origQty
      "symbol": "ACAUSDT", #symbol
      "time": 1737552748284, #time
      "commission": "0.01521239", #fee
      "commissionCurrency": "USDT" #side
    }
  ],
  "cursor": ""
}

Fetch Orders

Spot Orders
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/spot/v1/trade/historyOrders.
  • The RCXT Endpoint is api/v1/bingx/orders.

The user sends a GET request to query BingX Spot orders. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • orderId: The order ID used to filter orders.
    • singleOrderId: The specific order ID used to filter a single order.
    • page: Used for pagination, specifies the page to retrieve.
    • type: Options include spot, cfutures, ufutures. spot should be selected for Spot Orders.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Orders is 10.
Spot Open Orders
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/spot/v1/trade/openOrders.
  • The RCXT Endpoint is api/v1/bingx/orders.

The user sends a GET request to query BingX Spot open orders. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • orderId: The order ID used to filter orders.
    • singleOrderId: The specific order ID used to filter a single order.
    • page: Used for pagination, specifies the page to retrieve.
    • type: Options include spot, cfutures, ufutures. spot should be selected for Spot Open Orders.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Open Orders is 10.
Usd Futures Orders
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/swap/v2/trade/allOrders.
  • The RCXT Endpoint is api/v1/bingx/orders.

The user sends a GET request to query BingX Usd Futures orders. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • orderId: The order ID used to filter orders.
    • singleOrderId: The specific order ID used to filter a single order.
    • page: Used for pagination, specifies the page to retrieve.
    • type: Options include spot, cfutures, ufutures. ufutures should be selected for Usd Futures Orders.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Usd Futures Orders is 5.
    • A maximum of 1000 entries can be fetched per page.
Usd Futures Open Orders
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/swap/v2/trade/openOrders.
  • The RCXT Endpoint is api/v1/bingx/orders.

The user sends a GET request to query BingX Usd Futures open orders. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • orderId: The order ID used to filter orders.
    • singleOrderId: The specific order ID used to filter a single order.
    • page: Used for pagination, specifies the page to retrieve.
    • type: Options include spot, cfutures, ufutures. ufutures should be selected for Usd Futures Open Orders.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Usd Futures Open Orders is 5.
    • A maximum of 1000 entries can be fetched per page.
Coin Futures Orders
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/cswap/v1/trade/orderHistory.
  • The RCXT Endpoint is api/v1/bingx/orders.

The user sends a GET request to query BingX Coin Futures orders. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • orderId: The order ID used to filter orders.
    • singleOrderId: The specific order ID used to filter a single order.
    • page: Used for pagination, specifies the page to retrieve.
    • type: Options include spot, cfutures, ufutures. cfutures should be selected for Coin Futures Orders.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Coin Futures Orders is 5.
    • A maximum of 1000 entries can be fetched per page.
Coin Futures Open Orders
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/cswap/v1/trade/openOrders.
  • The RCXT Endpoint is api/v1/bingx/orders.

The user sends a GET request to query BingX Coin Futures open orders. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • orderId: The order ID used to filter orders.
    • singleOrderId: The specific order ID used to filter a single order.
    • page: Used for pagination, specifies the page to retrieve.
    • type: Options include spot, cfutures, ufutures. cfutures should be selected for Coin Futures Open Orders.
    • orderStatus: If orderStatus is “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Coin Futures Open Orders is 5.
    • A maximum of 1000 entries can be fetched per page.

Response Example:

{
  "orders": [
    {
      "orderId": "1881364520706670592", #orderId
      "symbol": "XRPUSDT", #symbol
      "type": "MARKET", #type
      "price": "3.335", #price
      "side": "SELL", #side
      "time": 1737387230537, #time
      "status": "CLOSED", #status
      "executedQuantity": "2.7", #executedQty
      "quantity": "2.7" #origiQty
    }
  ],
  "cursor": ""
}

Fetch DepositWithdrawals

Transfer In
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/api/v3/capital/deposit/hisrec.
  • The RCXT Endpoint is api/v1/bingx/deposit-withdraw-history.

The user sends a GET request to query BingX transfer-in data. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • fromId: The transfer ID used to filter the specific transfer.
    • type: Options include transferIn and transferOut. transferIn should be selected for Transfer In.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Transfer In is 10.
    • A maximum of 1000 entries can be fetched per page.
Transfer Out
  • The Base Endpoint is apiUrl (open-api.bingx.com).
  • The Endpoint used is /openApi/api/v3/capital/deposit/hisrec.
  • The RCXT Endpoint is api/v1/bingx/deposit-withdraw-history.

The user sends a GET request to query BingX transfer-out data. This request must include the required header parameters:

  • The apiKey and secretKey values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • fromId: The transfer ID used to filter the specific transfer.
    • type: Options include transferIn and transferOut. transferOut should be selected for Transfer Out.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Transfer Out is 10.
    • A maximum of 1000 entries can be fetched per page.

Response Example:

{
  "depositWithdrawals": [
    {
      "fiatCurrency": "",
      "cryptoCurrency": "USDT", #coin
      "fiatAmount": "",
      "cryptoAmount": "10", #amount
      "price": "",
      "address": "TNZcfzLhPXVUVe1NLyjdGrjKkPLbHbncJk", #address
      "orderId": "",
      "transactionId": "e4e406a067ff5ce1c05abc6056e6041478153fc03ba996b565f4727b01a708d8", #txId
      "fee": "",
      "network": "TRC20", #network
      "status": "1", #status
      "time": 1726576711847 #insertTime
    }
  ],
  "cursor": ""
}

Fetch Ticker

Ticker
  • The Base Endpoint is apiUrl (open-api.bingx.com).

  • The Endpoint used is /openApi/spot/v1/ticker/price.

  • The RCXT Endpoint is api/v1/bingx/ticker.

  • open-api.bingx.com/openApi/spot/v1/ticker/price: Provides the symbol and current price for cryptocurrency pairs traded only with USDT.

  • The only query parameter required is symbol (e.g. BTCUSDT):

    • symbol: Specifies the symbol of the cryptocurrency pair.

Response Example:

{
  "symbol": "BTCUSDT", #symbol
  "price": "104562.53000000" #price
}