Bitfinex Spot historical trade data
Bitfinex Spot historical trade data since 2013-01-14, available through SQL or REST in one unified schema and checked every day against Bitfinex's own data.
Koinju provides Bitfinex Spot trades and OHLCV candles for all markets since 2013-01-14, under the exchange ID bitfinex. This page explains what that gives you compared with Bitfinex's own API, how we collect the data, and how we verify that no trades are missed.
Why use Koinju for Bitfinex data
Full history in one place. Bitfinex's REST trades endpoint, which our volume check uses to add missing trades, returns up to 10,000 trades per request for a chosen time range and is limited to 15 requests per minute (Bitfinex docs). Koinju provides it as one continuous history since 2013-01-14, aligned to UTC days and queryable for any period through SQL or REST.
One schema across exchanges. Unified symbols and columns across every exchange we cover, Bitfinex included, so the same query works on all of them.
Checked against Bitfinex's own data. Every day, each market's volume is compared with Bitfinex's own daily candle and any missing trades are added.
Faithful to Bitfinex. Bitfinex's own trade IDs and trade times.
At a glance
Exchange ID
bitfinex
Historical data since
2013-01-14
Data types
Public trades, OHLCV
Collected from
Bitfinex's real-time WebSocket API v2, trades channel (trades)
Volume check
Every day, against Bitfinex's UTC daily candles
How we collect Bitfinex trades
Every trade, individually. We subscribe to Bitfinex's trades channel (
trades) for every listed Bitfinex Spot market. Bitfinex sends a trade message whenever a trade occurs, and each row keeps Bitfinex's own trade ID.New listings picked up automatically. The market list is refreshed every minute, and new markets are subscribed without a restart.
Active redundancy. Every market is collected twice, by two collectors running in parallel. If one connection drops, it reconnects and resubscribes automatically while the other keeps collecting trades. Both copies of a trade share one key (exchange, market and trade ID), so the second copy is dropped before storage, and anything missed is recovered by the checks below.
Bitfinex's timestamps. A trade's
timestampis the trade time reported by Bitfinex, not the time we received it.
From Bitfinex's message to your data
Each trade Bitfinex publishes is stored as one row, with Bitfinex's fields mapped to the same columns used for every exchange:
symbol
market
Koinju's universal symbol, for example BTC-USD
ID
trade_id
Bitfinex's own trade ID
PRICE
price
Bitfinex's trade price
AMOUNT
quantity
The size of the trade, without its sign
AMOUNT
side
buy when AMOUNT is positive, sell when it is negative: the taker's side, as Bitfinex defines it
MTS
timestamp
Bitfinex's trade time, in milliseconds
How we verify that no Bitfinex trades are missed
Volume check against Bitfinex's own candles
The reference is Bitfinex's own daily candle for each UTC day. A daily candle is only final once the day has closed, so each day is checked the morning after, against Bitfinex's final figures for that day. The daily rhythm follows the reference data rather than an arbitrary time window.
Compare. Each market's volume for the UTC day is compared with Bitfinex's daily candle. Markets where our volume is lower than Bitfinex's go to step 2.
Add. For those markets, the comparison is repeated hour by hour. The trades of the hours that differ are fetched from Bitfinex's REST API, and only trades we do not already hold are added.
Re-check. The whole comparison runs again on the updated data, and any difference that remains is flagged for review.
A day is marked as checked only after all three steps complete. If any step fails, the day stays open and is retried on the next run.
Bitfinex-specific details
UTC daily candles. Bitfinex's daily candles (
1D) start at 00:00 UTC, the same day boundaries as our daily total.The exact figure compared. The volume check compares the daily candle's
VOLUMEfield, the quantity traded within the time frame (Bitfinex docs), with the sum of the trade quantities we hold for that day.Side from the sign of the amount. Bitfinex publishes no separate side field: a trade's
AMOUNTis positive for a buy and negative for a sell, as decided by the taker (Bitfinex docs). We storebuyorsellinside, and the size without its sign inquantity.
Access Bitfinex data
Public trades: every trade, through SQL (
api.trade) or REST, withexchange = 'bitfinex'.OHLCV: candles for every market.
Market list: all
bitfinexmarkets and their symbols.How to connect: SQL, REST and client setup.
FAQ
How does Koinju set the side of a Bitfinex trade?
From the sign of Bitfinex's AMOUNT: positive is a buy and negative is a sell, as decided by the taker. The quantity is stored without the sign.
Which timestamp does Koinju store?
The trade time reported by Bitfinex.
Which Bitfinex Spot markets are included?
Every Spot market Bitfinex lists. The market list is refreshed every minute, so a new listing is subscribed within a minute of appearing in Bitfinex's market list.
Last updated
Was this helpful?