
What is CFD Data? Why Use CFD API?
This article takes you through the meaning of CFD and CFD API, its working, usage, advantages to businesses and how TraderMade helps you make the most of it.
Get real-time and historical CFD data for 40+ instruments, including leading stocks, indices, energy, & metals - all in one powerful, robust API.
Trusted by top companies & institutions. Read our customer stories
4 APIs in One!
Unlock a world of trading opportunities with our comprehensive CFD data. Access 40+ instruments spanning stocks, indices, energy, and precious metals, all through a single, user-friendly API. Empower your innovation. Our expertly crafted APIs seamlessly integrate into your financial apps and websites, providing you with the tools to create groundbreaking trading solutions.
Data Delivery Methods
REST API
Get access to real-time and historical CFD data through our RESTful API, enabling seamless integration.
WebSocket
Stream real-time CFD data for 4 markets directly into your trading setup or platforms. Get instant updates.
Addins
Get CFD data directly into your Excel spreadsheets, Google Sheets or Chat GPT with our add-ins.
Powering financial innovation, one data point at a time.
Robust. Seamless. Expertly Supported.
Verified and Accurate
Receive clean, reliable data from Tier 1 institutions, providing the accuracy needed for financial modeling and critical market applications.
Developer-Friendly APIs
Flexible RESTful and WebSocket APIs, simplifying integration across different programming environments, tailored for fast and efficient development.
Unwavering Support
Our market data experts provide prompt technical support for your queries about market data and integration.
Comprehensive Historical Data
Leverage historical CFD data for backtesting, market trend analysis, and improving accuracy for trading algorithms and applications.
Informational Use
Embed real-time data into dashboards for gold, oil, and index prices, keeping users informed with up-to-date market insights.
We provide bespoke data and technology solutions to help customers integrate our data into their platforms. If you don't find what you are looking for, talk to our team of experts.
Made for developers by developers
import tradermade as tm
# set api key
tm.set_rest_api_key('api_key')
#get live data
tm.live(currency='EURUSD,GBPUSD',fields=['bid', 'mid', 'ask'])
# get historical data
tm.historical(currency='EURUSD,GBPUSD', date='2021-04-22',interval='daily', fields=['open', 'high', 'low','close'])
# get hourly timeseries data
tm.timeseries(currency='EURUSD', start='2024-11-25-00:00',end='2024-11-26-15:03',interval='hourly',fields=['open', 'high', 'low','close'])
# gets list of all available cfds
tm.cfd_list()
# gets list of all available currency codes
tm.currency_list()
import (
"log"
"fmt"
tradermade "github.com/tradermade/Go-SDK/rest"
)
func main() {
// init client
client := tradermade.NewRESTClient("YOUR_API_KEY")
// set parameters
currencyPairs := []string{"EURUSD", "GBPUSD", "USDJPY"}
// get live rates
liveRates, err := client.GetLiveRates(currencyPairs)
if err != nil {
log.Fatalf("Error fetching live rates: %v", err)
}
// iterate over quotes
for _, quote := range liveRates.Quotes {
fmt.Printf("Base: %s, Quote: %s, Bid: %f, Ask: %f, Mid: %f",
quote.BaseCurrency, quote.QuoteCurrency, quote.Bid, quote.Ask, quote.Mid)
}
}
package io.tradermade.test_client_jvm
import io.tradermade.test_client_jvm.ui.theme.TestClientJVMTheme
import io.tradermade.kotlin.sdk.TraderMadeAPI
public class JavaTMSSample {
public static void main(String[] args) throws InterruptedException {
val api = TraderMadeAPI("YOUR_API_KEY")
val liveData = api.getLiveData("EURUSD,GBPUSD")
print(liveData)
val historicalData = api.getHistoricalData("EURUSD", "2023-08-01")
print(historicalData)
val timeSeriesData = api.getTimeSeriesData("EURUSD", "2023-08-01", "2023-08-10", "daily", "1")
print(timeSeriesData)
val convertedAmount = api.convertCurrency("EUR", "USD", 1000.0)
print(convertedAmount)
}
}
Who uses our CFD API?
Our API is easy to use, fast, and reliable, so you can spend less time worrying about data and more time building your app.
What people say
One of the bedrocks of Fuze is good financial data and TraderMade is tailor made for our use-case. The flexibility of the API to fetch prices for different FX pairs, the robustness and availability of the API has never failed us.
TraderMade has been a reliable source of FX and Precious Metals pricing data. In the indexing industry, you have to be as precise as a Swiss watch. Using TraderMade has been a help for Bita to reach that precision on our calculations.
CFD data refers to real-time and historical price information for Contracts for Difference (CFDs), which are financial instruments that allow you to speculate on the price movements of underlying assets.
CFD data can be used for various purposes, including market analysis, risk management, algorithmic trading, and building financial applications.
TraderMade offers CFD data on a wide range of assets, including stocks, indices, energy, and precious metals.
TraderMade's CFD data is highly accurate and reliable, sourced from leading broker-dealer networks.
Yes, TraderMade provides historical CFD data, allowing you to analyze past market trends and patterns.
TraderMade's CFD data is delivered with sub-50ms latency, ensuring you have access to the most up-to-date information.
You can access TraderMade's CFD data through our API, which provides real-time and historical pricing information.
You can access your API key from your dashboard once you sign up and log in. It's free to sign up. You can easily track your API usage. For streaming data API key, start a trial by self-serve once you log in. The streaming API key expires in 14 days.
Yes, we provide CFD data for some instruments via WebSockets. You can self-start a 14-day trial from your dashboard once you sign up.
There is no centralized location for CFD trading, yet it works 24 hours, 5 days a week. You can check the open/close schedule for various CFD instruments through the CFD Market Opening Times Page.
Yes, TraderMade's dedicated support team can assist you with integrating our CFD data into your application.
Yes, TraderMade's CFD data is ideal for algorithmic trading, providing the data required for developing and executing automated trading strategies.
Yes, this works on a rolling monthly basis and can be upgraded, downgraded, or canceled at any time. Up to 1000 requests a month are free forever. We also offer one-time data sales; please contact us or make a purchase via shopping cart.
Our pricing plans are flexible and tailored to your specific needs. Please contact our sales team for more information.
Our payment partner is Stripe; you can use a variety of debit and credit cards - including Visa, MasterCard, Discover, American Express & Diner's Club.
Learn how to grow your business with our expert advice.
This article takes you through the meaning of CFD and CFD API, its working, usage, advantages to businesses and how TraderMade helps you make the most of it.
Learn What is Brent crude and why its the global oil benchmark and what are the key Brent Crude facts.
Learn using our self-serve website to get historical forex data via Excel and CSV downloads for Free.