Tick-Level Updates
What is this CSV for?
CSV tick by tick full order book files cater for institutional clients involved in strategy backtesting and quantitative modeling, offering a level of detail not available in Order Book Snapshots. The data is normalized and exchange-format independent, making integration easy. Each file contains comprehensive information to reconstruct an exchange order book for a specific instrument, including:
Order book snapshots: These are lists of available buy or sell orders for a currency pair on an exchange, organized by price level, reflecting the current order book status. The snapshot depth varies based on the exchange, but we provide the full depth as offered by the exchange.
Order book updates: These signify new entries on the order book, changes to the volume of existing entries, or cancellations.
File Structure Details
File Name: [kaiko_legacy_slug]_[instrument_symbol]_[date].csv.gz
Files are generated on a daily basis.
example: bf_btcusdt_2022-09-01.csv
Cut-off time:
00:00:00 UTC
We use the timestamp when exchanges send the order book data points through websocket in order to cut-off the data points between days, if the timestamps are provided by the exchanges.
When the timestamps are not provided by the exchanges, we use the data collection timestamp when the data points arrive at Kaiko's collection system
Column Delimeter: ; (semi-colon)
Decimal Mark (in numbers): . (dot)
The exchanges providing timestamp:
Binance (
binc
)Binance Options (
bopt
)Binance US (
bnus
)Bitmex (
btmx
)Bitpanda (
bpnd
)Bitstamp (
stmp
)Coinbase (
cbse
)Deribit (
dbrt
)Gemini (
gmni
)Huobi (
huob
)OkCoin (
okcn
)OKX (
okex
)OSL (
oslx
)Upbit (
upbt
)Huobi Derivatives Market (
hbdm
)Crypto Facilities (
crfl
)Bithumb (
bthb
)
The exchanges NOT providing timestamp:
Bitfinex (
bfnx
)Bitflyer (
bfly
)CEX.io (
cexi
)Kraken (
krkn
)Itbit (
itbi
)
How to create a local order book with CSV files
Download the CSV files, which usually start with updates (
type
:u
).Ignore the updates before the 1st snapshot (
type
:s
) that appears in the CSV file.If the prices in the updates exist in the locally managed order book, update the amount. The amount 0 means to remove the price level from the order book, because it is cancelled or filled.
If the prices in the updates do not exist in the locally managed order book, insert that price level in the order book.
Receiving an update that removes a price level that is not in your local order book is a normal exchange's behavior that can happen. In this case, you can just ignore the updates.
Please dump the locally managed order book if you encounter a snapshot between updates while maintaining the orderbook, and start fresh with the new snapshot.
Last updated