REST API Documentation
Authentication
There are 2 ways to authenticate with the REST API:
Available Symbols Per SectionStandardPremiumUltimate
You can requst every available symbol per section. This will not consume your available requests.
Endpoint URL:
https://currencydatafeed.com/api/symbolslist.php
Required Parameters:
section=One of Available Sectors: forex, crypto, crypto_extended
Example:
https://currencydatafeed.com/api/symbolslist.php?section=forex
Sinlge & Multiple Pair RequestsFreeStandardPremiumUltimate
Endpoint URL:
https://currencydatafeed.com/api/data.php
Required Parameters:
currency=CURRENCIES seperated by +
Example:
https://currencydatafeed.com/api/data.php?currency=EUR/USD+USD/JPY+EUR/NOK+AUD/USD+USD/SGD+USD/MXN+XAU/USD+GBP/CAD
Sample Response:
Source Currency RequestsStandardPremiumUltimate
Switching the source currency is an important feature as you can set a source currency and get values of the target currencies according to source currency. For example, if you set JPY as source currency and want to get USD,EUR,NOK,AUD,KRW,NZD the API will give you the values of target currencies for 1 JPY
Endpoint URL:
https://currencydatafeed.com/api/source_currency.php
Required Parameters:
source=SOURCE_CURRENCY&target=TARGET_CURRENCIES
Example:
https://currencydatafeed.com/api/source_currency.php?source=AUD&target=USD+EUR+KRW+NZD+JPY
Sample Response:
Currency Conversion RequestsPremiumUltimate
You can convert between 2 currencies with the specified amount.
Endpoint URL:
https://currencydatafeed.com/api/converter.php
Required Parameters:
from=CURRENCY&to=CURRENCY&amount=AMOUNT
Example:
https://currencydatafeed.com/api/converter.php?from=EUR&to=AUD&amount=5500
Sample Response:
Historical Data RequestsUltimate
You can request the historical rate of multiple currencies with this endpoint up to 4 years back.
Endpoint URL:
https://currencydatafeed.com/api/historical.php
Required Parameters:
currency=CURRENCIES&date=DATE
Example:
https://currencydatafeed.com/api/historical.php?token=YOUR_ACCESS_TOKEN¤cy=EUR/USD+EUR/GBP&date=2018-11-20
Sample Response:
Historical Timeframe RequestsUltimate
You can request a pair's OHLC daily data between 2 specified dates.
Endpoint URL:
https://currencydatafeed.com/api/timeframe.php
Required Parameters:
currency=CURRENCY&from=DATE&to=DATE
Example:
https://currencydatafeed.com/api/timeframe.php?currency=EUR/USD&from=2018-04-18&to=2019-01-10
Sample Response:
1 Hour OHLC DataUltimate
You can request a pair's 1 hour OHLC data up to 365 days back. You can specify 2 dates or you can specify a data_count which means if you specify 90, you will get last 90 days of 1 hour data.
Endpoint URL:
https://currencydatafeed.com/api/intraday1h.php
Required Parameters:
currency=CURRENCY&from=DATE(YYYY-MM-DD HH:ii:ss)(optional)&to=DATE(YYYY-MM-DD HH:ii:ss)(optional)&last=DATA_COUNT(optional)
Example:
https://currencydatafeed.com/api/intraday1h.php?currency=EUR/USD&from=2020-08-15 00:00:00&to=2020-08-20 00:00:00
Sample Response:
1 Minute OHLC DataUltimate
You can request a pair's 1 minute OHLC data up to 7 days back. You can specify 2 dates or you can specify a data_count which means if you specify 90, you will get last 90 days of 1 hour data.
Endpoint URL:
https://currencydatafeed.com/api/intraday1m.php
Required Parameters:
currency=CURRENCY&from=DATE(YYYY-MM-DD HH:ii:ss)(optional)&to=DATE(YYYY-MM-DD HH:ii:ss)(optional)&last=DATA_COUNT(optional)
Example:
https://currencydatafeed.com/api/intraday1m.php?currency=EUR/USD&from=2020-08-15 00:00:00&to=2020-08-20 00:00:00
Sample Response:
Gainers & Losers (Currency Pairs)New EndpointUltimate
This endpoint will list you the top 15 gainers and losers of day, week we are in, month we are in or year we are in upon request.
Endpoint URL:
https://currencydatafeed.com/api/gainerloser.php
Required Parameters:
interval=ONE OF THESE INTERVALS: day,week,month,year
Example:
https://currencydatafeed.com/api/gainerloser.php?token=YOUR_ACCESS_TOKEN&interval=day
Consumes 3 requests.
Crypto Currency DataPremiumUltimate
You can request multiple crypto currencies for the latest USD and BTC price, daily change rate and daily low & high values.
Endpoint URL:
https://currencydatafeed.com/api/symbol.php
Required Parameters:
symbol=SYMBOLS
Example:
https://currencydatafeed.com/api/symbol.php?token=ACCESS_TOKEN&symbol=BTC+ETH+XRP+LTC
Sample Response:
Extended Crypto Currency DataPremiumUltimate
This is a more advanced endpoint for crypto currencies. You can request multiple crypto currency pairs for the latest rate, daily change rate and daily low & high values. Symbols need to include the crypto exchange they are traded on. For example to get the ETHBTC pair traded on Binance you need to use [email protected] Every crypto currency exchange may have different formats. For example you can request the same pair from Kucoin with symbol : [email protected] You can find all these pairs on our Supported Pairs page.
Endpoint URL:
https://currencydatafeed.com/api/symbolextended.php
Required Parameters:
symbol=SYMBOLS
Example:
https://currencydatafeed.com/api/[email protected][email protected][email protected]
Sample Response:
Websocket Documentation (Open BETA)
Websocket Connection
Websocket provides live data for the specified currencies. Websockets are available only to ultimate plan or upper. The websocket URL is provided on your control panel's navigation if you are a subscribed user for ultimate plan or upper. Using this url, you can connect to our websocket. After the connection, you will recieve:
Welcome, you are connected to CDF websocket!. Please login in 10 seconds.
which means that you have successfuly connected to our websocket. After recieving this, you have to send login parameters in 10 seconds or you will be disconneceted:
login_YourMailAddress:YourAPIKey
After a successful login you will receive:
Login success. Please subscribe to quotes to start recieving data..
.
You have to subscribe to currencies you would like to get data as JSON as below:
subscribe_EUR/USD+USD/JPY+EUR/JPY+USD/SEK+EUR/USD
That’s all. You will recieve all pairs in the first push, after that, only the pairs that has an update on latest price will be pushed to you. If no pair has an update there won’t be any data delivered to you. The response will be the same as the REST API response provided to live data requests.
Details of Using REST API and Websocket
How API Requests Are Counted?
Nearly all the data feed companies count each quote request as 1 API request. For example, if you make a single request that asks for multiple currencies like EUR/USD, USD/JPY, EUR/SEK, USD/RUB and GBP/USD, this counts 5 API requests but with CurrencyDataFeed.Com, to give you more opportunities and space, we count this example request as 1 API request. We count 1 API request for each 5 quotes.
Some Examples:
For Source Currency requests , each 5 target currency counts as 1 API request.
Some Examples:
For historical and time range queries, every request for a single currency is counted as 1 API request. Only 1 currency pair may be requested for time range queries but you can ask for many currencies for a historical close price with a single call.
Some Examples:
For Currency Conversion queries, each request is counted as 1 API request.
For Crypto queries, every 5 requests are counted as 1 API request.
Which Values Are Provided?
The values provided vary according to subscribed plan. You can check all the plans by clicking pricing link on the navigation bar.
© 2015-2022 currencydatafeed.com - All rights reserved