Data Format

Crypto Futures

Introduction

Crypto Futures data has trade and quote data. The files store the actual prices. The data time zone is UTC.

Folder Structure

The following table shows the paths of the Crypto Futures data files:

ResolutionZip FileCSV File
Tick, second, and minutecryptofuture / <market> / <resolution> / <ticker> / <date>_<tickType>.zip<date>_<ticker>_<resolution>_<tickType>_perp.csv
Hour and dailycryptofuture / <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 TypeResolutionsExample
Trade barSecond, minute, hour, and daily0,0.3067,0.3068,0.3066,0.3068,274004
Quote barSecond, minute, hour, and daily0,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:

ColumnDescription
TimeMilliseconds since midnight
PriceTrade price
QuantityQuantity traded
Suspicious1 if the tick is suspicious and 0 otherwise

The following table describes the columns of quote ticks:

ColumnDescription
TimeMilliseconds since midnight
Bid PriceBest bid price
Bid SizeSize of the best bid
Ask PriceBest ask price
Ask SizeSize of the best ask
Suspicious1 if the tick is suspicious and 0 otherwise

LEAN also reads tick files that don't have the Suspicious column.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: