BitMart

BitMart

BitMart API Information

BitMart Api Link: https://developer-pro.bitmart.com/en/spot/#api-basic-information

API Basic Information

This article lists the rest baseurl of the interfaces: https://api-cloud.bitmart.com All interface responses are in JSON format.

Request Parameter Settings

  • GET / DELETE: Parameters must be sent in the query string (URL sonuna eklenir).
  • POST / PUT: Parameters are sent in the request body in JSON format.

HTTP Response Codes

  • HTTP 4XX – Wrong request content, behavior, or format. Sorun istemcidedir.
  • HTTP 403 – Violation of restriction (prohibited call).
  • HTTP 429 – Access frequency exceeded, IP will be blocked.
  • HTTP 418 – IP has been blocked after returning 429 earlier.
  • HTTP 5XX – BitMart server problem.

API Returned Codes

Field Description
code Error code
message Error description
trace Event tracking ID for each request
data User Data

Rate Limit

  • Public interface: rate limit per IP
  • Private interface: rate limit per API KEY
  • If requests exceed the limit, server returns HTTP 429 – request too frequent

List of global HTTP return codes

HTTP Description
404 Not Found – The requested interface could not be found
403 Forbidden – No permission to access the resource (KEY permission issue or IP restrictions)
401 Unauthorized – Authentication failed (problems with the 3 required header parameters)
500 Internal Server Error – Server exception, BitMart service problem

RCXT BitMart API Information

There is 2 Base Endpoint for the BitMart exchange:

  • apiUrl: /api-cloud.bitmart.com
  • fapiUrl: /api-cloud-v2.bitmart.com

Rate Limits

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

Limit (1 minute) Spot Margin Usd Futures TransferIn TransferOut
Fetch Balances 360 Request Weight 240 Request Weight 360 Request Weight
Fetch Orders 360 Request Weight 360 Request Weight
Fetch Trades 180 Request Weight 180 Request Weight
Fetch DepositWithdrawals 240 Request Weight 240 Request Weight

Fetch Balances

Spot Balance
  • The Base Endpoint is apiUrl (/api-cloud.bitmart.com).
  • The Endpoint used is /spot/v1/wallet.
  • The RCXT Endpoint is api/v1/bitmart/balances.

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

  • The apiKey, secretKey and apiMemo 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 360.
Margin Balance
  • The Base Endpoint is apiUrl (/api-cloud.bitmart.com).
  • The Endpoint used is /spot/v1/margin/isolated/account.
  • The RCXT Endpoint is api/v1/bitmart/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, secretKey and apiMemo values are taken from the header.

  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Margin Balance is 240.
Usd Futures Balance
  • The Base Endpoint is apiUrl (/api-cloud-v2.bitmart.com).
  • The Endpoint used is /contract/private/assets-detail.
  • The RCXT Endpoint is api/v1/bitmart/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, secretKey and apiMemo 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 360.

Response Example:

{
  "spot": [
    {
      "coin": "BTTC", #asset
      "total": "208850.4"
    }
  ],
  "margin": [
    {
      "coin": "DOGE", #asset
      "total": "0.00399992"
    }
  ],
  "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 (/api-cloud.bitmart.com).
  • The Endpoint used is /spot/v4/query/trades.
  • The RCXT Endpoint is api/v1/bitmart/trades.

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

  • The apiKey, secretKey and apiMemo 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).
    • limit: Determines the maximum number of assets to be returned.
    • 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 180.
Usd Futures Trades
  • The Base Endpoint is apiUrl (/api-cloud-v2.bitmart.com).
  • The Endpoint used is /contract/private/trades.
  • The RCXT Endpoint is api/v1/bitmart/trades.

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

  • The apiKey, secretKey and apiMemo 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).
    • limit: Determines the maximum number of assets to be returned.
    • type: The type is set to uFutures for Usd Futures Trades.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Usd Futures Trades is 180.

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 (/api-cloud.bitmart.com).
  • The Endpoint used is /spot/v4/query/history-orders.
  • The RCXT Endpoint is api/v1/bitmart/orders.

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

  • The apiKey, secretKey and apiMemo 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.
    • 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 360.
Spot Open Orders
  • The Base Endpoint is apiUrl (/api-cloud.bitmart.com).
  • The Endpoint used is /spot/v4/query/open-orders.
  • The RCXT Endpoint is api/v1/bitmart/orders.

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

  • The apiKey, secretKey and apiMemo 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.
    • 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 360.
Usd Futures Orders
  • The Base Endpoint is apiUrl (/api-cloud-v2.bitmart.com).
  • The Endpoint used is /contract/private/order-history.
  • The RCXT Endpoint is api/v1/bitmart/orders.

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

  • The apiKey, secretKey and apiMemo 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.
    • 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 360.
Usd Futures Open Orders
  • The Base Endpoint is apiUrl (/api-cloud-v2.bitmart.com).
  • The Endpoint used is /spot/v4/query/history-orders.
  • The RCXT Endpoint is api/v1/bitmart/orders.

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

  • The apiKey, secretKey and apiMemo 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.
    • 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 360.

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 (/api-cloud.bitmart.com).
  • The Endpoint used is /account/v2/deposit-withdraw/history.
  • The RCXT Endpoint is api/v1/bitmart/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, secretKey and apiMemo values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • limit: Determines the maximum number of assets to be returned.
    • 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 240.
      • A maximum of 1000 entries can be fetched per page.
Transfer Out
  • The Base Endpoint is apiUrl (/api-cloud.bitmart.com).
  • The Endpoint used is /account/v2/deposit-withdraw/history.
  • The RCXT Endpoint is api/v1/bitmart/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, secretKey and apiMemo values are taken from the header.

  • The following query parameters are required:

    • startTime: The date from which we want to fetch data.
    • limit: Determines the maximum number of assets to be returned.
    • 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 240.
    • 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 (/api-cloud.bitmart.com).

  • The Endpoint used is /spot/quotation/v3/ticker.

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

  • https://api-cloud.bitmart.com/spot/quotation/v3/tickers: 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
}