JSON API Documentation

FCS API

Powered by 30+ exchange rate data sources, the FCS API is capable of delivering real-time exchange rate data for 170 world currencies. The API comes with multiple endpoints, each serving a different use case. Endpoint functionalities include getting the latest exchange rate data for all or a specific set of currencies, converting amounts from one currency to another, retrieving Time-Series data for one or multiple currencies and querying the API for daily fluctuation data.

Throughout this documentation you will learn about API structure, methods, potential errors and code examples. In case there any question is left unanswered, please make sure to contact us and our team will be happy to help out.

Get Started

FCS API is designed to quiest access tool. Use any programming language to hit on API url, you will get response in normal JSON format.
Use Javascript (Ajax), PHP (Curl or file_get_content), Java OR android (HttpURLConnection), C# (httpWebRequest)

API Access Key
You need API key in order to access our database. Your API 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.

API:

https://fcsapi.com/api/forex/list?access_key=API_KEY
Sign up for a free using the button below to use the FCS Quick start tool.
Signup

Parameters

Parameters Details
ID Specify Symbol id, If you want history record of "EUR/USD" you need to send its id in URL parameters
Values: 1,2,3... etc, Default: none
To get all list of ID's or Symbols use "List API" below.
Symbol Its use to get specific currency/stock data from database by name.
Values: EUR/USD OR EUR/USD,USD/JPY etc, Default: none
Note: If ID parameter exist in URL than symbol parameter will be ignored. You can use ID or Symbol parameter both will return same result.
Period It is required when you want symbol history, So you need to specify which time frames data you want.
Values: 5m, 15m, 30m,1h, 5h, 1d, 1w, month
OR Alternate: 5, 15, 30,60, 300, 1440, 10080, 43200 Default: 1h
From
(Optional)
When you access history data of any symbol and you want history data from specific date, you need to specify date between from/to date
Format: YYYY-MM-DD OR YYYY-MM-DDTHour:Min
E.g: 2018-01-11 OR 2018-01-11T12:20 Default: none
To
(Optional)
when you access history data, Format: YYYY-MM-DD
E.g: 2018-02-11 OR 2018-01-11T12:20 Default: none
Note: When you not specify FROM and TO parameters, then history will return latest 300 candles.
Type
(Optional)
Only used in "List Api", when you want specific type of symbols Forex/Crypto currency
Default: both Values: Forex, Crypto or both
Output
(Optional)
Default: json
Supported output: json, object, xml, serialize and array

Supported Symbols List

You can get all list of supported currencies names.

API:

Return All symbols, You need to use these symbols in Latest Price API, Price conversation, Historical and for Technical signals.

https://fcsapi.com/api/forex/list?access_key=API_KEY
https://fcsapi.com/api/forex/list?type=forex&access_key=API_KEY
https://fcsapi.com/api/forex/list?type=crypto&access_key=API_KEY
API Famous Symbols List:

Return most used symbols, you can use these symbols to get "latest candle" price.

