Data Format
Crypto
Folder Structure
The following table shows the paths of the Crypto data files:
| Resolution | Zip File | CSV File |
|---|---|---|
| Tick, second, and minute | crypto / <market> / <resolution> / <ticker> / <date>_<tickType>.zip | <date>_<ticker>_<resolution>_<tickType>.csv |
| Hour and daily | crypto / <market> / <resolution> / <ticker>_<tickType>.zip | <ticker>.csv |
Each zip file contains one CSV file. For example, crypto / coinbase / minute / btceur / 20180404_trade.zip contains 20180404_btceur_minute_trade.csv. The hour and daily zip file names include the tick type, but the CSV file names don't. For example, crypto / coinbase / daily / btcusd_trade.zip contains btcusd.csv.
Bar Data
The following table shows the bar data, with example rows from the BTCEUR minute files of the coinbase market on April 4, 2018:
| Data Type | Resolutions | Example |
|---|---|---|
| Trade bar | Second, minute, hour, and daily | 0,6060,6060,6048.83,6049.68,6.72374365 |
| Quote bar | Second, minute, hour, and daily | 0,6049.68,6049.68,6049.68,6049.68,2.22525012,6049.69,6049.69,6049.69,6049.69,0.98912614 |
Tick Data
Tick files have trade ticks and quote ticks. The following table describes the columns of trade ticks:
| Column | Description |
|---|---|
| Time | Milliseconds since midnight |
| Price | Trade price |
| Quantity | Quantity traded |
| Suspicious | 1 if the tick is suspicious and 0 otherwise |
The following table describes the columns of quote ticks:
| Column | Description |
|---|---|
| Time | Milliseconds since midnight |
| Bid Price | Best bid price |
| Bid Size | Size of the best bid |
| Ask Price | Best ask price |
| Ask Size | Size of the best ask |
| Suspicious | 1 if the tick is suspicious and 0 otherwise |
LEAN also reads tick files that don't have the Suspicious column.