---
title: "Forex and CFD"
description: "The folder structure, file names, and columns of Forex and CFD data files in the LEAN data format."
canonical: https://www.quantconnect.com/docs/v2/lean-engine/data-format/forex-and-cfd
markdown: https://www.quantconnect.com/docs/v2/lean-engine/data-format/forex-and-cfd.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/06%20LEAN%20Engine/03%20Data%20Format/09%20Forex%20and%20CFD
modified: 2026-11-22
index: https://www.quantconnect.com/llms.txt
---

# Forex and CFD

[Documentation](https://www.quantconnect.com/docs/v2.md) > [LEAN Engine](https://www.quantconnect.com/docs/v2/lean-engine.md) > Data Format > Forex and CFD

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Forex and CFD files have the same format and differ only in the security type folder. They have quote data only and store the actual prices. The data time zone depends on the market. For example, the data time zone of the oanda market is UTC and the data time zone of the fxcm Forex market is UTC-05.

## Folder Structure

The following table shows the paths of the Forex and CFD data files:

| Resolution | Zip File | CSV File |
| --- | --- | --- |
| Tick, second, and minute | `<securityType> / <market> / <resolution> / <ticker> / <date>_quote.zip` | `<date>_<ticker>_<resolution>_quote.csv` |
| Hour and daily | `<securityType> / <market> / <resolution> / <ticker>.zip` | `<ticker>.csv` |

In these paths, `<securityType>` is `forex` or `cfd`. Each zip file contains one CSV file. For example, `forex / oanda / minute / eurusd / 20140501_quote.zip` contains `20140501_eurusd_minute_quote.csv`.

## Bar Data

The following table shows the bar data, with an example row from the EURUSD minute file of the oanda market on May 1, 2014:

| Data Type | Resolutions | Example |
| --- | --- | --- |
| [Quote bar](https://www.quantconnect.com/docs/v2/lean-engine/data-format/core-data-types.md#03-Quote-Bar) | Second, minute, hour, and daily | `0,1.38676,1.38686,1.38669,1.38686,0,1.38686,1.38697,1.38680,1.38697,0` |

## Tick Data

Forex and CFD tick files have quote ticks only. The following table describes the columns, with an example row from `forex / oanda / tick / eurusd / 20140501_quote.zip`:

| Column | Description | Example |
| --- | --- | --- |
| Time | Milliseconds since midnight | 292 |
| Bid Price | Best bid price | 1.38676 |
| Ask Price | Best ask price | 1.38686 |