https://fcsapi.com/api/forex/list?top_symbol=1&access_key=API_KEY
Response:
{ 
  "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}
{5000+ More Crypto Currencies}

Price Converter

The most common part of API is to get price conversation. To do so, simply append the FCS API's symbols parameter to your API request.
Parameters :
&pair1 = EUR
&pair2 = USD
&amount = 200
&access_key = API_KEY

Price conversation:
https://fcsapi.com/api/forex/converter?pair1=EUR&pair2=USD&amount=200&access_key=API_KEY
Price conversation example 2:
https://fcsapi.com/api/forex/converter?symbol=EUR/USD&amount=200&access_key=API_KEY
Pair Conversation by ID:
https://fcsapi.com/api/forex/converter?id=1&amount=200&&access_key=API_KEY
Response:
{ 
  "price_1x"1.1128, // 1 EUR/USD
  "total"222.56, // Price x amount = Total
},

Latest Price

The most common part of API is to get latest price of currency, You can get one or multiple currency prices at the same time. To do so, simply append the FCS API's symbols parameter to your API request and set it to one or more comma-separated currency codes.
Note: Prices update in every 30 seconds

Price of one symbol:
https://fcsapi.com/api/forex/latest?id=1&access_key=API_KEY
Multiple prices by ids:
https://fcsapi.com/api/forex/latest?id=1,2,3,4,5&access_key=API_KEY
Multiple prices by name:
https://fcsapi.com/api/forex/latest?symbol=EUR/USD,USD/JPY,GBP/CHF&access_key=API_KEY
Response:
{ 
  "symbol""EUR/USD",
  "price""1.1192", // Price
  "change""0.0042", // Change in 1day candle
  "change_per"2.1%", // Change in percentage
  "trend""Buy", // Trend Up/Down
  "last_changed""2019-08-01 12:30:00", // When price changed last time
},
{
  "symbol""USD/JPY",
  "price""106.04", // Price
  "change""-0.22", // Change in 1day candle
  "change_per"-0.21%", // Change in percentage
  "trend""Sell", // Trend Up/Down
  "last_changed""2019-08-01 12:30:00", // When price changed last time
},
{and more}

Last Candle Prices (Open,High,Low,Close)

The most common part of API is to get latest price of currency, You can get one or multiple currency prices at the same time. To do so, simply append the FCS API's symbols parameter to your API request and set it to one or more comma-separated currency codes.
Note : Last Candle only support for top symbols list, as described in "Supported List API"

Get price of one symbol:
https://fcsapi.com/api/forex/candle?id=1&period=1h&access_key=API_KEY
OR with name:
https://fcsapi.com/api/forex/candle?symbol=EUR/USD&period=1h&access_key=API_KEY
Get price of multiple symbols:
https://fcsapi.com/api/forex/candle?symbol=EUR/USD,USD/JPY,GBP/CHF&period=1h&access_key=API_KEY
Response:

Latest response only return, last candle of 5 minute time frame chart. If you want only latest price, Please use "Price API_KEY" price.

{ 
  "symbol""EUR/USD", // 1 Hour Candle
  "candle": {
     "o""1.1126", // Open
     "h""1.1129", // High
     "l""1.1126", // Low
     "c""1.1128", // Close
     "t"1571781600000, // Unix Time (UTC) (Candle Time)
     "tm""2019-10-22 22:00:00", // Date Time (UTC) (Candle Time)
  }
},
{
  "symbol""JPY/CHF",
  "candle": {
     "o""108.48",
     "h""108.48",
     "l""108.44",
     "c""108.45",
     "t"1571781600000,
     "tm""2019-10-22 22:00:00",
  }
},
{and more}

Historical Price API

Returns historical exchange prices data for a specific symbol. Historical rates are available for most symbols all the way back to the year of 1995. You can query the FCS API for historical rates by appending a date (format YYYY-MM-DD) to the base URL and specify the time period {5m,15m,30m,1h,5h,1d,1w,month}

Quick Last 300 Candles History
https://fcsapi.com/api/forex/history?symbol=EUR/USD&period=1h&access_key=API_KEY
https://fcsapi.com/api/forex/history?id=1&period=1h&access_key=API_KEY
Response especially to show into Graphic Charts

Return response in specific json format so you can use it directly in graph charts. Develop for HTML/JS charts.

https://fcsapi.com/api/forex/history?symbol=EUR/USD&period=1h&access_key=API_KEY&chart=1
History Between Specific Date {YYYY-MM-DD}
Returns daily historical exchange rate data between two specified dates for all available symbols. Use FROM/TO parameters.
https://fcsapi.com/api/forex/history 
   ?symbol=EUR/USD
   &period=1d
   &from=2019-04-01
   &to=2019-10-21
   &access_key=API_KEY
Or Between Specific Date-Time
https://fcsapi.com/api/forex/history?symbol=EUR/USD&period=1d&from=2019-04-01T12:00&to=2019-10-21T12:00&access_key=API_KEY
Response:
{
  "symbol""EUR/USD",
  "candle": {
     "o""1.1126", // Open
     "h""1.1129", // High
     "l""1.1126", // Low
     "c""1.1128", // Close
     "t"1571781600000, // Time Unix Format (UTC)
     "tm""2019-10-22 22:00:00", // Date Time (UTC)
  },
  {and 300 more historical candles},
}

Market Trends / Signals API

Market Trend / Signals API is specially develop for those peoples who want to know market trends or want to develop EA. Our Indicators OR Buy/Sell Signals are calculated on the base of previous 300 candles in specific time period.
Check below different kinds of signals or indicators data.

Pivot Points API

In financial markets, a pivot point is a price level 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.
Our PP, resistance and support points are calculated on previous (high,open,close) prices.

API:
https://fcsapi.com/api/forex/pivot_points?symbol=JPY/CHF&period=1d&access_key=API_KEY
Response:
Response include latest candle PP, Resistance and support points.
{
"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 Averages API (MA Lines)

Moving Average (MA) is a trend indicator. MA lines are used by traders to check average market value on the base of previous (5,10,20,50,100,200) candles. This API can help you know MA values of last active candle.
Response Contains "Simple Moving Average(SMA)" and "Exponential Moving Average(EMA)" values

API:
https://fcsapi.com/api/forex/ma_avg?symbol=JPY/CHF&period=1d&type=SMA&access_key=API_KEY
Response:
Response get latest candle's Moving average values with Magic trend (Buy/Sell)
{ 
 "oa_summary": "Strong Buy", // OverAll Summary Buy/Sell based on Moving Avg and Technical Indicators
 "count": {"maBuy":"8" , "maSell":"4"}, // Count Total Buys and Sells
  "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""Sell", }
     }
     "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", }
     }
  }
}

