Twelve Data API
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
Example 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
const url = "https://twelvedata.com/";
// 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
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
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.