---
title: "CFD"
description: "The CFD data provider provides a stream of contract trades and quotes delivered to your trading algorithm during live execution."
canonical: https://www.quantconnect.com/docs/v2/cloud-platform/datasets/quantconnect/cfd
markdown: https://www.quantconnect.com/docs/v2/cloud-platform/datasets/quantconnect/cfd.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/01%20Cloud%20Platform/09%20Datasets/07%20QuantConnect/09%20CFD
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# CFD

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Cloud Platform](https://www.quantconnect.com/docs/v2/cloud-platform.md) > [Datasets](https://www.quantconnect.com/docs/v2/cloud-platform/datasets.md) > [QuantConnect](https://www.quantconnect.com/docs/v2/cloud-platform/datasets/quantconnect.md) > CFD

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

## Introduction

The QuantConnect data provider provides a stream of CFD trades and quotes to your trading algorithm during live execution. Live data enables you to make real-time trades and update the value of the securities in your portfolio.

## Sourcing

The QuantConnect data provider consolidates CFD market data from OANDA.

## Bar Building

We aggregate ticks to build bars.

In live trading, bars are built using the exchange timestamps with microsecond accuracy. This microsecond-by-microsecond processing of the ticks can mean that the individual bars between live trading and backtesting can have slightly different ticks. As a result, it's possible for a tick to be counted in different bars between backtesting and live trading, which can lead to bars having slightly different open, high, low, close, and volume values.

## Delivery

Most live trading algorithms run on co-located servers racked in [Equinix](https://www.quantconnect.com/docs/v2/cloud-platform/live-trading/getting-started.md#07-Redundancy). Co-location reduces several factors that can interfere with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.

Live data takes time to travel from the source to your algorithm. The QuantConnect latencies vary depending on the data provider. A much more significant source of latency is the round trip order times from brokers, which can vary from 100ms to 5 seconds. QuantConnect is not intended for high-frequency trading, but we have integrations to high-speed brokers if you need.

## Historical Data

When you [request historical data](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md) or run [warm-up](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/warm-up-periods.md), the amount of historical data you can access depends on the resolution of your data subscriptions. The following table shows the amount of trailing historical data you can access for each data resolution:

| Resolution | Available History |
| --- | --- |
| Daily | All historical data |
| Hour | All historical data |
| Minute | 1 year |
| Second | 2 months |
| Tick | 1 month |

## Pricing

The QuantConnect data provider serves CFD data for free.
