Bitfinex¶
Capabilities¶
Backfill: OHLC, trades, order-book snapshot — up to 10 000 items per request (the largest limit of any adapter).
Stream: OHLC (
candles), trades. Order-book streaming is not implemented and not declared.OHLC fidelity:
quote_volume— null ·trades— null.
Note
Bitfinex labels Tether UST, so BTC/USDT is rendered tBTCUST
(tBTCUSDT returns an empty list). Symbols with a part longer than three
characters use the tBASE:QUOTE form.
Symbols¶
tBTCUSD / tBTCUST — leading t for trading pairs; USDT → UST.
Example¶
async with Client() as c:
await c.backfill("bitfinex", "BTC/USDT", "ohlc", span=3600, start="2024-01-01")
API¶
- class BitfinexSource(http=None)[source]¶
Bitfinex source adapter.
Backfill: OHLC, trades, order-book snapshot — up to 10 000 items per request (the largest limit of any adapter).
Stream: OHLC (
candles), trades. Order-book streaming is not implemented and not declared.
See also
dccd.Clientthe public facade.
Notes
Bitfinex labels Tether
UST, soBTC/USDTis rendered astBTCUST(tBTCUSDTreturns an empty list). Symbols with a part longer than three characters use thetBASE:QUOTEform.Examples
>>> from dccd.sources.bitfinex import _bfx_symbol >>> _bfx_symbol(Symbol(base='BTC', quote='USDT')) 'tBTCUST'
- async fetch_ohlc_page(symbol, span, start_ns, end_ns, limit)[source]¶
Fetch one page of OHLC bars (see
fetch_ohlc_page).
- async fetch_orderbook(symbol, depth)[source]¶
Fetch a current order-book snapshot up to depth levels.
- async fetch_trades_page(symbol, start_ns, end_ns, limit, cursor=None)[source]¶
Fetch one page of trades (cursor =
startts in ms, forward).Bitfinex returns up to 10 000 trades ascending in
[start, end]. When a full page comes back the window held more than one page, so we advance the cursor to the last timestamp + 1 ms and continue.