*) 1 minute historical data add
*) Indices data add
*) Stock Dividends/Yields add
*) Add 20K more stocks from different countries
*) For security GET request is deprecated now you can pass parameters in POST request format
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 30+ exchange rate data sources, the FCS API delivering real-time stock exchange rate data for 30+ Countries and 25,000+ Stocks. The FCS provides different API endpoints, each serving a different data response. FCS provides the latest price for all or a specific pair of stock, retrieving historical stocks data for one or multiple stocks, technical indicators for market analyzing, and stock performance includes company income, cash flow, earnings, and financial reporting.
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.
FCS API is designed to quickly access tools. Use any programming language to hit on API URL, you will get a response in standard JSON format.
Use Javascript (Ajax), PHP (Curl or file_get_content), Java OR android (HttpURLConnection), C# (httpWebRequest) or CURL from command line
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.
Note: Maximum 10 API request allow/minute. Please use multiple ids in the API URL to reduce API requests.
Sample API:
https://fcsapi.com/api-v2/stock/list?Indices_id=1&access_key=API_KEYSign up for free using the button below to use the FCS Quickstart tool.
All APIs endpoint count 1 credit per URL request. But Latest API endpoint count 1 credit per 100 record return.
Parameters | Details |
---|---|
ID | Specify Symbol id, Set id in URL parameter to get a stock response Default: none. Values: 1,2,3... etc, To get all list of Stock ID's or Symbols use "List API" below. |
Symbol | Symbol parameter uses to get specific stock data by symbol name from the database. Default: none. Values: {Any valid stock symbol name} Note: At least one "id" or "symbol" is required. If the ID parameter exists in URL than the symbol parameter will be ignored. You can use any 1 parameter (ID or Symbol) both will return the same result. |
Country | It is required when you use "All Stocks list" API, so you will get all stock from your selected country. Support 30 Countries Default: none. Valid Values: brazil, canada, china, denmark, germany, hong-kong, india, indonesia, ireland, japan, malaysia, mexico, netherlands, pakistan, philippines, russia, saudi-arabia, singapore, south-africa, south-korea, spain, sweden, switzerland, thailand, turkey, united-arab-emirates, united-kingdom, united-states, Note: You can set 1 or more country names to get all stocks from multiple countries by comma-separated names. |
Indices_id | When you need all stocks or all component from specific indices. Set indices_id={indices_id} in URL parameter. Default: none. Valid Values: {any valid indices id as shown in "Stock Indices" API} Note: You can set 1 or more indices id to get all stocks from multiple indices id by comma-separated ids. Note: If the "Country" parameter exists in URL than the "indices" parameter will be ignored. |
Period | It is required in a few API requests, 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: 5m, 15m, 30m,1h, 5h, 1d, 1w, month OR Alternate: 5, 15, 30,60, 300, 1440, 10080, 43200 |
From (Optional) | When you access history API of any stock and you need historical data from a specific date, you need to specify date between from/to date by using (from, to) parameter Default: none Date 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 history API. Default: none Date Format: YYYY-MM-DD E.g: 2018-01-31 OR YYYY-MM-DDTHour:Min E.g: 2018-01-31T12:30 Note: When you do not specify FROM and TO parameters, then history 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. |
Output (Optional) | Set your API response format. Default: json Valid Values: json, 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 indices in your favorite country. You can use these indices ids in the "All Stocks List" API. Enter your indice's country name to get all its indices list.
Parameters:
country={any valid supported country name}
access_key=API_KEY
https://fcsapi.com/api-v2/stock/indices?country=indonesia&access_key=API_KEYIndices by multiple country:
https://fcsapi.com/api-v2/stock/indices?country=japan,turkey,indonesia&access_key=API_KEYResponse:
{
"id": 1, // Indicies ID
"country": "United-states",
"category_name": "Nasdaq 100" // Indicies Name
},
{
"id": 2,
"country": "Japan",
"category_name": "Topix 500" // Indicies Name
},
{and more}
You can get all list of our supported stocks names, ids, short name and country name.
Parameters:
country={any valid supported country name}
indices_id={any valid supported indices id} (optional)
access_key=API_KEY
https://fcsapi.com/api-v2/stock/list?country=United-states&access_key=API_KEY
https://fcsapi.com/api-v2/stock/list?country=United-states,Japan&access_key=API_KEYStock list by indices id:
https://fcsapi.com/api-v2/stock/list?indices_id=1&access_key=API_KEY
https://fcsapi.com/api-v2/stock/list?indices_id=1,2,3&access_key=API_KEYResponse:
{
"stock_id": 1,
"name": "Advanced Micro Devices Inc",
"symbol": "AMD",
"country": "United-states"
},
{
"stock_id": 2,
"name": "Apple Inc",
"symbol": "AAPL",
"country": "United-states"
},
{Many More Stock List}
The most common part of API is to get the latest price of stocks, You can get one or multiple stock prices at the same time. To do so, simply append the stock ID/symbol parameter to your API request and set it to one or more by comma-separated.
Note: Prices update in every 30 seconds
Parameters:
id={any valid supported stock id}
symbol={any valid supported stock short name}
access_key=API_KEY
Request Credit Usage: 1 credit count for each 100 record returned (rounded up).
https://fcsapi.com/api-v2/stock/latest?id=1&access_key=API_KEY
https://fcsapi.com/api-v2/stock/latest?id=1,2,3,4,5&access_key=API_KEYStocks by symbol:
https://fcsapi.com/api-v2/stock/latest?symbol=AMD,AAPL,MSFT,FB&access_key=API_KEYResponse:
{
"id": "5",
"symbol": "Microsoft", // Stock ID
"price": "188.89", // Current Price
"high": "190.38", // High
"low": "183.66", // Low
"chg": "+5.61", // Change in 1 Day
"chg_percent: "+3.06%", // Change in percentage in 1 Day
"dateTime": "2019-10-15 12:30:00" // When price changed last time
},
{and more}
You can get one or multiple indices prices at the same time. To do so, simply append the indices ID parameter to your API request and set it to one or more by comma-separated.
Parameters:
id={any valid supported indices id}
access_key=API_KEY
Request Credit Usage: 1 credit count for each 100 record returned (rounded up).
https://fcsapi.com/api-v2/stock/indices_latest?id=1&access_key=API_KEY
https://fcsapi.com/api-v2/stock/indices_latest?id=1,2,3,4,5&access_key=API_KEYResponse:
{
"id": "2", // Indices ID
"symbol": "Nasdaq 100",
"price": "8450.54", // Current Price
"high": "8480.24", // High
"low": "8445.74", // Low
"chg": "+5.61", // Change in 1 Day
"chg_percent: "+3.06%", // Change in percentage in 1 Day
"dateTime": "2019-10-15 12:30:00" // When price changed last time
},
{and more}
Returns stocks historical candle price data for a specific stock. Historical rates are available for most stocks all the way back to the year of the stock starting date. You can query the FCS API for historical rates by appending a date (format YYYY-MM-DD) to the base URL and specify the period time {5m, 15m, 30m,1h, 5h, 1d, 1w, month}
Accepted Parameters :
id = {Any valid Stock ID}
symbol = {Any valid stock short name}
period = {Any valid time period}
from = {History date from} & To = {date to} (Use both at a time or ignore both for latest)
access_key = API_KEY
If you always need the latest history, then please do not set From/To parameter, it will work better.
Note: Below API does not support multiple ids in URL as a parameter. Send only 1 ID/Symbol name at a time with the API request.
https://fcsapi.com/api-v2/stock/history?id=1&period=1h&access_key=API_KEY
https://fcsapi.com/api-v2/stock/history?symbol=IBM&period=1h&access_key=API_KEY
https://fcsapi.com/api-v2/stock/history?indices_id=1&period=1h&access_key=API_KEYHistory Between Specific Date {YYYY-MM-DD}
https://fcsapi.com/api-v2/stock/historyOr Between Specific Date-Time
?id=1
&period=1d
&from=2023-09-01
&to=2024-03-27
&access_key=API_KEY
https://fcsapi.com/api-v2/stock/history?id=1&period=1d&from=2023-09-01T12:00&to=2024-03-27T12:00&access_key=API_KEYResponse:
{
"symbol": "FB",
"candle": {
"o": "134.22", // Open
"h": "136.48", // High
"l": "134.15", // Low
"c": "135.22", // Close
"t": 1711497600, // Time Unix Format (UTC)
"tm": "2024-03-27" // Date Time (UTC)
},
{and 300 more historical candles},
}
You can get dividends last and historical data in single request. To do so, simply append the stock ID/symbol parameter to your API request.
Parameters:
id={any valid supported stock id}
symbol={any valid supported stock short name}
access_key=API_KEY
https://fcsapi.com/api-v2/stock/dividend?id=1&access_key=API_KEYStocks by symbol:
https://fcsapi.com/api-v2/stock/dividend?symbol=AAPL&access_key=API_KEYResponse:
{
"dividend_date": "2020-02-07", // Announced date
"dividend": "0.77", // Dividend Rate
"type": "Quarterly", // Dividend Period
"type_short": "3M", // Period short,(1M,3M,6M,12M,TTM)
"payment_date": "2020-02-13", // Dividend payment date
"yeild": "1.03%", // Yeild
},
{and more history}
Technical indicators are calculated with the help of top chart indicators (MA, RSI, STOCH, ATR etc). The collection of chart indicators powerful & profitable stock trading strategies and systems that work. It is developed to get latest technical indicator values. In Response you will get a result of top indicators.
Parameters:
id={any valid supported stock id}
symbol={any valid supported stock short name}
access_key=API_KEY
https://fcsapi.com/api-v2/stock/technicals?id=1&access_key=API_KEY
https://fcsapi.com/api-v2/stock/technicals?id=1,2,3,4,5&access_key=API_KEYTechnical Stocks by symbol:
https://fcsapi.com/api-v2/stock/technicals?symbol=TSLA,MSFT,FB&access_key=API_KEYResponse:
{
"id": 1,
"symbol": "TSLA",
"hourly": "Strong Buy",
"daily": "Sell",
"weekly": "Strong Sell",
"monthly": "Strong Sell"
},
{and more}
Get stock performance, when and how much stock price performs.
Parameters:
id={any valid supported stock id}
symbol={any valid supported stock short name}
access_key=API_KEY
https://fcsapi.com/api-v2/stock/performance?id=1&access_key=API_KEY
https://fcsapi.com/api-v2/stock/performance?id=1,2,3,4,5&access_key=API_KEYPerformance by symbol:
https://fcsapi.com/api-v2/stock/performance?symbol=TSLA,MSFT,FB&access_key=API_KEYResponse:
{
"id": 1,
"symbol": "MSFT",
"daily": "+1.6 %",
"week": "-9.29 %",
"month": "+2.6 %",
"ytd": "+15.62 %",
"year": "+52.6 %",
"year3": "-23.47 %"
},
{and more}
Get stock fundamental to track stock performance for screening.
Stock Fundamental API:https://fcsapi.com/api-v2/stock/fundamental?id=1,2,3,4,5&access_key=API_KEY
https://fcsapi.com/api-v2/stock/fundamental?id=1&access_key=API_KEYFundamental API by Symbol:
https://fcsapi.com/api-v2/stock/fundamental?symbol=IBM,AMD,AAPL&access_key=API_KEYResponse:
{
"id": 1,
"symbol": "MYTX",
"avg_vol_3m": "5.05K",
"market_cap": "139.74B",
"revenue": "163.95B",
"pe_ratio": "48.65",
"beta": "2"
},
{and more}
Finance is a heart of stock, You can get all current and historical income of stock, Balance and cash flow.
Below are 4 different API sample URLs.
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.
Parameters:
id={any valid supported stock id}
symbol={any valid supported stock short name}
access_key=API_KEY
duration=annual {valid values: interim/annual} (interim=4 months there are 3 interim in year, annual = 1 year)
By using duration parameter you can get yearly or 4 months data.
https://fcsapi.com/api-v2/stock/income?id=1&access_key=API_KEYBalance API:
https://fcsapi.com/api-v2/stock/balance?id=1&access_key=API_KEYCash Flow API:
https://fcsapi.com/api-v2/stock/cash?id=1&access_key=API_KEYEarnig API:
https://fcsapi.com/api-v2/stock/earning?id=1&access_key=API_KEYResponse:
{
"id": 1,
"symbol": "FB",
"type": "Income",
"report": "Annual",
"data": "{...}" // more detail
}
Get all details of company about their address, no of employees, equity type, sector and origin country. You can get one or multiple stock details at the same time. To do so, simply append the FCS API's stock symbols/ids parameter to your API request and set it to one or more comma-separated symbols/ids.
Parameters:
id={any valid supported stock id}
symbol={any valid supported stock short name} (optional)
access_key=API_KEY
https://fcsapi.com/api-v2/stock/profile?id=1&access_key=API_KEYMultiple prices by ids:
https://fcsapi.com/api-v2/stock/profile?id=1,2,3,4&access_key=API_KEYMultiple prices by name:
https://fcsapi.com/api-v2/stock/profile?symbol=TSLA,MSFT,FB,AAPL&access_key=API_KEYResponse:
{
"id": 1,
"symbol": "NFLX",
"name": "Netflix Inc",
"country": "United-states",
"sector": "Services",
"industry": "Broadcasting & Cable TV",
"employees": "7000",
"equity_type": "ORD",
"info": {
"Address": "---",
"City": "Los Gatos",
"Postal_code": "CA 95032-1815",
"Country": "United-states",
"Phone": "+1-408-996****",
"Fax": "+1-408-996****",
"Website": "-"
},
},
{and more}
Stock Prices, Profile, Market trends and signals, and historical data are not designed for trading purpose, These signals are only for education or noncommercial 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.