Overview
Twelve Data provides real-time and historical stock, forex, cryptocurrency, and ETF market data through a clean and well-documented REST API. It supports over 12,000 financial instruments across global exchanges and offers a generous free tier with 800 API credits per day. Beginners will find it approachable thanks to clear documentation, a free plan, and straightforward API key authentication.
Beginner Tip
Each API call consumes a different number of credits on the free plan — simple quote requests use 1 credit while technical indicator endpoints use more. Check the credits cost in the docs before building to avoid unexpected limits.
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Example Response
Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.
{
"status": "success",
"data": {
"result": "Data from Twelve Data",
"description": "Stock market data (real-time & historical)",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
price Current market price of the requested symbol as a string (convert to float for calculations). symbol The ticker symbol that was queried. open Opening price for the current trading day (available in the /quote endpoint). close Previous closing price of the security. volume Trading volume for the current session. datetime Timestamp of the data point in YYYY-MM-DD HH:MM:SS format. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://api.twelvedata.com/price?symbol=AAPL&apikey=YOUR_API_KEY";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Metadata Score Breakdown
Estimated from metadata — endpoint not independently tested
Metadata estimate · endpoint not independently tested
Technical Specifications
Related Tags
Alternatives to Twelve Data
Technical alternatives for different use cases.
Covers stocks, forex, crypto with technical indicators
Free tier generosity (fewer API calls)
Multi-asset class data from a single API
Similar APIs
View All →Aletheia
Aletheia provides financial data including insider trading filings, earnings call transcripts, and financial statements for US-listed companies.
Alpaca
Alpaca provides real-time and historical market data for US equities and ETFs, along with commission-free trading capabilities.
Alpha Vantage
⭐ Beginner's PickAlpha Vantage delivers free real-time and historical stock, forex, and cryptocurrency data through a simple REST API.
Bank Data API
Bank Data API lets you instantly validate IBAN and SWIFT/BIC numbers to make sure bank account details are correct before processing a payment.
Billplz
Billplz is a payment platform API focused on the Malaysian market that lets you create bills and collect payments online.