Developer guide · Bitfinex v2 REST API

Bitfinex API guide: ticker, funding and rate limits

Bitfinex’s API documentation covers hundreds of endpoints; a lending bot needs about a dozen. This guide covers exactly those: creating a withdraw-disabled API key, reading funding rates and books from the public API, placing and cancelling funding offers over the authenticated API, and the rate limits and data quirks you will hit in practice — with working Python examples.

Endpoint paths and behavior verified against the official Bitfinex v2 API as used in production by Stratum, August 2026. The official Bitfinex docs are the authoritative reference.

Try the public endpoints

Live Bitfinex funding API explorer

Choose an endpoint and currency, then run a real unauthenticated request. The Stratum endpoint normalizes FRR history, averages, available funding and fixed-book levels into one documented JSON response.

https://app.stratum.money/api/v1/public/funding-rates.json
Response preview
{
  "generatedAt": "2026-08-23T06:48:15.408007891Z",
  "updatedAt": "2026-08-23T06:05:00Z",
  "source": "Bitfinex Public REST API",
  "currency": {
    "code": "USD",
    "bitfinexSymbol": "fUSD",
    "current": {
      "timestamp": "2026-08-23T06:05:00Z",
      "dailyRatePercent": "0.031025",
      "annualizedAprPercent": "11.324125",
      "averagePeriodDays": "91.470000",
      "fundingAmount": "5991052941.288744",
      "fundingAmountUsed": "5935309488.394312",
      "fundingAvailable": "55743452.894432",
      "fundingBelowThreshold": "763483370.5925878"
    },
    "averages": {
      "hours24": {
        "dailyRatePercent": "0.031200",
        "annualizedAprPercent": "11.388073",
        "observations": 25
      },
      "days7": {
        "dailyRatePercent": "0.031710",
        "annualizedAprPercent": "11.574020",
        "observations": 169
      },
      "days30": {
        "dailyRatePercent": "0.033403",
        "annualizedAprPercent": "12.192212",
        "observations": 721
      }
    },
    "market": {
      "bestFixedBid": {
        "dailyRatePercent": "0.027397",
        "annualizedAprPercent": "10.000000",
        "periodDays": 120,
        "amount": "11593282.43646913"
      },
      "bestFixedAsk": {
        "dailyRatePercent": "0.014188",
        "annualizedAprPercent": "5.178600",
        "periodDays": 2,
        "amount": "264.93559176"
      },
      "fixedBids": [
        {
          "dailyRatePercent": "0.027397",
          "annualizedAprPercent": "10.000000",
          "periodDays": 120,
          "amount": "11593282.43646913"
        },
        {
          "dailyRatePercent": "0.018011",
          "annualizedAprPercent": "6.574000",
          "periodDays": 120,
          "amount": "133240.73391109"
        },
        {
          "dailyRatePercent": "0.017770",
          "annualizedAprPercent": "6.486100",
          "periodDays": 120,
          "amount": "23123.30278361"
        },
        {
          "dailyRatePercent": "0.017400",
          "annualizedAprPercent": "6.351000",
          "periodDays": 120,
          "amount": "12350.0"
        },
        {
          "dailyRatePercent": "0.017130",
          "annualizedAprPercent": "6.252500",
          "periodDays": 120,
          "amount": "14000.0"
        },
        {
          "dailyRatePercent": "0.017125",
          "annualizedAprPercent": "6.250600",
          "periodDays": 117,
          "amount": "560000.0"
        },
        {
          "dailyRatePercent": "0.017120",
          "annualizedAprPercent": "6.248800",
          "periodDays": 120,
          "amount": "20000.0"
        },
        {
          "dailyRatePercent": "0.017111",
          "annualizedAprPercent": "6.245500",
          "periodDays": 120,
          "amount": "2000000.0"
        },
        {
          "dailyRatePercent": "0.016125",
          "annualizedAprPercent": "5.885600",
          "periodDays": 117,
          "amount": "560000.0"
        },
        {
          "dailyRatePercent": "0.016000",
          "annualizedAprPercent": "5.840000",
          "periodDays": 120,
          "amount": "10009162.66122322"
        },
        {
          "dailyRatePercent": "0.016000",
          "annualizedAprPercent": "5.840000",
          "periodDays": 14,
          "amount": "9306.90081316"
        },
        {
          "dailyRatePercent": "0.015111",
          "annualizedAprPercent": "5.515500",
          "periodDays": 117,
          "amount": "560000.0"
        }
      ],
      "fixedAsks": [
        {
          "dailyRatePercent": "0.014188",
          "annualizedAprPercent": "5.178600",
          "periodDays": 2,
          "amount": "264.93559176"
        },
        {
          "dailyRatePercent": "0.014190",
          "annualizedAprPercent": "5.179300",
          "periodDays": 2,
          "amount": "250.0"
        },
        {
          "dailyRatePercent": "0.014192",
          "annualizedAprPercent": "5.180100",
          "periodDays": 2,
          "amount": "200.0"
        },
        {
          "dailyRatePercent": "0.014978",
          "annualizedAprPercent": "5.467000",
          "periodDays": 2,
          "amount": "3837.92472142"
        },
        {
          "dailyRatePercent": "0.014982",
          "annualizedAprPercent": "5.468400",
          "periodDays": 2,
          "amount": "323.64921816"
        },
        {
          "dailyRatePercent": "0.014988",
          "annualizedAprPercent": "5.470600",
          "periodDays": 2,
          "amount": "605.58777224"
        },
        {
          "dailyRatePercent": "0.014998",
          "annualizedAprPercent": "5.474300",
          "periodDays": 2,
          "amount": "2079.77565528"
        },
        {
          "dailyRatePercent": "0.014999",
          "annualizedAprPercent": "5.474600",
          "periodDays": 2,
          "amount": "1968.80422628"
        },
        {
          "dailyRatePercent": "0.015047",
          "annualizedAprPercent": "5.492200",
          "periodDays": 2,
          "amount": "484.95397132"
        },
        {
          "dailyRatePercent": "0.015196",
          "annualizedAprPercent": "5.546500",
          "periodDays": 2,
          "amount": "150.0"
        },
        {
          "dailyRatePercent": "0.015418",
          "annualizedAprPercent": "5.627600",
          "periodDays": 2,
          "amount": "200.0"
        },
        {
          "dailyRatePercent": "0.015607",
          "annualizedAprPercent": "5.696500",
          "periodDays": 2,
          "amount": "1150.0"
        }
      ],
      "fixedBidDepth": "37154170.83381627",
      "fixedAskDepth": "536825.22487061",
      "frrBidDepth": "0",
      "frrOfferDepth": "0",
      "sampledLevels": 356
    },
    "historyPreview": [
      {
        "timestamp": "2026-08-23T06:05:00Z",
        "dailyRatePercent": "0.031025",
        "annualizedAprPercent": "11.324125",
        "averagePeriodDays": "91.470000",
        "fundingAmount": "5991052941.288744",
        "fundingAmountUsed": "5935309488.394312",
        "fundingAvailable": "55743452.894432",
        "fundingBelowThreshold": "763483370.5925878"
      },
      {
        "timestamp": "2026-08-23T05:05:00Z",
        "dailyRatePercent": "0.031025",
        "annualizedAprPercent": "11.324125",
        "averagePeriodDays": "92.570000",
        "fundingAmount": "5989152818.724412",
        "fundingAmountUsed": "5934084828.197341",
        "fundingAvailable": "55067990.527071",
        "fundingBelowThreshold": "769699003.4136398"
      },
      {
        "timestamp": "2026-08-23T04:05:00Z",
        "dailyRatePercent": "0.031025",
        "annualizedAprPercent": "11.324125",
        "averagePeriodDays": "92.030000",
        "fundingAmount": "5988567317.18653",
        "fundingAmountUsed": "5933880711.029357",
        "fundingAvailable": "54686606.157173",
        "fundingBelowThreshold": "769905136.1789076"
      }
    ]
  }
}

