Twelve Data Market API

Type:
twelve_data• Category:flow• Tags:markets,stocks,crypto,forex,indicators,ohlc,twelvedata
Description
Twelve Data provides access to over 100,000 financial symbols from various markets, including stocks, forex, cryptocurrencies, ETFs, and commodities. This allows you to obtain data from more than 250 exchanges worldwide.
Parameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
api_key | string | Key API can be obtained at twelvedata.com, avaliable free key with limited access. | no | |
cache | boolean | Enable caching of API responses in Redis to reduce API calls frequency | no | false |
cache_time | number | Cache expiration time in seconds (60s - 24h). Default: 300s (5 minutes) | no | 300 |
operation_group | string | Group of operations to select from | no | "core" |
core_operation | string | Core operations | no | "time_series" |
company_operation | string | Company data operations | no | "profile" |
financials_operation | string | Financial statements and stats | no | "statistics" |
calendars_operation | string | Market calendars | no | "dividends_calendar" |
etfs_operation | string | ETFs endpoints | no | "etfs_list" |
mutual_funds_operation | string | Mutual funds endpoints | no | "mutual_funds_list" |
analyst_operation | string | Analyst and estimates endpoints | no | "earnings_estimate" |
utility_operation | string | Utility endpoints | no | "last_change" |
operation | hidden | no | ||
symbol | autocomplete | Symbol or comma-separated symbols (e.g., AAPL,MSFT or BTC/USD) | no | |
interval | string | Data interval | no | "1day" |
outputsize | number | Number of data points, max 5000 | no | 100 |
start_date | date | Start date (YYYY-MM-DD or ISO datetime) | no | |
end_date | date | End date (YYYY-MM-DD or ISO datetime) | no | |
timezone | string | Timezone, e.g., America/New_York | no | |
order | string | Sort order | no | |
country | string | Country filter | no | |
limit | number | Limit rows where supported | no | |
period | string | Period for fundamentals (e.g., annual|quarterly|ttm) | no | |
region | string | Region filter | no | |
currency | string | Currency filter (e.g., USD, EUR) | no | |
family | string | Family filter for ETFs and mutual funds | no | |
etf_type | string | ETF type filter | no | |
mf_type | string | Mutual fund type filter | no | |
indicator | string | no | ||
second_symbol | autocomplete | Second symbol (for pairwise indicators like beta, correl) | no | |
time_period | number | no | ||
series_type | string | no | ||
fastperiod | number | no | ||
slowperiod | number | no | ||
signalperiod | number | no | ||
exchange | string | no | ||
type | string | no | ||
target | string | Endpoint name to query last_change for (e.g., price, quote) | no |
Help
Overview
Twelve Data offers programmatic access to more than.100,000 financial symbols across a wide range of asset classes—stocks, forex, cryptocurrencies, ETFs, and commodities. The service aggregates data from over 250 exchanges worldwide, enabling you to retrieve price histories, corporate fundamentals, earnings information, and option‑related metrics through a single, consistent API. The worker described below acts as a thin wrapper around the official twelvedata Python client. By supplying a small set of parameters you can request any of the supported data types (price series, company profile, dividends, splits, earnings, etc.) and receive the result as JSON ready for downstream analysis.
Connect to Twelve Data API for market data: time series, quotes, and technical indicators.
Available operations:
- time_series: Historical/intraday OHLCV for one or multiple symbols
- quote: Realtime quote snapshot
- price: Realtime price only
- indicator: Technical indicators (sma, ema, rsi, macd, bbands)
- indicator: Technical indicators (sma, ema, rsi, macd, bbands, beta, correl, linearreg, linearregangle, linearregintercept, linearregslope, max, maxindex, min, minindex, stddev, tsf, var)
- symbol_search: Find tradable symbols by query
- exchanges: List supported exchanges
- profile: Company profile
- fundamentals: Fundamental data snapshot
- dividends: Historical dividends
- splits: Stock splits
- earnings: Earnings calendar/history
- logo: Company logo URL
- dividends_calendar: Upcoming/past dividend events
- splits_calendar: Upcoming/past split events
- earnings_calendar: Upcoming/past earnings events
- ipo_calendar: Upcoming/past IPOs
- market_cap: Current market capitalization
- statistics: Key statistics
- statistics: Key statistics
- earnings_estimate: Analyst earnings estimates
- revenue_estimate: Analyst revenue estimates
- eps_trend: EPS trend
- eps_revisions: EPS revisions
- growth_estimates: Growth estimates
- recommendations: Analyst recommendations
- price_target: Price target
- analyst_ratings_light: Analyst ratings (light)
- analyst_ratings_us_equities: Analyst ratings (US equities)
- income_statement: Income statement
- income_statement_consolidated: Consolidated income statement
- balance_sheet: Balance sheet
- balance_sheet_consolidated: Consolidated balance sheet
- cash_flow: Cash flow statement
- cash_flow_consolidated: Consolidated cash flow statement
- etfs_list: List ETFs
- etfs_world: Global ETFs overview
- etfs_world_summary: Regional/sector summary
- etfs_world_performance: Performance metrics
- etfs_world_risk: Risk metrics
- etfs_world_composition: Composition breakdown
- etfs_family: ETFs by family
- etfs_type: ETFs by type
- mutual_funds_list: List mutual funds
- mutual_funds_world: Global mutual funds overview
- mutual_funds_world_summary: Regional/sector summary
- mutual_funds_world_performance: Performance metrics
- mutual_funds_world_risk: Risk metrics
- mutual_funds_world_ratings: Ratings overview
- mutual_funds_world_composition: Composition breakdown
- mutual_funds_world_purchase_info: Purchase info
- mutual_funds_world_sustainability: Sustainability metrics
- mutual_funds_family: Mutual funds by family
- mutual_funds_type: Mutual funds by type
Common parameters:
- api_key: Twelve Data API key (or set TWELVE_DATA_API_KEY env)
- operation: One of [time_series, quote, price, indicator, symbol_search, exchanges]
Time Series:
- symbol: Single or comma-separated symbols, e.g. AAPL,MSFT or BTC/USD,EUR/USD
- interval: 1min,5min,15min,30min,45min,1h,2h,4h,1day,1week,1month
- outputsize: Number of data points to return (default 100)
- start_date/end_date: Optional date range filters (YYYY-MM-DD or ISO datetime)
- timezone: E.g. America/New_York
- order: asc or desc
Indicators:
- indicator: sma|ema|rsi|macd|bbands
- symbol, interval required
- time_period (e.g. 14), series_type (open|high|low|close)
- macd params: fastperiod, slowperiod, signalperiod
Examples:
-
Get daily OHLC for AAPL last 200 bars { "operation": "time_series", "symbol": "AAPL", "interval": "1day", "outputsize": 200 }
-
Get 15min OHLC for BTC/USD { "operation": "time_series", "symbol": "BTC/USD", "interval": "15min", "outputsize": 300 }
-
Realtime price for MSFT { "operation": "price", "symbol": "MSFT" }
-
RSI(14) for AAPL daily { "operation": "indicator", "indicator": "rsi", "symbol": "AAPL", "interval": "1day", "time_period": 14, "series_type": "close" }
-
Search symbols "tesla" { "operation": "symbol_search", "symbol": "tesla" }
Notes:
- Free plans have request limits; consider adding brief delays in workflows
- Crypto and forex symbols are supported (e.g., BTC/USD, EUR/USD)
- Some indicators require specific params; see Twelve Data docs for details