
A Stock Quote API can provide real-time market data, allowing developers to access current stock prices, historical data, and other relevant information.
This data can be used to build financial applications, such as stock tracking tools or investment analysis software.
Stock Quote APIs often rely on data feeds from reputable sources, like exchanges or financial institutions.
These APIs typically offer a range of features, including real-time updates, historical data, and customizable data points.
Getting Started
You can access live stock market data through the quotes API, which fetches a real-time top of book level 1 stock quote for all U.S.-traded stocks and ETFs.
This API endpoint displays both bid, ask, mid, and last prices by default. You can control for latency by using the timestamp of the quote.
To use the API, you'll need to be on a paid plan to receive real-time data.
The API provides real-time and historic data for various financial instruments, including stocks, options, mutual funds, and ETFs.
API Features
The FCS API delivers real-time stock exchange rate data for 30+ Countries and 25,000+ Stocks. It provides different API endpoints for various data responses, including the latest price for all or a specific pair of stock.
The API also retrieves historical stocks data for one or multiple stocks, technical indicators for market analyzing, and stock performance, which includes company income, cash flow, earnings, and financial reporting.
Here are some key features of the API:
- Delivers real-time stock exchange rate data
- Provides different API endpoints for various data responses
- Retrieves historical stocks data
- Provides technical indicators for market analyzing
- Includes stock performance data
Simple Integration
Integrating our API is a breeze, and you can do it in just a few minutes using our SDKs and spreadsheet add-ins.
We've made it easy to get started, and our documentation is designed to be user-friendly, so you can quickly get up and running.
Our SDKs are available for various programming languages, making it easy to integrate our API into your existing projects.
You can also use our spreadsheet add-ins to easily access our API data within your favorite spreadsheet software.
Developer-Centric
As a developer, you want to integrate our stock market data into your project with minimal hassle. Our API is designed to be developer-centric, allowing you to focus on building a great product.
We support modern languages, including Python, Golang, and more. This means you can write less code and spend more time on what matters. With our API, you can integrate our stock market data into your project quickly and easily.
You can find sample code and examples to get you started. Our API also comes with extensive reference data, so you can learn more about how it works. You can even get responses with metadata, which can be super helpful for debugging.
Here are some of the key features of our API:
- Sample code & examples
- Extensive reference data
- Responses with metadata
- JSON & CSV formats
- Changelog, roadmap & new features voting
We also offer a simple way to get started with our API. Here's an example of how you can use our Python client to get started:
- from twelvedata import TDClient
- td = TDClient(apikey="YOUR_API_KEY_HERE")
- ts = td.time_series(symbol="TSLA", interval="1min", outputsize=12)
- print(ts.as_json())
You can also use our WebSocket API to get real-time data. Here's an example of how you can use it:
- # pip install twelvedata[websocket]
- from twelvedata import TDClient
- def on_event(e):
- print(e)
- td = TDClient(apikey="YOUR_API_KEY_HERE")
- ws = td.websocket(symbols="TSLA", on_event=on_event)
- ws.connect()
- ws.keep_alive()
All Supported List