GET /v2/ticker/{symbol} · tBTCUSD / fUSD

Funding ticker — the FRR (index 0, a daily rate), best bid/ask and their periods, daily volume. The single most useful lending endpoint.

INDEXtBTCUSDfUSD
0BIDFRR
1BID_SIZEBID
2ASKBID_PERIOD
3ASK_SIZEBID_SIZE
4CHANGEASK
5CHANGE_RELATIVEASK_PERIOD
6LAST_PRICEASK_SIZE
7VOLUMEDAILY_CHANGE
8HIGHDAILY_CHANGE_PERC
9LOWLAST_PRICE
10FIRST_TRADEVOLUME
11HIGH
12LOW
15FRR_AMOUNT_AVAILABLE
16FIRST_TRADE

REST: 90 req/min ·docs.bitfinex.com/reference/rest-public-ticker

Step zero

Create a scoped API key (withdrawals off)

Everything below needs an API key only for the authenticated endpoints — rates, candles, and books are public. When you do create a key (Bitfinex → API Keys → Create New Key), scope it to what a lender actually needs: Margin Funding read + write (to see and place offers), Wallets read (to see balances), and Account History read (for the ledger). Leave withdrawals, trading, and transfers disabled.

A funding bot never needs the ability to move your money off the exchange. A key without withdraw and trade permissions can, at worst, lend your funding wallet at a bad rate — it cannot drain it. This is the same scoping Stratum enforces: withdraw- or trade-capable keys are rejected at add-time.

