Data Format
Crypto Futures
Folder Structure
The following table shows the paths of the Crypto Futures data files:
| Resolution | Zip File | CSV File |
|---|---|---|
| Tick, second, and minute | cryptofuture / <market> / <resolution> / <ticker> / <date>_<tickType>.zip | <date>_<ticker>_<resolution>_<tickType>_perp.csv |
| Hour and daily | cryptofuture / <market> / <resolution> / <ticker>_<tickType>.zip | <ticker>_<tickType>_perp.csv |
The perp suffix marks a perpetual contract. For a contract with an expiry date, LEAN uses <contractMonth> as the suffix. For example, cryptofuture / binance / minute / adausdt / 20221213_trade.zip contains 20221213_adausdt_minute_trade_perp.csv.
Bar Data
The following table shows the bar data, with example rows from the ADAUSDT minute files of the binance market on December 13, 2022:
| Data Type | Resolutions | Example |
|---|---|---|
| Trade bar | Second, minute, hour, and daily | 0,0.3067,0.3068,0.3066,0.3068,274004 |
| Quote bar | Second, minute, hour, and daily | 0,0.3066,0.3067,0.3066,0.3067,88126,0.3067,0.3068,0.3067,0.3068,236586 |
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.