Getting all the supported stocks can be a bit overwhelming, but don't worry, the API has got you covered. You can get a list of all supported stocks names, ids, short name, and country name.
The API offers various parameters to filter the list, including country, indices_id, sector, and exchange. For example, you can specify a country name, such as "USA", to get a list of stocks from that country.
To get the list of all countries, exchanges, and sectors, you can check the API's documentation. The API requires an access key, which is your API key, to retrieve the list.
Here's a list of the parameters you can use to filter the list:
- country={any valid supported country name}
- indices_id={any valid supported indices id} (country will ignore)
- sector={any valid sector, e.g: technology, construction} (optional)
- exchange={any valid exchange name e.g: NYSE, BSE, JPX} (optional)
Performance
To get stock performance, you can use the Performance endpoint. This endpoint allows you to retrieve stock performance data based on various parameters.
You can specify the stock ID, symbol, country, or index ID to get the desired data. For example, you can get all stocks from a specific country by using the country parameter.
If you want to get all stocks from a specific index, you can use the indices_id parameter. Alternatively, you can use the index_id parameter to get only the data for a particular index.
You can also filter the data by exchange name or sector name. The access_key parameter is required to access this endpoint, and it's only available to users with a Pro or above subscription.
Request and Response
To get started with the Stock Quote API, you'll need to understand the request and response format. The API accepts a variety of parameters, including symbols, detailFlag, requireEarningsDate, and overrideSymbolCount.
The symbols parameter is required and allows you to specify one or more symbols for equities or options, up to a maximum of 25. For equities, this is simply the stock ticker, such as GOOG. For options, it's a more complex string consisting of six elements separated by colons.
The detailFlag parameter is optional and determines the market fields returned from a quote request. It can be set to ALL, FUNDAMENTAL, INTRADAY, OPTIONS, WEEK_52, or MF_DETAIL.
Here's a summary of the request parameters:
The response format will depend on the parameters you pass in, but it will typically include the latest price of the stock, as well as other relevant market data.
Request
To make a request to the API, you'll need to know what properties to include and what types of data to expect in the response.
The API requires a "symbols" property, which is a path parameter, and it must be included in the request. This property should contain one or more comma-separated symbols for equities or options, up to a maximum of 25.
You can also include optional query parameters such as "detailFlag", which determines the market fields returned from a quote request. The allowable values for this parameter are ALL, FUNDAMENTAL, INTRADAY, OPTIONS, WEEK_52, and MF_DETAIL.
Here is a summary of the required and optional query parameters:
Return
The return is a crucial part of the API request and response process. You'll receive a response from the API, which can be in the form of a JSON object or a simple string.
The response will contain various fields, including the quote details, which depend on the detailFlag input parameter. For example, if detailFlag is ALL, AllQuoteDetails are displayed. If detailFlag is MF_DETAIL, the MutualFund structure gets displayed.
The quote details can include the date and time of the quote, the date and time of the quote in Coordinated Universal Time (UTC), and the status of the quote. The status can be REALTIME, DELAYED, CLOSING, EH_REALTIME, EH_BEFORE_OPEN, EH_CLOSED, INDICATIVE_REALTIME, or INVALID.
You can also receive the product details for the symbol the quote has been requested for, as well as the latest price for a specific stock or multiple stocks.
Here are the possible values for the quote status:
The response will also include any error messages if the request was invalid or if there was an issue with the API.
Data Formats and Limits
We support two main data formats for our stock quote API: JSON and CSV.
The JSON format is the default, but you can easily switch to CSV by changing the 'fmt=json' parameter to 'fmt=csv' or removing the parameter altogether.
Our API is designed to be flexible and accommodate different needs, making it a great choice for developers.
Json/Csv Formats
JSON and CSV formats are supported for live (delayed) stock price data.
You can easily switch between JSON and CSV output by modifying a single parameter. If you prefer CSV output, simply change 'fmt=json' to 'fmt=csv' or remove the parameter altogether.
Daily Limits
Our API has a daily limit of 100,000 requests, with each symbol request counting as 1 API call. This means if you're requesting multiple tickers with 10 symbols, it'll consume 10 API calls.
You can make up to 100,000 requests in a single day without hitting any limits. This is a generous allowance, but it's essential to keep track of your usage to avoid any potential issues.
For example, a request for multiple tickers with 10 symbols will consume 10 API calls. This can quickly add up, especially if you're working with large datasets or making frequent requests.
Remember, it's always a good idea to keep an eye on your API usage to ensure you stay within the daily limits. This will help prevent any unexpected issues or errors.
Market Data
The Market Data API is a powerful tool for getting the latest stock prices. You can use it to get the prices of one or multiple stocks at the same time.
To get the latest price of a stock, simply append the stock ID or symbol to your API request and set it to one or more by comma-separated. For example, you can get the price of Apple stock from specific exchanges by using the symbol with the exchange parameter.
Prices update every 30 seconds, so you can get the most up-to-date information. You can also use the API to get prices for indices, countries, and sectors, and it will ignore the ID or symbol parameter if you use one of these options.
US & International Market Data
You can access live stock market data from almost all symbols and exchanges worldwide with the Live Stock Market API.
The API supports multiple tickers in a single request and provides prices with a 15-20 minute delay. You can also get data with a 1-minute interval, receiving prices at a 1-minute frequency.
The API offers real-time top of book level 1 stock quotes for all U.S.-traded stocks and ETFs, with default display of bid, ask, mid, and last prices.
You can control for latency by using the timestamp of the quote, but only users on paid plans will receive real-time data from the API.
Here are some key features of the API:
You can also get historical candlestick data from the API, with OHLCV candles available at various resolutions, including 1 minute through monthly.
Indices
Indices are a crucial part of the stock market, and accessing them is easier than you think. You can get all the list of supported indices in your favorite country by simply entering its name.
To do this, you'll need to use the "All Stocks List" API, which requires a valid country name and an API key. The country name should match one of the supported country names, which can be used to retrieve the list of indices.
You can use these indices IDs in the "All Stocks List" API to get the list of indices for a specific country. This is a straightforward process that can be completed with just a few pieces of information.
Data Retrieval
Data Retrieval is a breeze with our Stock Quote API. You can get historical candlestick data using the candles API endpoint, which returns OHLCV candles at any resolution from 1 minute to monthly.
To get started, you can use the "DEMO" API key to test the data for a few tickers only, such as AAPL.US, TSLA.US, VTI.US, AMZN.US, BTC-USD.CC, and EUR-USD.CC. These tickers are available without limitations for real-time data.
You can also register for the free plan to receive your API key, which grants access to End-Of-Day Historical Stock Market Data API for any ticker within the past year, but with a limit of 20 API calls per day.
To access the necessary type of data without limitations, we recommend exploring our plans, starting from $19.99.
Getting Live
You can get live stock market data via the quotes API, which fetches real-time top of book level 1 stock quotes for all U.S.-traded stocks and ETFs. This API endpoint displays bid, ask, mid, and last prices by default.
The API supports almost all symbols and exchanges worldwide, with prices provided with a 15-20 minute delay. You can also receive prices at a 1-minute interval, meaning you get prices at 1-minute frequency.
To request multiple tickers at once, you can use a single request, which is convenient for data retrieval. The API supports JSON and CSV formats, making it easy to work with the data.
Here are some examples of how to use the API:
You can start with the "DEMO" API key to test the data for a few tickers only, such as AAPL.US, TSLA.US, VTI.US, and others. This will give you access to all types of data, including real-time data, without limitations.
Getting Historical Data
Getting Historical Data is a crucial step in any data analysis project. You can get historical candlestick data from the API using the candles endpoint.
This endpoint returns OHLCV candles at any resolution you need, from 1 minute to monthly. It only provides historical candles up through the previous trading day.
To get historical price data, use the Historical Price API. This API returns historical candle price data for a specific stock.
You can query the API by appending a date in YYYY-MM-DD format to the base URL and specifying the period time. Accepted parameters include id, symbol, period, from, to, level, and access_key.
If you need the latest history, don't set the From/To parameter, as it will work better. The API returns the previous 900 candles, which is the latest.
Data Details
The Stock Quote API provides detailed information about stocks, options, and indices. This includes the name of the company associated with the equity, option, or index, which is represented as a string.
The API also provides earnings per share (EPS) on a rolling basis for stocks, as well as the estimated earnings. Additionally, it includes the highest and lowest prices at which a security has traded during the past year (52 weeks).
Here are some key data points that can be obtained from the API:
Extended Hour Detail
The Extended Hour Detail is a crucial aspect of trading, providing real-time information about securities. It's essential to understand the various properties that make up this detail.
The lastPrice property is a number that represents the price of the most recent trade of a security. This value is updated in real-time.
The change property is a number that indicates the dollar value of the difference between the previous and present executed price. This value is also updated in real-time.
The percentChange property is a number that shows the percentage value of the difference between the previous and present executed price. This value is also updated in real-time.
The bid property is a number that represents the bid price of the symbol. The bidSize property is an integer that shows the number of shares or contracts offered by a broker or dealer at the bid price.
Here is a summary of the properties that make up the Extended Hour Detail:
Understanding these properties is essential for making informed trading decisions.
Fundamental Details
Fundamental Details are a crucial aspect of understanding a stock's performance. You can get stock fundamental details to track stock performance for screening.
The Fundamental Quote Details include properties like companyName, which is the name of the company associated with the equity, option, or index. This property is a string.
The earnings per share (EPS) is also a key property, which is a number that represents the earnings per share on a rolling basis. This applies only to stocks.
Another important property is estEarnings, which is the estimated earnings. This property is also a number.
The high52 property represents the highest price at which a security has traded during the past year (52 weeks). For options, this value is the lifetime high.
The lastTrade property is the most recent trade price for a security, which is a number.
Here are some key Fundamental Quote Details properties:
In addition to these properties, you can also get Intraday Quote Details, which include properties like ask, bid, and lastTrade. These properties provide real-time information about the stock's current price and trading activity.
Technical Indicator
Technical Indicator is a powerful tool that can help you make informed investment decisions. You can calculate top stock indicators like MA, RSI, STOCH, and ATR using the Stock Technical Indicator API.
The API provides the values of these indicators, and you can derive the new data point from the current data point of a given exchange pair of currency. The accepted parameters include id, symbol, period, and access_key.
You can send only one ID or symbol name at a time with the API request, and it does not support multiple IDs in the URL as a parameter. The API also allows you to search for any currency with similar words, and the search query will find results in both full name and short name.
The response will return up to 20 results, and you can filter the results using the strict parameter, which can have values 0 or 1. The type parameter can have values index, stock, or both, with a default value of both.
Pivot-Points
Pivot-Points are calculated as an average of important prices from the display of an exchange in a prior trading period.
They show you about the Resistances and supports in a stock-trading.
Our Pivot-Points, resistance, and support points are determined on previous high open close.
You can use the Stocks Pivot-Points API to get this information.
Accepted parameters for the API include id, symbol, period, and access_key.
Note that the API doesn't support multi ids in the URL as a parameter.
Frequently Asked Questions
Which stock API is best?
There isn't a single "best" stock API, as the choice depends on your specific needs and goals. Consider our Core Stock API for fundamental data, or our Technical Indicator API for advanced analysis.
Featured Images: pexels.com