BitfinexSource

Defined in dccd.sources.bitfinex

class BitfinexSource(http=None)[source]

Bases: OHLCHistory, TradesHistory, OrderBookSnapshotREST, OHLCLive, TradesLive, OrderBookLive

Bitfinex adapter — 10000 bars/trades per request (largest limit).

async fetch_trades_page(symbol, start_ns, end_ns, limit, cursor=None)[source]

Fetch one page of trades (cursor = start ts 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.