Bitfinex

Bitfinex

Bitfinex API Information

Bitfinex API Link: https://docs.bitfinex.com/docs/introduction

Main Endpoints

  • Public REST Base Endpoint: https://api-pub.bitfinex.com/
  • Authenticated REST Base Endpoint: https://api.bitfinex.com/

Time Parameters

  • All REST timestamps are in milliseconds.

HTTP Return Codes

Bitfinex uses standard HTTP status codes for REST:

  • 2xx — Successful request
  • 4xx — Invalid request, incorrect parameters
  • 5xx — Server-side issues (overload, maintenance, internal errors)

REST Error Messages

Bitfinex REST does not expose a centralized error-code list. Errors are returned directly by each endpoint as text messages.

Common REST error scenarios include:

  • Invalid or missing parameters
  • Invalid symbol
  • Insufficient balance
  • Authentication failure
  • System overload or temporary unavailability

Rate Limits (REST Only)

Bitfinex does not provide a universal REST rate-limit table. Limits are defined per endpoint in the documentation.

REST Rate Limits

Bitfinex API access is rate limited. For the REST API, an IP address can be rate limited if it has sent too many requests per minute. The current rate limit is between 10 and 90 requests per minute, depending on the specific REST API endpoint.

If an IP address is rate limited, the IP is blocked for 60 seconds and cannot make any requests during that time.

Error Codes Table

Code Description Notes / Source
ERR_RATE_LIMIT Rate limit exceeded (too many REST requests) REST limit aşımı durumunda dönebilir. :contentReference[oaicite:0]{index=0}
10100 API Key: invalid code/signature Auth işlemlerinde imza veya key hatası. :contentReference[oaicite:1]{index=1}
10011 Unknown book precision WebSocket book kanalında geçersiz precision. :contentReference[oaicite:2]{index=2}
10012 Unknown book length WebSocket book kanalında geçersiz length parametresi. :contentReference[oaicite:3]{index=3}

RCXT Bitfinex API Information

There is 2 Base Endpoint for the BingX exchange:

  • apiUrl: api.bitfinex.com
  • publicApiUrl: api-pub.bitfinex.com

Rate Limits

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

Limit (1 minute) Spot Margin Usd Futures TransferIn TransferOut Ticker
Fetch Balances 90 Request Weight 90 Request Weight 90 Request Weight
Fetch Orders 90 Request Weight 90 Request Weight 90 Request Weight
Fetch Trades 90 Request Weight 90 Request Weight 90 Request Weight
Fetch DepositWithdrawals 90 Request Weight 90 Request Weight
Ticker 90 Request Weight

Fetch Balances

Spot Balance
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/wallets.
  • The RCXT Endpoint is api/v1/bitfinex/balances.

The user sends a POST 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 90.

Response Example:

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

Fetch Trades

Spot Trades
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/trades/hist.
  • The RCXT Endpoint is api/v1/bitfinex/trades.

The user sends a POST 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).
    • 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 90.
Margin Trades
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/trades/hist.
  • The RCXT Endpoint is api/v1/bitfinex/trades.

The user sends a POST 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).
    • type: The type is set to margin for Spot Trades.
  • Limiter:

    • Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Trades is 90.
USD Futures Trades
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/trades/hist.
  • The RCXT Endpoint is api/v1/bitfinex/trades.

The user sends a POST 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).
    • type: The type is set to uFutures for Spot Trades.
  • Limiter:

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

Response Example:

{
  "data": [
    {
      "orderId": "218008079927",
      "tradeId": "1805894641",
      "isBuyer": false,
      "isMaker": false,
      "price": "0.21158",
      "quantity": "-8.582168",
      "symbol": "tALGUSD",
      "time": 1758541181747,
      "commission": "-0.00363163021088",
      "commissionCurrency": "USD",
      "tradeType": "SPOT"
    },
  ],
  "cursor": ""
}

Fetch Orders

Spot Orders
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/orders/hist.
  • The RCXT Endpoint is api/v1/bitfinex/orders.

The user sends a POST 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.
    • 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 90.
Spot Open Orders
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/orders.
  • The RCXT Endpoint is api/v1/bitfinex/orders.

The user sends a POST 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.
    • 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 90.
Margin Orders
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/orders/hist.
  • The RCXT Endpoint is api/v1/bitfinex/orders.

The user sends a POST 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.
    • type: Options include spot, cfutures, ufutures. spot should be selected for Margin 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 Margin Orders is 90.
Margin Open Orders
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/orders.
  • The RCXT Endpoint is api/v1/bitfinex/orders.

The user sends a POST 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.
    • type: Options include spot, cfutures, ufutures. spot should be selected for Margin 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 Margin Open Orders is 90.
USD Futures Orders
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/orders/hist.
  • The RCXT Endpoint is api/v1/bitfinex/orders.

The user sends a POST 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.
    • type: Options include spot, cfutures, ufutures. spot should be selected for uFutures 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 uFutures Orders is 90.
USD Futures Open Orders
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/orders.
  • The RCXT Endpoint is api/v1/bitfinex/orders.

The user sends a POST 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.
    • type: Options include spot, cfutures, ufutures. spot should be selected for uFutures 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 uFutures Open Orders is 90.

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 (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/movements/hist.
  • The RCXT Endpoint is api/v1/bitfinex/deposit-withdraw-history.

The user sends a POST 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.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • 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 90.
Transfer Out
  • The Base Endpoint is apiUrl (https://api.bitfinex.com/v2).
  • The Endpoint used is https://api.bitfinex.com/v2/auth/r/movements/hist.
  • The RCXT Endpoint is api/v1/bitfinex/deposit-withdraw-history.

The user sends a POST 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.
    • endTime: The date until which we want to fetch data.
    • symbol: The symbol of the pair used in the order (e.g., BTCUSDT).
    • 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 90.

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 (https://api-pub.bitfinex.com/v2).

  • The Endpoint used is https://api-pub.bitfinex.com/v2/ticker/.

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

  • https://api-pub.bitfinex.com/v2/tickers?symbols=ALL: 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
}