Early access is open. Free sample datasets are live now. Download a sample

Data product · Early access

CFD Prices API: Indices, Metals and Stocks

The bid and ask a broker was quoting on US500, gold or an Apple CFD, for traders whose platform shows CFD prices and whose backtests should too.

CFD prices are planned for later and need a broker partner we don't have yet, so they are not offered at launch. You can reserve early access now. We'd rather tell you that up front than list a feed we can't stand behind.

Coverage

What you get

Item Detail
Product code CFD-PRICES
Coverage Index, ETF, stock, metal and energy CFDs from one or more pricing brokers
Granularity Quote snapshots, each with bid, ask and mid
History Depends on the partner broker's archive
Delivery REST and WebSocket
Update speed As the broker updates its quotes

A CFD price isn't an exchange price. It's what one broker or liquidity provider quotes for a contract that tracks something else. US500 tracks the S&P 500 but isn't the index level; a gold CFD follows spot gold but carries the broker's spread and, often, its own trading hours. That's why every record names its source. Prices from two brokers on the same underlying will not match, and they aren't supposed to.

Schema

Schema

Field Type Required Description
symbol string yes Our CFD symbol, e.g. US500.CFD
underlying string yes What it tracks, e.g. S&P 500 or AAPL
cfd_type string yes index, etf, stock, metal, energy
timestamp string yes Quote time, ISO 8601 UTC
bid number yes Bid
ask number yes Ask
mid number yes (bid + ask) / 2
source string yes Pricing broker or LP

Example record:

{
  "symbol": "US500.CFD",
  "underlying": "S&P 500",
  "cfd_type": "index",
  "timestamp": "2026-11-19T14:32:07Z",
  "bid": 6012.4,
  "ask": 6013.0,
  "mid": 6012.7,
  "source": "broker_a"
}

The prices are an example, not an index level, and broker_a is a placeholder for the pricing broker.

Sample data

Sample data

No sample exists, because no broker feed is signed. Tell us which CFDs you trade and with which kind of broker, and we'll use that when picking a partner.

Use cases

Use cases

Backtesting what you actually trade. If your account trades US500 at a CFD broker, your fills follow that broker's quotes, including the hours when the cash index is closed. Testing on CFD bid and ask gets closer to your real results than testing on the index.

Spread costs. ask - bid per symbol and hour shows what a round trip costs you. CFD spreads usually widen outside the main session and around news.

Out-of-hours moves. Index CFDs often quote when the cash market is shut. Compare the mid at the cash open with the prior cash close to measure the overnight gap a CFD trader was exposed to.

Checking your broker. Line up your own broker's prices against a second source on the same underlying to see whether your spreads or price feeds look out of line.

Code

Code examples

Example: latest gold and US500 CFD quotes with curl.

curl "https://api.marketdata.co/v1/cfd/quotes?symbols=US500.CFD,XAUUSD.CFD" \
  -H "Authorization: Bearer $MARKETDATA_API_KEY"

Example: Python, average spread by hour of day.

import os
import requests
import pandas as pd

resp = requests.get(
    "https://api.marketdata.co/v1/cfd/quotes",
    params={"symbol": "US500.CFD", "start": "2026-11-17", "end": "2026-11-19"},
    headers={"Authorization": f"Bearer {os.environ['MARKETDATA_API_KEY']}"},
)
resp.raise_for_status()
q = pd.DataFrame(resp.json()["results"])
q["timestamp"] = pd.to_datetime(q["timestamp"])
q["spread"] = q["ask"] - q["bid"]
print(q.groupby(q["timestamp"].dt.hour)["spread"].mean().round(2))

Pricing

Pricing

CFD prices are not offered at launch and have no price yet. They won't be sold as a dataset. If you need index, metal or stock prices today, our licensed index, futures and stock lines carry exchange and official values.

Vendors we studied charge $49 to $999 a month for CFD prices, but all of those self-serve prices come from a single vendor. The other seller quotes on request.

Side by side

How we compare

Only 2 of the 50 providers we studied sell CFD prices, and only one publishes a price list. If we add CFDs, source will be on every record so you always know whose quote you're looking at, and the same field names will apply as in our forex quotes. We also won't present a CFD price as an index level, which is a mix-up we saw elsewhere in our research.

FAQ

Frequently asked questions

Is a CFD price the same as the index or stock price?

No. It's a broker's quote for a contract that tracks the index or stock. It can differ by the spread, by financing adjustments, and in hours when the underlying market is closed.

Why isn't this available now?

We need a pricing broker or liquidity provider to supply quotes, and we haven't signed one. Our exchange-licensed lines come first.

What time zone are quotes in?

UTC. CFD trading hours depend on the broker and the underlying, and many index CFDs trade nearly 24 hours on weekdays.

Are stock CFDs adjusted for splits and dividends?

Raw quotes are not adjusted. Brokers usually apply dividend adjustments as cash to open positions, not to the price history.

Is the data real-time?

If we launch it, yes, over WebSocket, with REST snapshots for history.

Can I use it in my own app?

That depends on the partner broker's terms, which we'll publish before taking any orders.

Keep reading