*) New FX Base Currency API added
*) New FX Cross API added
*) 1 minute historical data and signals support add
*) For security GET request is deprecated now you can pass parameters in POST request format
*) Reduce latest and Base currency prices update delay from 5 min TO 5 seconds for API request
*) Add real time pricing update with socket
Note: In this document parameters are embed directly in URL (GET request) it is only for quick demo testing, For production API please embed all parameters with POST request.
Learn More about GET VS POST Stackoverflow
Powered by 25+ currency exchange rate data sources, the FCS delivering real-time 145+ country and 2000+ forex currencies combination prices rates. The FCS provides different API endpoints, each serving a different data response. We provides the latest FX price for all or a specific pair of currency, retrieving historical currency data for one or multiple currencies, technical indicators for market analyzing from 1min to 1 month.
In this document, you will learn how to use API with its parameters, potential unwanted errors and some code examples. After this document, if you face difficulty to understand API structure, you can contact us any time and our team will be happy to help out.
For those users who are demanding different tools related to the Forex API. FCS API has been designed and manipulates for the user to access tools quickly and troubleshoot their problems through this Forex API documentation. We have such capability to deliver the exchange rate data which is taking place in real-time for 145+ currencies of the world.
For developer, you can work in any programming language to hit on API URL. Use PHP (Curl or file_get_content), JavaScript (Ajax), Android (HttpURLConnection) or JAVA, C# (HttpWebRequest) or CURL for this. And finally, the users will be able to get a response in the format of standard JSON. Multiple endpoints are the source to get an API and they all serve different use cases. The function of the endpoint is to get the latest market exchange rate data that apply to all or a specific set of currencies.
API Access Key
You need an access key in order to access our database. Your access Key is the unique key that is passed into the API base URL's access_key
parameter in order to authenticate with the FCS API.
Sample API:
https://fcsapi.com/api-v2/forex/latest?id=1&access_key=API_KEYSign up for a free using the button below to use the our Quick start tool.
Most of the APIs endpoint count 1 credit for every URL request. But 3 endpoint count 1 credit per 100 record return. In Basic Plan user allow to request on any API 10,000 times in 1 month. Each API request count 1 credit. But some endpoint count by response, e.g: Latest price API.
If you enter 100 different IDs in parameter and API return 100 currencies prices, it will count 1 request.
If you enter 200 different IDs in parameter and API return 200 currencies prices, it will count 2 request. and so on.
Parameters | Details |
---|---|
ID | You needs to set Forex-ID in request parameters get a response from a specific Forex API. Default: none. Values: 1,2,3... etc, To get all list of Forex ID's or Symbols use "List API" below. |
Symbol | Our Symbol is pair of 2 currencies, or "short name" combination of 2 currencies. You can used it to get specific Forex data from our database through a specific symbol or their short names. Default: none Values: EUR/USD,USD/JPY,GBP/NZD etc, Note: At least one "id" or "symbol" parameter is required. If ID parameter exist in request than symbol parameter will be ignored. You can use any 1 parameter (ID or Symbol) both will return same result. |
Period | It is required in a few endpoints API request, when you request for candle prices, history, signals, moving average lines, pivot points. So you need to specify which time frames data you want. Default: 1h Valid Values: 1m, 5m, 15m, 30m,1h, 5h, 1d, 1w, month OR Alternate: 1, 5, 15, 30,60, 300, 1440, 10080, 43200 |
From (Optional) | When you access history API and you are looking for any historical data from a specific date, you need to specify date between from/to date by using (from,to) parameter Default: none Format: YYYY-MM-DD E.g: 2018-01-01 OR YYYY-MM-DDTHour:Min E.g: 2018-01-01T12:30 |
To (Optional) | When you access forex history API, It is required with "From" Parameter. Default: none Format: YYYY-MM-DD E.g: 2018-01-31 OR YYYY-MM-DDTHour:Min E.g: 2018-01-31T12:30 Note: When you not set FROM and TO parameters, then it will return latest 300 candles. What is T in date format!!! It is nothing, we use it to remove space between time. It has no use and no validation. |
Type (Optional) | Only used in "List API", when you want a specific type of symbols Forex/Crypto currency Default: forex Values: Forex, Crypto |
Output (Optional) | Set your API response format. Default: JSON Valid Values: JSON, JSONP, object, XML, serialize and array |
Note: All parameters are case sensitive, Please specify parameters in lower case (small alphabets).
You can get all the list of supported currencies short names by below API. You can use symbol name to get indicator values,historical and real-time rates. We made it easy for you to search and get all the supported currencies names list. We provide you a constantly updated forex API endpoint showing all the forex currencies API which is available in real-time.
Accepted Parameters:
type = forex
top_symbol = 0 OR 1
access_key=API_KEY
Return All symbols, You need to use these symbols in Latest Price API, Price conversation, Historical and for Technical signals.
https://fcsapi.com/api-v2/forex/list?type=forex&access_key=API_KEYForex Top Currencies List:
If the value of top_symbol=1, It will return a list of popular currencies. "latest candle" API only accepts top currencies ids. If top_symbol=0 it will return all currencies.
https://fcsapi.com/api-v2/forex/list?type=forex&top_symbol=1&access_key=API_KEYResponse:
After you request on API, It would give you the response in JSON format which you can change, it is up to your need. Moreover, We have characterized our FCS API response in the form of different index keys (id, name, symbol, and decimals) concerning the different popular currencies which you can use according to your requirements.
{
"id": 1,
"name": "Euro US Dollar",
"symbol": "EUR/USD",
"decimal": 4
},
{
"id": 2,
"name": "Euro Swiss Franc",
"symbol": "EUR/CHF",
"decimal": 4
},
{2000+ More Forex Currencies},
In our API, You can get all the details about Forex currencies. Details like its name, country name, bank name, currency unit, type of notes and more details.
Accepted Parameters:
id={any valid ID}
symbol={any valid short name}
access_key=API_KEY
Request Credit Usage: 1 credit count for each 100 record returned (rounded up).
By profile API, you can get the profiles of the different currencies by passing their IDs, Symbols or Single currency short name in URL to get a response.
Profile by ID's'https://fcsapi.com/api-v2/forex/profile?id=1,2,3,4&access_key=API_KEYBy Symbol Combination:
https://fcsapi.com/api-v2/forex/profile?symbol=EUR/USD,GBP/CHF&access_key=API_KEYBy Currency Short Name:
https://fcsapi.com/api-v2/forex/profile?symbol=USD&access_key=API_KEYResponse:
{ //Forex Currency Profile
"short_name" : "CHF",
"name" : "Swiss Franc",
"country" : "Switzerland",
"code_n" : "756",
"subunit" : "Rappen",
"website" : "snb.ch",
"symbol" : "Fr., CHf, SFr.",
"bank" : "Swiss National Bank",
"banknotes" : "10 francs, 20 francs, 50 francs, 200 francs, 1000 francs, 100 francs",
"coins" : "5 francs, 10 centimes, 2 francs, 1/2 francs, 20 centimes, 1 francs, 5 centimes",
"icon" : "https://fcsapi.com/assets/images/flags/chf.svg",
"type" : "forex",
}, {and more}
In any Forex API, currency conversion is the most common and a popular part, through which we can get price conversion between two different specified currencies. To do so, you just simply have to attach the symbols parameter with amount to convert it into your required currency.
Note: Below API does not support multiple symbols name in URL as a parameter. Send only one ID/Symbol name at a time with the request.
Accepted Parameters :
pair1 = EUR & pair2 = USD (Use both at a time) OR
symbol = EUR/USD
amount = 200
access_key = API_KEY
Note: Forex currency converter also support all crypto currencies ids.
https://fcsapi.com/api-v2/forex/converter?id=1&amount=200&access_key=API_KEYCurrency Converter API example 2:
https://fcsapi.com/api-v2/forex/converter?symbol=EUR/USD&amount=200&access_key=API_KEYConverter API example 3:
https://fcsapi.com/api-v2/forex/converter?pair1=EUR&pair2=USD&amount=200&access_key=API_KEYResponse:
{
"price_1x_EUR": "1.0212418", // 1 EUR = USD
"price_1x_USD": "0.9792", // 1 USD = EUR
"total": "195.84" // Total Price x amount (Amount * 1 USD) = Total (USD)
},
Forex latest price API is very useful, you must have to get in touch with the updated price of a currency That's why the latest prices are included in any API which is the most common part. We provide one or multiple currency prices at the same time, To do so, you just have to send the request with symbols parameter in API request and set it to one or more comma-separated codes of a currency.
Note: We update the prices of each currency in every 30 seconds or less.
Accepted Parameters :
id = {Any valid FX ID}
symbol = {Any valid FX symbol}
access_key = API_KEY
Request Credit Usage: 1 credit count for each 100 record returned (rounded up).
https://fcsapi.com/api-v2/forex/latest?id=1&access_key=API_KEYMultiple prices by ids:
https://fcsapi.com/api-v2/forex/latest?id=1,2,3,4&access_key=API_KEYMultiple prices by name:
https://fcsapi.com/api-v2/forex/latest?symbol=EUR/USD,USD/JPY,GBP/CHF&access_key=API_KEYResponse:
{
"symbol": "EUR/USD",
"price": "1.1192", // Price
"change": "0.0042", // Change in 1 day candle
"change_per: "2.1%", // Change in percentage
"last_changed": "2019-08-01 12:30:00" // When update last time
},
{
"symbol": "USD/JPY",
"price": "106.04",
"change": "-0.22",
"change_per: "-0.21%",
"last_changed": "2019-08-01 12:30:00"
},
{and more}
Note: Above all are not latest price it is just for sample response, you can use API to get latest price. On the base of 1 currency, it will return all quote prices of all available currencies.
Accepted Parameters :
symbol = {Any FX/Crypto currency symbol} e.g: EUR,USD, JPY etc
access_key = API_KEY
type = {forex OR crypto} => default: forex
If type = forex, & symbol = EUR, so you'll receive quotes of 140+ Forex currencies, e.g: EUR/JPY,EUR/GBP
If type = forex, & symbol = BTC, so you'll receive quotes of 140+ Forex currencies, e.g: BTC/USD, BTC/EUR
If type = crypto, & symbol = EUR, so you'll receive quotes of 1500+ Crypto currencies, e.g: EUR/BTC, EUR/ETH
If type = crypto, & symbol = BTC, so you'll receive quotes of 1500+ Forex currencies, e.g: BTC/ETH, BTC/LTC
Candle API by ID:
https://fcsapi.com/api-v2/forex/base_latest?symbol=USD&type=forex&access_key=API_KEYResponse:
Return all quotes of all currencies in forex/crypto, depend what "type" parameter value you specified.
{
"AED":"4.0637",
"AUD":"1.6511",
"CNH":"7.7612568",
"CAD":"1.4647722",
"CHF":"1.0668943"
"TRY":"6.6214",
"USD":"1.1063171",
"XAU":"0.0007008"
{and more...}
},
Note: Above all are not current quote price it is just for sample response, you can use API to get current quote price. Return all related currencies of required currency. If you enter USD in parameter value, then response will return all currencies of USD e.g: EUR/USD, JPY/USD, GBP/USD, PKR/USD ... etc/USD
Accepted Parameters :
symbol = {Any currency symbol} e.g: EUR,USD, JPY etc
access_key = API_KEY
type = {forex,crypto or both} => default: forex
If type = forex, and symbol = USD, then you will receive all Forex currency that contain USD in name.
If type = forex, and symbol = BTC, then you will receive all Forex currency that contain BTC in name.
If type = crypto, and symbol = EUR, then you will receive all Crypto currencies that contain EUR in name.
If type = both, and symbol = EUR, then you will receive all Forex and crypto currencies that contain EUR in name.
Candle API by ID:
https://fcsapi.com/api-v2/forex/cross?symbol=USD&access_key=API_KEYResponse:
Return all currencies that contains USD in currency
{
"symbol": "EUR/USD",
"price": "1.1192", // Price
"change": "0.0042", // Change in 1 day candle
"change_per: "2.1%", // Change in percentage
"last_changed": "2019-08-01 12:30:00" // When update last time
},
{
"symbol": "USD/JPY",
"price": "106.04",
"change": "-0.22",
"change_per: "-0.21%",
"last_changed": "2019-08-01 12:30:00"
},
{and more}
We provide the last candle price of a currency to our users and it is also the useful part of API. Here, you can get single or multiples candle prices at the same time. To get the candle OHLC prices, you just have to append the symbols parameter with the URL request, and append single or multiple comma-separated currency codes.
Note : Last Forex Candle API only support ID/Symbols of Popular currencies list as described above in the "All Symbols List" Section.
Accepted Parameters :
id = {Any popular FX ID}
symbol = {Any popular FX symbol}
period = {Chart time period}
access_key = API_KEY
Request Credit Usage: 1 credit count for each 100 record returned (rounded up).
https://fcsapi.com/api-v2/forex/candle?id=1&period=1h&access_key=API_KEY
https://fcsapi.com/api-v2/forex/candle?id=1,2,3,4&period=1h&access_key=API_KEYCandle API by Symbol Name:
https://fcsapi.com/api-v2/forex/candle?symbol=EUR/USD&period=1h&access_key=API_KEY
https://fcsapi.com/api-v2/forex/candle?symbol=EUR/USD,USD/JPY,GBP/CHF&period=1h&access_key=API_KEYResponse:
The candle response only returns 1 last candle of each single currency and time period from the chart. If you want only latest price (without open/high/low), Please use "Latest Price" API, If you need more previous candles please use Forex Historical API.
{
"symbol": "EUR/USD", // 1 Hour Candle
"candle": {
"o": "0.9765", // Open
"h": "0.9806", // High
"l": "0.9765", // Low
"c": "0.9792", // Close
"t": 1665712800000, // Unix Time (UTC) (Candle Time)
"tm": "2022-10-14 02:00:00" // Date Time (UTC) (Candle Time)
}
},
{
"symbol": "JPY/CHF",
"candle": {
"o": "147.36",
"h": "147.45",
"l": "147.09",
"c": "147.31",
"t": 1665712800000,
"tm": "2022-10-14 02:00:00"
}
},
{and more}
You want to know about the historical exchange prices to compare the latest exchange price with the previous rates to watch the market. In our forex history API we provide the historical exchange price data for all supported symbols. Old prices are available for most symbols all the way back to the year of 1995. You can see the historical rates by appending a date (format YYYY-MM-DD) in API URL with the base URL and specify the period parameter values: {1m,5m, 30m, 1h, 5h, 1d, 1w, month}
Accepted Parameters :
id = {Any valid FX ID}
symbol = {Any valid Fx symbol}
period = {TimeFrame period}
from = {Date from} & To = {date to} (Use both at a time or ignore both for latest history)
access_key = API_KEY
If you always need the latest history candles, then you must have to take care of From/To parameter, that should not be assigned and remove them from URL, Then it will work better.
Note: Below API does not support multiple IDs in URL as a Parameter. You have to send only one ID or Symbol name at a time with the request.
We provide a simple and easy to use latest historical API which returns the previous 300 candle which is the latest and easy to watch the latest market.
https://fcsapi.com/api-v2/forex/history?id=1&period=1h&access_key=API_KEY
https://fcsapi.com/api-v2/forex/history?symbol=EUR/USD&period=1h&access_key=API_KEYHistory Between Specific Date {YYYY-MM-DD}
Returns the specific period historical exchange rate data between two specified dates for all available symbols by using FROM/TO parameters. Here symbol would be two currencies with the slash between them and put the first date in FROM while putting the second date in TO. So you can get the historical data of the exchange rate for a specific period.
https://fcsapi.com/api-v2/forex/historyOr Between Specific Date-Time
?symbol=EUR/USD
&period=1d
&from=2022-12-01
&to=2023-06-04
&access_key=API_KEY
https://fcsapi.com/api-v2/forex/history?symbol=EUR/USD&period=1d&from=2022-12-01T12:00&to=2023-06-04T12:00&access_key=API_KEYResponse:
Response It will return the response for the above forex historical API with different index keys(o, h, l, c, t, tm) which shows the open, high, low, close, time in unix, and time in standard format values for the data of specific historical candles in forex
The History API returns a maximum of 300 candles in just 1 response, whether or not you set parameters (from/to).
Note: Historical data my be delay from 1 minute to 5 minute.
{
"symbol": "EUR/USD",
"candle": {
"o": "0.9765", // Open
"h": "0.9806", // High
"l": "0.9765", // Low
"c": "0.9792", // Close
"t": 1665712800000, // Time Unix Format (UTC)
"tm": "2022-10-14 02:00:00" // Date Time (UTC)
},
{and 300 more historical candles},
}
In the forex market, it is up to the investor how they analyze the previous and the current market trend before investing in forex and make a profitable entry. Market Trend / Signals API is specially developed for those peoples who want to know market trends or want to develop forex indicator. Our Indicators OR Buy/Sell Signals are calculated on the base of the previous 300 candles in a specific time period.
Check below different kinds of signals or indicators data.
In financial markets, a pivot point is a support/resistance level is a helper that is used by traders as a possible indicator of market movement. A pivot point is calculated as an average of significant prices (high, low, close) from the performance of a market in the prior trading period. It will indicate to you about the Resistances and supports in a forex trading.
Our PP, resistance and support points are calculated on previous high open close.
Accepted Parameters :
id = {Any valid ID}
symbol = {Any valid symbol}
period = {any valid supported time frames}
access_key = API_KEY
Note: Below API does not support multiple ids in URL as a parameter. Send only 1 ID/Symbol name at a time with API request.
https://fcsapi.com/api-v2/forex/pivot_points?id=2&period=1d&access_key=API_KEY
https://fcsapi.com/api-v2/forex/pivot_points?symbol=JPY/CHF&period=1d&access_key=API_KEYResponse:
{
"oa_summary": "Strong Buy", // Overall Summary Buy/Sell based on Moving Avg and Technical Indicators
"pivot_point": {
"Classic": {
"pp": "1.260046", // Pivot Points
"R1": "0.933058", // Resistance 1
"R2": "0.806942", // Resistance 2
"R3": "0.719172", // Resistance 3
"S1": "0.933014", // Support 1
"S2": "0.806912", // Support 2
"S3": "0.719105" // Support 3
},
{ "Fibonacci": {...} },
{ "Camarilla": {...} },
{ "Woodies": {...} },
{ "Demarks": {...} } // High /Low
}
}
Moving Average (MA) is a trend indicator. MA lines are used by traders to check the average market value on the base of previous (5,10,20,50,100,200) candles. This API can help you to know MA values of the last active candle. Now you dont need to worry about, how to calculate simple MA (moving average) lines, how to SMA calculated, what is moving averages rules to calculate, so we take care of all these problem for you, we calculate all SMA and EMA values for you. if you wanted to get SMA of a 5min or 7days period, you would add the period min/days in period parameter.
Response Contains "Simple Moving Average(SMA)" and "Exponential Moving Average(EMA)" values
Accepted Parameters :
id = {Any valid FX ID}
symbol = {Any valid FX symbol}
period = {any valid supported time frames}
access_key = API_KEY
Note: Below API does not support multiple ids in URL as a parameter. Send only 1 ID/Symbol name at a time with API request.
https://fcsapi.com/api-v2/forex/ma_avg?id=2&period=1d&access_key=API_KEY
https://fcsapi.com/api-v2/forex/ma_avg?symbol=JPY/CHF&period=1d&access_key=API_KEYResponse:
{
"oa_summary": "Strong Buy",
// OverAll Summary Buy/Sell based on Moving Avg and Technical Indicators
"count": { "Total_Buy": "8", "Total_Sell": "3", "Total_Neutral": "1" },
// Count Total Buys, Sells and Neutral
"ma_avg": {
"SMA": { // Simple Moving Averages
// v=Value, s=Signal
"MA5": { "v": 0.8600, "s": "Buy" }, // Based on 5 candles SMA
"MA10": { "v": 0.8800, "s": "Buy" }, // Based on 10 candles SMA
"MA20": { "v": 0.7952, "s": "Sell" }, // Based on 20 candles SMA
"MA50": { "v": 0.7976, "s": "Buy" },
"MA100": { "v": 0.6894, "s": "Buy" },
"MA200": { "v": 0.6580, "s": "Neutral" }
},
"EMA": { // Exponential Moving Averages
"MA5": { "v": 0.8600, "s": "Buy" }, // Based on 5 candles EMA
"MA10": { "v": 0.8800, "s": "Buy" }, // Based on 10 candles EMA
"MA20": { "v": 0.7952, "s": "Sell" }, // Based on 20 candles EMA
"MA50": { "v": 0.7976, "s": "Buy" },
"MA100": { "v": 0.6894, "s": "Buy" },
"MA200": { "v": 0.6580, "s": "Sell" }
},
"summary": "Buy" // Buy/Sell judgment only based on Moving Avg
}
}
Technical indicators are calculated with the help of top forex indicators (MA,RSI,STOCH,ATR etc). The Collection of Indicators Powerful & Profitable Forex Trading Strategies and Systems that work. It is developed to get the latest technical indicator values. In response, you will get the values of top indicators. Technical indicator values are the real-time updated value. The current data point derives the new and latest data point of a given exchange pair of currency.
Accepted Parameters :
id = {Any valid FX ID}
symbol = {Any valid FX symbol}
period = {any valid supported time frames}
access_key = API_KEY
Note: Below API does not support multiple ids in URL as a parameter. Send only one ID/Symbol name at a time with API request.
https://fcsapi.com/api-v2/forex/indicators?id=2&period=1d&access_key=API_KEY
https://fcsapi.com/api-v2/forex/indicators?symbol=JPY/CHF&period=1d&access_key=API_KEYResponse:
{
"oa_summary": "Strong Buy",
// OverAll Summary Buy/Sell based on Moving Avg and Technical Indicators
"count": { "Total_Buy": "6" , "Total_Sell": "1", "Total_Neutral": "1" },
// Count Total Buys, Sells and Neutral
"indicators": {
"RSI": { "v": 57.823, "s": "Buy" }, // RSI (14)
"STOCH": { "v": 76.209, "s": "Buy" }, // Stochastic (9,6)
"STOCHRSI": { "v": 81.306, "s": "Overbought" }, // STOCH (14,6) + RSI(14)
"MACD": { "v": "0.001", "s": "Buy" }, // MACD (12,26)
"Williams": { "v": -19.355, "s": "Overbought" }, // Williams %R
"CCI": { "v": 105.315, "s": "Buy" }, // CCI (14)
"ATR": { "v": 0.0007 , "s": "Less Volatility" }, // ATR (14)
"UO": { "v": 65.45, "s": "Buy" }, // Ultimate Oscillator
"ROC": { "v": 0.142, "s": "Buy" }, // ROC
"summary": "Strong Buy" // Buy/Sell judgment only based on above Indicators
}
}
Prices, Market trends and signals are not designed for trading purpose, These signals are only for education or non-commercial purpose use. Data contained in this application/website is not necessarily real-time nor accurate and so prices may not be accurate and may differ from the actual market price, meaning prices are indicative and not appropriate for trading purposes. Therefore we doesn`t bear any responsibility for any trading losses you might incur as a result of using this data.
Latest price minimum refresh rate is 5 Seconds