Technical Indicator API

The Collection of Forex Indicators Powerful & Profitable Forex Trading Strategies and Systems that work. It is develop to get latest technical indicator values. In Response you will get values of top indicators.

API:
https://fcsapi.com/api/forex/indicators?symbol=JPY/CHF&period=1d&access_key=API_KEY
Response:
{ 
 "oa_summary": "Strong Buy", // OverAll Summary Buy/Sell based on Moving Avg and Technical Indicators
 "count": {"tiBuy":"6" , "tiSell":"1"}, // Count Total Buys and Sells
  "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)
     "ADX": { "v"26.437, "s""Neutral", } // ADX (14)
     "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)
     "Highs_Lows": { "v"0.0007 , "s""Less Volatility", } // Highs/Lows (14)
     "UO": { "v"65.45, "s""Buy", } // Ultimate Oscillator
     "ROC": { "v"0.142, "s""Buy", } // ROC
     "Bull_Bear": { "v"-0.0030, "s""Sell", } // Bull/Bear Power (13)
     "summary": "Strong Buy", // Buy/Sell judgment only based on above Indicators
  }
}

Sample Code PHP

Real-time rates: Find below a simple PHP example for getting exchange rate data via the FCS API's latest endpoint.

$access_key = "API_KEY"; // Your API access key, Signup to get API KEY 
$symbol = "EUR/USD"; // Currency pairs

// Enter your API URL below
$api_url = "https://fcsapi.com/api/forex/latest?symbol=".$symbol."&access_key=".$access_key;

// Initialize CURL:
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch); // Store the data
curl_close($ch);

$response = json_decode($json, true); // convert JSON into Array
foreach ($response['data'] as $key => $value) {
  echo "Open Price Of ".$value['symbol']." is ".$value['candle']['o']; // Open Price Of EUR/USD is 1.1266
  echo "Close Price Of ".$value['symbol']." is ".$value['candle']['c']; // Close Price Of EUR/USD is 1.1277
}

Disclaimer

Prices, Market trends and signals are not design 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.
Latest price minimum refresh rate is 20 Seconds