Rate-unit conversion

Ticker, book and funding/stats do not use the same FRR unit

Ticker and book rates are daily fractions. The FRR field from funding/stats is one 365th of the displayed daily FRR. Apply the matching conversion below before comparing values or building a backtest. Stratum’s public endpoint returns daily percentage and annualized APR explicitly.

ticker/book daily % = API rate × 100
ticker/book gross APR % = API rate × 365 × 100
funding/stats daily % = FRR field × 365 × 100
funding/stats gross APR % = FRR field × 365 × 365 × 100
curl https://app.stratum.money/api/v1/public/funding-rates.json
curl https://app.stratum.money/api/v1/public/funding-rates.csv
curl "https://api-pub.bitfinex.com/v2/ticker/fUSD"
curl "https://api-pub.bitfinex.com/v2/book/fUSD/P0?len=25"

The endpoints that matter for funding

Public (no key, api-pub.bitfinex.com)

GET /v2/ticker/fUSD

Funding ticker — the FRR (index 0, a daily rate), best bid/ask and their periods, daily volume. The single most useful lending endpoint.

GET /v2/candles/{key}/hist

Historical funding-rate candles per tenor, e.g. key trade:1h:fUSD:p2 for 2-day USD funding. This is the series you backtest against.

GET /v2/book/fUSD/P2 and /R0

The live funding book — aggregated price levels (P0–P3) or raw orders (R0). Rate, period, and size of every resting bid and offer.

GET /v2/funding/stats/fUSD/hist

Hourly funding stats: FRR, average period, total funding used. Gotcha: the FRR column is stored as FRR/365 — multiply by 365 to match the ticker.

Authenticated (api.bitfinex.com, HMAC-signed)

POST /v2/auth/r/wallets

Wallet balances, including the funding wallet a bot lends from.

POST /v2/auth/r/funding/offers/fUSD

Your open funding offers; the /hist variant returns filled and cancelled ones.

POST /v2/auth/r/funding/credits/fUSD

Funding that is currently lent out (active credits): rate, period, opening time. The /hist variant is your closed-loan history.

POST /v2/auth/w/funding/offer/submit

Place a funding offer: symbol, amount, daily rate, period (2–120 days). Cancel with offer/cancel or offer/cancel/all.

POST /v2/auth/r/ledgers/USD/hist

The ledger — every interest payment and its 15% fee deduction, per loan per day. The only correct basis for earnings and tax numbers.

POST /v2/auth/w/funding/keep

Control auto-renew per credit — the API equivalent of the auto-renew toggle in the UI.

Working code

Python examples

Read the FRR and funding book (no key needed)

import requests

PUB = "https://api-pub.bitfinex.com"

# Funding ticker: index 0 is the FRR, quoted as a DAILY rate
ticker = requests.get(f"{PUB}/v2/ticker/fUSD", timeout=10).json()
frr_daily = ticker[0]
print(f"FRR: {frr_daily * 365 * 100:.2f}% APR")

# Top of the live funding book (aggregated)
book = requests.get(f"{PUB}/v2/book/fUSD/P2", params={"len": 25}, timeout=10).json()
for rate, period, count, amount in book[:5]:
    side = "offer" if amount > 0 else "bid"
    print(f"{side}: {rate * 365 * 100:.2f}% APR for {period}d, size {abs(amount):,.0f}")

Place a funding offer (authenticated)

import hashlib, hmac, json, time, requests

KEY, SECRET = "your-key", "your-secret"
BASE = "https://api.bitfinex.com"

def auth_post(path: str, body: dict):
    nonce = str(int(time.time() * 1_000_000))  # must strictly increase per key
    raw = f"/api/{path}{nonce}{json.dumps(body)}"
    sig = hmac.new(SECRET.encode(), raw.encode(), hashlib.sha384).hexdigest()
    return requests.post(f"{BASE}/{path}", data=json.dumps(body), timeout=15, headers={
        "bfx-nonce": nonce, "bfx-apikey": KEY, "bfx-signature": sig,
        "content-type": "application/json",
    }).json()

