Back to Lean

Readme

Data/cfd/readme.md

2.4.0.13.3 KB
Original Source

LEAN Data Formats / Contracts for Difference (CFD)

QuantConnect hosts CFD data provided by Oanda. The data contains only Quote data. All data are stored in zip files, each containing a single CSV file. You can explore CFD data on our website at https://www.quantconnect.com/data/tree/cfd

CFD data supports the following Resolutions:

  • Tick
  • Second
  • Minute
  • Hour
  • Daily

The markets we currently support are:

  • Oanda

CFD data operates in multiple timezones, so please confirm with the market hours database for the specific timezone of your asset.

Minute and Second File Format

Second/minute files are located in the cfd / market / resolution / symbol folder.

The ZIP files have the filename format: YYYYMMDD_quote.zip. The CSV file contained within has the filename format: YYYYMMDD_symbol_resolution_quote.csv

Second/minute quote format and example data is as follows:

TimeBid OpenBid HighBid LowBid CloseLast Bid SizeAsk OpenAsk HighAsk LowAsk CloseLast Ask Size
11300055.0155.9554.8055.501896855.105654.8555.552913
  • Time - Milliseconds since midnight
  • Bid Open - Opening price for the best bid
  • Bid High - Highest recorded bid price
  • Bid Low - Lowest recorded bid price
  • Bid Close - Closing price for the best bid
  • Last Bid Size - Size of best bid at close
  • Ask Open - Opening price for the best ask
  • Ask High - Highest recorded ask price
  • Ask Low - Lowest recorded ask price
  • Ask Close - Closing price for the best ask
  • Last Ask Size - Size of best ask at close

Hour and Daily File Format

Hour/daily files are located in the cfd / market / resolution folder.

The ZIP files have the filename format: symbol.zip. The CSV file contained within has the filename format: symbol.csv

Hour/daily quote format and example data is as follows:

TimeBid OpenBid HighBid LowBid CloseLast Bid SizeAsk OpenAsk HighAsk LowAsk CloseLast Ask Size
20190125 23:0055.0155.9554.8055.501896855.105654.8555.552913
  • Time - Formatted as YYYYMMDD HH:mm
  • Bid Open - Opening price for the best bid
  • Bid High - Highest recorded bid price
  • Bid Low - Lowest recorded bid price
  • Bid Close - Closing price for the best bid
  • Last Bid Size - Size of best bid at close
  • Ask Open - Opening price for the best ask
  • Ask High - Highest recorded ask price
  • Ask Low - Lowest recorded ask price
  • Ask Close - Closing price for the best ask
  • Last Ask Size - Size of best ask at close

Tick File Format

Tick files are located in the cfd / market / tick / symbol folder.

The ZIP files have the filename format: YYYYMMDD_quote.zip. The CSV file contained within has the filename format: YYYYMMDD_symbol_resolution_quote.csv

Tick quote format and example data is as follows:

TimeBid PriceAsk Price
9200010.3810.40
  • Time - Milliseconds since midnight
  • Bid Price - Best bid price
  • Ask Price - Best ask price