# Offer $150 (Bitfinex minimum) at 0.03% per day (~10.95% APR) for 2 days
result = auth_post("v2/auth/w/funding/offer/submit", {
    "type": "LIMIT", "symbol": "fUSD",
    "amount": "150", "rate": "0.0003", "period": 2,
})
print(result)

Rates in the API are always daily — multiply by 365 for APR — and always gross, before Bitfinex’s 15% fee on earned interest. The minimum offer is $150 equivalent; periods run 2–120 days. If you prefer a maintained client over hand-rolled signing, Bitfinex publishes an official Python library (bfxapi).

Rate limits and the gotchas that cost real hours

Nonces must strictly increase

Every signed request needs a bfx-nonce larger than the last one for that key. Two processes sharing one key will collide with "nonce: small" errors — use one key per process.

Per-endpoint rate limits

Public endpoints allow roughly 10–90 requests/minute depending on the route; authenticated ones are similar. Exceeding them returns HTTP 429 with an ERR_RATE_LIMIT body — back off exponentially and cache reads.

funding/stats stores FRR/365

The FRR column in /v2/funding/stats is the daily FRR divided by 365, while /v2/ticker quotes the daily rate directly. Multiply the stats value by 365 before comparing — this silently skews backtests otherwise.

Everything is gross of fees

Book rates, candles, and the FRR are all pre-fee. Your wallet receives 85% of earned interest (82% for hidden offers). Reconcile against the ledger, not against the quoted rate.

Loans close early

A 120-day credit does not mean 120 days of interest — borrowers repay when they close positions, and credits can return in days. Model expected hold, not nominal period.

Build vs. run

If you’d rather not run this yourself

Everything above is what Stratum operates in production: the same endpoints, signing, backoff, and ledger reconciliation, plus 11 backtested strategies on three years of funding candles, paper mode, and tax exports — behind a withdraw-disabled key you scope exactly as described in step zero. Build your own bot if you enjoy owning the stack (this guide plus the open-source projects are a real path); use a hosted one if you would rather skip the nonce bugs and 3 a.m. 429s.

Bitfinex API FAQ

What API permissions does a Bitfinex lending bot need?

Margin Funding read and write, Wallets read, and Account History read. Withdrawals, trading, and transfers should stay disabled — a lending bot never needs to move funds off the exchange, and a scoped key limits the damage if it ever leaks.

Is the Bitfinex API free to use?

Yes. Both the public API (rates, candles, books) and the authenticated API (offers, wallets, ledgers) are free; you only need an account and an API key for the authenticated part. The public endpoints on api-pub.bitfinex.com need no key at all.

Is there an official Bitfinex Python library?

Yes — bfxapi, published by Bitfinex, covers both REST and WebSocket. The examples on this page use plain requests plus hand-rolled HMAC signing so you can see exactly what happens on the wire; for production code the official library saves boilerplate.

Are Bitfinex API rates daily or annual?

Daily. A rate of 0.0003 means 0.03% per day, roughly 10.95% APR simple. Multiply by 365 for APR, and remember every quoted rate is gross — Bitfinex keeps 15% of earned interest, so multiply by 0.85 for what reaches your wallet.

Do I need the WebSocket API for a lending bot?

Not to start. REST polling covers a simple bot. WebSocket (wss://api-pub.bitfinex.com/ws/2 public, wss://api.bitfinex.com/ws/2 authenticated) matters when you want live book updates or instant fill notifications without burning your REST rate limit — that is how Stratum tracks wallet, offer, and credit events in real time.

What are the Bitfinex API rate limits?

They vary by endpoint, roughly 10–90 requests per minute on public routes and comparable budgets on authenticated ones. Exceeding a limit returns HTTP 429 (ERR_RATE_LIMIT); well-behaved clients cache public reads and back off exponentially on 429s. Exact numbers are listed per endpoint in the official docs.

The API is the easy part

Placing an offer is twenty lines of Python; knowing what rate and tenor to offer is the actual problem. Stratum runs backtested strategies on the same API described above — or take the code from this page and build your own.

Add an API key to StratumLive funding ratesRead the live Bitfinex funding bookOpen-source bot comparisonBitfinex funding datasetsLive Bitfinex funding-rate widget