openapi: 3.2.0
info:
description: "## Overview\n\nWelcome to Twelve Data developer docs — your gateway to comprehensive financial market data through a powerful and easy-to-use API.\nTwelve Data provides access to financial markets across over 50 global countries, covering more than 1 million public instruments, including stocks, forex, ETFs, mutual funds, commodities, and cryptocurrencies.\n\n## Quickstart\n\nTo get started, you'll need to sign up for an API key. Once you have your API key, you can start making requests to the API.\n\n### Step 1: Create Twelve Data account\n\nSign up on the Twelve Data website to create your account [here](https://twelvedata.com/register). This gives you access to the API dashboard and your API key.\n\n### Step 2: Get your API key\n\nAfter signing in, navigate to your [dashboard](https://twelvedata.com/account/api-keys) to find your unique API key. This key is required to authenticate all API and WebSocket requests.\n\n### Step 3: Make your first request\n\nTry a simple API call with cURL to fetch the latest price for Apple (AAPL):\n\n```\ncurl \"https://api.twelvedata.com/price?symbol=AAPL&apikey=your_api_key\"\n```\n\n### Step 4: Make a request from Python or Javascript\n\nUse our client libraries or standard HTTP clients to make API calls programmatically. Here’s an example in [Python](https://github.com/twelvedata/twelvedata-python) and [Node.js](https://github.com/twelvedata/twelvedata-node):\n\n#### Python (using official Twelve Data SDK):\n\n```python\nfrom twelvedata import TDClient\n\n# Initialize client with your API key\ntd = TDClient(apikey=\"your_api_key\")\n\n# Get latest price for Apple\nprice = td.price(symbol=\"AAPL\").as_json()\n\nprint(price)\n```\n\n#### JavaScript (Node.js):\n\n```javascript\nimport { MarketDataApi, CreateConfig } from \"@twelvedata/twelvedata-node\";\n\nconst config = CreateConfig('your_api_key');\nconst api = new MarketDataApi(config);\n\nasync function main() {\n const response = await api.getPrice({\n symbol: \"AAPL\",\n });\n console.log(response.data);\n}\n\nmain().catch(console.error);\n```\n\n### Step 5: Perform correlation analysis between Tesla and Microsoft prices\n\nFetch historical price data for Tesla (TSLA) and Microsoft (MSFT) and calculate the correlation of their closing prices:\n\n```python\nfrom twelvedata import TDClient\nimport pandas as pd\n\n# Initialize client with your API key\ntd = TDClient(apikey=\"your_api_key\")\n\n# Fetch historical price data for Tesla\ntsla_ts = td.time_series(\n symbol=\"TSLA\",\n interval=\"1day\",\n outputsize=100\n).as_pandas()\n\n# Fetch historical price data for Microsoft\nmsft_ts = td.time_series(\n symbol=\"MSFT\",\n interval=\"1day\",\n outputsize=100\n).as_pandas()\n\n# Align data on datetime index\ncombined = pd.concat(\n [tsla_ts['close'].astype(float), msft_ts['close'].astype(float)],\n axis=1,\n keys=[\"TSLA\", \"MSFT\"]\n).dropna()\n\n# Calculate correlation\ncorrelation = combined[\"TSLA\"].corr(combined[\"MSFT\"])\nprint(f\"Correlation of closing prices between TSLA and MSFT: {correlation:.2f}\")\n```\n\n### Authentication\n\nAuthenticate your requests using one of these methods:\n\n#### Query parameter method\n```\nGET https://api.twelvedata.com/endpoint?symbol=AAPL&apikey=your_api_key\n```\n\n#### HTTP header method (recommended)\n```\nAuthorization: apikey your_api_key\n```\n\n##### API key useful information\n
\n- Demo API key (
apikey=demo) available for demo requests \n- Personal API key required for full access
\n- Premium endpoints and data require higher-tier plans (testable with trial symbols)
\n
\n\n### API endpoints\n\n Service | Base URL |\n---------|----------|\n REST API | `https://api.twelvedata.com` |\n WebSocket | `wss://ws.twelvedata.com` |\n\n### Parameter guidelines\n\n- Separator: Use
& to separate multiple parameters \n- Case sensitivity: Parameter names are case-insensitive (
symbol=AAPL = symbol=aapl) \n- Multiple values: Separate with commas where supported
\n
\n\n### Response handling\n\n#### Default format\nAll responses return JSON format by default unless otherwise specified.\n\n#### Null values\nImportant: Some response fields may contain `null` values when data is unavailable for specific metrics. This is expected behavior, not an error.\n\n##### Best Practices:\n\n- Always implement
null value handling in your application \n- Use defensive programming techniques for data processing
\n- Consider fallback values or error handling for critical metrics
\n
\n\n#### Error handling\nStructure your code to gracefully handle:\n\n- Network timeouts
\n- Rate limiting responses
\n- Invalid parameter errors
\n- Data unavailability periods
\n
\n\n##### Best practices\n\n- Rate limits: Adhere to your plan’s rate limits to avoid throttling. Check your dashboard for details.
\n- Error handling: Implement retry logic for transient errors (e.g.,
429 Too Many Requests). \n- Caching: Cache responses for frequently accessed data to reduce API calls and improve performance.
\n- Secure storage: Store your API key securely and never expose it in client-side code or public repositories.
\n
\n\n## Errors\n\nTwelve Data API employs a standardized error response format, delivering a JSON object with `code`, `message`, and `status` keys for clear and consistent error communication.\n\n### Codes\n\nBelow is a table of possible error codes, their HTTP status, meanings, and resolution steps:\n\n Code | status | Meaning | Resolution |\n --- | --- | --- | --- |\n **400** | Bad Request | Invalid or incorrect parameter(s) provided. | Check the `message` in the response for details. Refer to the API Documentation to correct the input. |\n **401** | Unauthorized | Invalid or incorrect API key. | Verify your API key is correct. Sign up for a key here. |\n **403** | Forbidden | API key lacks permissions for the requested resource (upgrade required). | Upgrade your plan here. |\n **404** | Not Found | Requested data could not be found. | Adjust parameters to be less strict as they may be too restrictive. |\n **414** | Parameter Too Long | Input parameter array exceeds the allowed length. | Follow the `message` guidance to adjust the parameter length. |\n **429** | Too Many Requests | API request limit reached for your key. | Wait briefly or upgrade your plan here. |\n **500** | Internal Server Error | Server-side issue occurred; retry later. | Contact support here for assistance. |\n\n### Example error response\n\nConsider the following invalid request:\n\n```\nhttps://api.twelvedata.com/time_series?symbol=AAPL&interval=0.99min&apikey=your_api_key\n```\n\nDue to the incorrect `interval` value, the API returns:\n\n```json\n{\n \"code\": 400,\n \"message\": \"Invalid **interval** provided: 0.99min. Supported intervals: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 8h, 1day, 1week, 1month\",\n \"status\": \"error\"\n}\n```\n\nRefer to the API Documentation for valid parameter values to resolve such errors.\n\n## Libraries\n\nTwelve Data provides a growing ecosystem of libraries and integrations to help you build faster and smarter in your preferred environment. Official libraries are actively maintained by the Twelve Data team, while selected community-built libraries offer additional flexibility.\n\nA full list is available on our [GitHub profile](https://github.com/search?q=twelvedata).\n\n### Official SDKs\n\n\n### AI integrations\n\n- Twelve Data MCP Server: Repository — Model Context Protocol (MCP) server that provides seamless integration with AI assistants and language models, enabling direct access to Twelve Data's financial market data within conversational interfaces and AI workflows.
\n- Twelve Data integration for OpenClaw: Clawhub skill — Integration for the OpenClaw platform, allowing users to leverage Twelve Data's API within their OpenClaw applications.
\n- Twelve Data NEAR Agent: NEAR Agent — Access Twelve Data's API directly from NEAR's AI agent platform, enabling users to retrieve financial data and insights within their NEAR AI agent workflows.
\n
\n\n### Spreadsheet add-ons\n\n\n### Community libraries\n\nThe community has developed libraries in several popular languages. You can explore more community libraries on [GitHub](https://github.com/search?q=twelvedata).\n\n\n### Other Twelve Data repositories\n\n- searchindex (Go): Repository — In-memory search index by strings
\n- ws-tools (Python): Repository — Utility tools for WebSocket stream handling
\n
\n\n### API specification\n\n- OpenAPI / Swagger: Access the complete API specification in OpenAPI format. You can use this file to automatically generate client libraries in your preferred programming language, explore the API interactively via Swagger tools, or integrate Twelve Data seamlessly into your AI and LLM workflows.
\n
"
title: Twelve Data Analysis API
version: 0.0.1
servers:
- url: https://api.twelvedata.com/
security:
- authorizationHeader:
- '[]'
- queryParameter:
- '[]'
tags:
- name: analysis
paths:
/analyst_ratings/light:
get:
description: The analyst ratings snapshot endpoint provides a streamlined summary of ratings from analyst firms for both US and international markets. It delivers essential data on analyst recommendations, including buy, hold, and sell ratings, allowing users to quickly assess the general sentiment of analysts towards a particular stock.
operationId: GetAnalystRatingsLight
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: Filter by financial instrument global identifier (FIGI). This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
example: '594918104'
- description: Filter by exchange name
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '50'
x-go-name: Exchange
x-order: '50'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '55'
x-go-name: MicCode
x-order: '55'
example: XNAS
- description: Filter by rating change action
in: query
name: rating_change
schema:
$ref: '#/components/schemas/RatingChangeEnum'
x-go-name: RatingChange
x-order: '60'
- description: Number of records in response
in: query
name: outputsize
schema:
default: 30
format: int64
type: integer
x-go-name: PageSize
x-order: '70'
x-go-name: PageSize
x-order: '70'
- description: Filter by country name or alpha code, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '40'
x-go-name: Country
x-order: '40'
example: United States
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetAnalystRatingsLight_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Analyst ratings snapshot
tags:
- analysis
x-api-credits-cost: '75'
x-api-credits-type: symbol
x-group: Analysis
x-order: '80'
x-starting-plan: ultra,enterprise
x-url-hash: analyst-ratings-light
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/analyst_ratings/us_equities:
get:
description: The analyst ratings US equities endpoint provides detailed information on analyst ratings for U.S. stocks. It returns data on the latest ratings issued by various analyst firms, including the rating itself, the firm issuing the rating, and any changes in the rating. This endpoint is useful for users tracking analyst opinions on U.S. equities, allowing them to see how professional analysts view the potential performance of specific stocks.
operationId: GetAnalystRatingsUsEquities
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: Filter by financial instrument global identifier (FIGI). This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
example: '594918104'
- description: Filter by exchange name
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '50'
x-go-name: Exchange
x-order: '50'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '55'
x-go-name: MicCode
x-order: '55'
example: XNAS
- description: Filter by rating change action
in: query
name: rating_change
schema:
$ref: '#/components/schemas/RatingChangeEnum'
x-go-name: RatingChange
x-order: '60'
- description: Number of records in response
in: query
name: outputsize
schema:
default: 30
format: int64
type: integer
x-go-name: PageSize
x-order: '70'
x-go-name: PageSize
x-order: '70'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetAnalystRatingsUsEquities_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Analyst ratings US equities
tags:
- analysis
x-api-credits-cost: '200'
x-api-credits-type: symbol
x-group: Analysis
x-order: '90'
x-starting-plan: ultra,enterprise
x-url-hash: analyst-ratings-us
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/earnings_estimate:
get:
description: The earnings estimate endpoint provides access to analysts' projected earnings per share (EPS) for a specific company, covering both upcoming quarterly and annual periods. This data is crucial for users who need to track and compare expected financial performance across different timeframes, aiding in the evaluation of a company's future profitability.
operationId: GetEarningsEstimate
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: The FIGI of an instrument for which data is requested. This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '25'
x-required-group: symbol
x-go-name: Isin
x-order: '25'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '26'
x-required-group: symbol
x-go-name: Cusip
x-order: '26'
x-required-group: symbol
example: '594918104'
- description: The country where the instrument is traded, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '60'
x-go-name: Country
x-order: '60'
example: United States
- description: Exchange where instrument is traded
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '40'
x-go-name: Exchange
x-order: '40'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '50'
x-go-name: MicCode
x-order: '50'
example: XNAS
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetEarningsEstimate_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Earnings estimate
tags:
- analysis
x-api-credits-cost: '20'
x-api-credits-type: symbol
x-badge: Useful
x-group: Analysis
x-order: '10'
x-starting-plan: ultra,enterprise
x-url-hash: earning-estimate
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/eps_revisions:
get:
description: The EPS revisions endpoint provides updated analyst forecasts for a company's earnings per share (EPS) on both a quarterly and annual basis. It delivers data on how these EPS predictions have changed over the past week and month, allowing users to track recent adjustments in analyst expectations. This endpoint is useful for monitoring shifts in market sentiment regarding a company's financial performance.
operationId: GetEpsRevisions
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: Filter by financial instrument global identifier (FIGI). This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
example: '594918104'
- description: Filter by country name or alpha code, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '40'
x-go-name: Country
x-order: '40'
example: United States
- description: Filter by exchange name
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '50'
x-go-name: Exchange
x-order: '50'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '55'
x-go-name: MicCode
x-order: '55'
example: XNAS
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetEpsRevisions_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: EPS revisions
tags:
- analysis
x-api-credits-cost: '20'
x-api-credits-type: symbol
x-group: Analysis
x-order: '40'
x-starting-plan: ultra,enterprise
x-url-hash: eps-revisions
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/eps_trend:
get:
description: The EPS trend endpoint provides detailed historical data on Earnings Per Share (EPS) trends over specified periods. It returns a comprehensive breakdown of estimated EPS changes, allowing users to track and analyze the progression of a company's earnings performance over time. This endpoint is ideal for users seeking to understand historical EPS fluctuations and assess financial growth patterns.
operationId: GetEpsTrend
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: Filter by financial instrument global identifier (FIGI). This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
example: '594918104'
- description: Filter by country name or alpha code, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '40'
x-go-name: Country
x-order: '40'
example: United States
- description: Filter by exchange name
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '50'
x-go-name: Exchange
x-order: '50'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '55'
x-go-name: MicCode
x-order: '55'
example: XNAS
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetEpsTrend_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: EPS trend
tags:
- analysis
x-api-credits-cost: '20'
x-api-credits-type: symbol
x-group: Analysis
x-order: '30'
x-starting-plan: ultra,enterprise
x-url-hash: eps-trend
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/growth_estimates:
get:
description: The growth estimates endpoint provides consensus analyst projections on a company's growth rates over various timeframes. It aggregates and averages estimates from multiple analysts, focusing on key financial metrics such as earnings per share and revenue. This endpoint is useful for obtaining a comprehensive view of expected company performance based on expert analysis.
operationId: GetGrowthEstimates
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: The FIGI of an instrument for which data is requested. This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '40'
x-required-group: symbol
x-go-name: Cusip
x-order: '40'
x-required-group: symbol
example: '594918104'
- description: The country where the instrument is traded, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '50'
x-go-name: Country
x-order: '50'
example: United States
- description: Exchange where instrument is traded
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '60'
x-go-name: Exchange
x-order: '60'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '70'
x-go-name: MicCode
x-order: '70'
example: XNAS
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetGrowthEstimates_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Growth estimates
tags:
- analysis
x-api-credits-cost: '20'
x-api-credits-type: symbol
x-group: Analysis
x-order: '50'
x-starting-plan: ultra,enterprise
x-url-hash: growth-estimates
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/price_target:
get:
description: The price target endpoint provides detailed projections of a security's future price as estimated by financial analysts. It returns data including the high, low, and average price targets. This endpoint is useful for users seeking to understand potential future valuations of specific securities based on expert analysis.
operationId: GetPriceTarget
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: Filter by financial instrument global identifier (FIGI). This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
example: '594918104'
- description: Filter by country name or alpha code, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '40'
x-go-name: Country
x-order: '40'
example: United States
- description: Filter by exchange name
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '50'
x-go-name: Exchange
x-order: '50'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '55'
x-go-name: MicCode
x-order: '55'
example: XNAS
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetPriceTarget_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Price target
tags:
- analysis
x-api-credits-cost: '75'
x-api-credits-type: symbol
x-badge: High demand
x-group: Analysis
x-order: '70'
x-starting-plan: ultra,enterprise
x-url-hash: price-target
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/recommendations:
get:
description: The recommendations endpoint provides a summary of analyst opinions for a specific stock, delivering an average recommendation categorized as Strong Buy, Buy, Hold, or Sell. It also includes a numerical recommendation score, offering a quick overview of market sentiment based on expert analysis.
operationId: GetRecommendations
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: The FIGI of an instrument for which data is requested. This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '40'
x-required-group: symbol
x-go-name: Cusip
x-order: '40'
x-required-group: symbol
example: '594918104'
- description: The country where the instrument is traded, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '50'
x-go-name: Country
x-order: '50'
example: United States
- description: The exchange name where the instrument is traded, e.g., `Nasdaq`, `NSE`.
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '60'
x-go-name: Exchange
x-order: '60'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '65'
x-go-name: MicCode
x-order: '65'
example: XNAS
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetRecommendations_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Recommendations
tags:
- analysis
x-api-credits-cost: '100'
x-api-credits-type: symbol
x-badge: High demand
x-group: Analysis
x-order: '60'
x-starting-plan: ultra,enterprise
x-url-hash: recommendations
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
/revenue_estimate:
get:
description: The revenue estimate endpoint provides a company's projected quarterly and annual revenue figures based on analysts' estimates. This data is useful for users seeking insights into expected company performance, allowing them to compare forecasted sales with historical data or other companies' estimates.
operationId: GetRevenueEstimate
parameters:
- description: Filter by symbol
in: query
name: symbol
schema:
type: string
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
x-go-name: Symbol
x-order: '10'
x-required-group: symbol
example: AAPL
- description: Filter by financial instrument global identifier (FIGI). This parameter is available on the Ultra plan (individual) and the Enterprise plan (business) and above.
in: query
name: figi
schema:
type: string
x-go-name: Figi
x-order: '20'
x-required-group: symbol
x-go-name: Figi
x-order: '20'
x-required-group: symbol
example: BBG000B9Y5X2
- description: Filter by international securities identification number (ISIN). ISIN access is activating in the Data add-ons section
in: query
name: isin
schema:
type: string
x-go-name: Isin
x-order: '30'
x-required-group: symbol
x-go-name: Isin
x-order: '30'
x-required-group: symbol
example: US0378331005
- description: The CUSIP of an instrument for which data is requested. CUSIP access is activating in the Data add-ons section
in: query
name: cusip
schema:
type: string
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
x-go-name: Cusip
x-order: '31'
x-required-group: symbol
example: '594918104'
- description: Filter by country name or alpha code, e.g., `United States` or `US`
in: query
name: country
schema:
type: string
x-go-name: Country
x-order: '40'
x-go-name: Country
x-order: '40'
example: United States
- description: Filter by exchange name
in: query
name: exchange
schema:
type: string
x-go-name: Exchange
x-order: '50'
x-go-name: Exchange
x-order: '50'
example: NASDAQ
- description: The Market Identifier Code (MIC) of the exchange where the instrument is traded, e.g., XNAS, XLON.
in: query
name: mic_code
schema:
type: string
x-go-name: MicCode
x-order: '55'
x-go-name: MicCode
x-order: '55'
example: XNAS
- description: 'Number of decimal places for floating values.
Should be in range [0,11] inclusive'
in: query
name: dp
schema:
default: 5
format: int64
type: integer
x-go-name: DecimalPlaces
x-order: '60'
x-go-name: DecimalPlaces
x-order: '60'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetRevenueEstimate_200_response'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBadRequestErrorResponseBody'
description: ''
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiUnauthorizedErrorResponseBody'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiForbiddenErrorResponseBody'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiNotFoundErrorResponseBody'
description: ''
'414':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiParameterTooLongErrorResponseBody'
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiTooManyRequestsErrorResponseBody'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiInternalServerErrorResponseBody'
description: ''
summary: Revenue estimate
tags:
- analysis
x-api-credits-cost: '20'
x-api-credits-type: symbol
x-group: Analysis
x-order: '20'
x-starting-plan: ultra,enterprise
x-url-hash: revenue-estimate
x-required:
anyOf:
- required:
- symbol
- figi
- isin
- cusip
components:
schemas:
GetRecommendations_200_response_trends_current_month:
description: Current month recommendations
properties:
strong_buy:
description: Number of analysts that give a strong buy recommendation
examples:
- 13
format: int64
type: integer
x-go-name: StrongBuy
x-order: 10
buy:
description: Number of analysts that give a buy recommendation
examples:
- 20
format: int64
type: integer
x-go-name: Buy
x-order: 20
hold:
description: Number of analysts that give a hold recommendation
examples:
- 8
format: int64
type: integer
x-go-name: Hold
x-order: 30
sell:
description: Number of analysts that give a sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: Sell
x-order: 40
strong_sell:
description: Number of analysts that give a strong sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: StrongSell
x-order: 50
type: object
x-go-name: CurrentMonth
x-order: 10
GetPriceTarget_200_response_price_target:
description: Price target information
properties:
high:
description: Highest price target given by an analyst
examples:
- 220
format: double
type: number
x-go-name: High
x-order: 10
median:
description: Median price target given across analysts
examples:
- 185
format: double
type: number
x-go-name: Median
x-order: 20
low:
description: Lowest price target given by an analyst
examples:
- 136
format: double
type: number
x-go-name: Low
x-order: 30
average:
description: Average price target given across analysts
examples:
- 184.01
format: double
type: number
x-go-name: Average
x-order: 40
current:
description: Current price from of a security
examples:
- 169.5672
format: double
type: number
x-go-name: Current
x-order: 50
currency:
description: Currency in which the price targets values are quoted
examples:
- USD
type: string
x-go-name: Currency
x-order: 60
required:
- currency
type: object
x-go-name: PriceTarget
x-order: 20
GetPriceTarget_200_response:
properties:
meta:
$ref: '#/components/schemas/GetPriceTarget_200_response_meta'
price_target:
$ref: '#/components/schemas/GetPriceTarget_200_response_price_target'
status:
description: Response status
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- meta
- price_target
- status
type: object
GetRecommendations_200_response_trends_3_months_ago:
description: Three months ago recommendations
properties:
strong_buy:
description: Number of analysts that give a strong buy recommendation
examples:
- 13
format: int64
type: integer
x-go-name: StrongBuy
x-order: 10
buy:
description: Number of analysts that give a buy recommendation
examples:
- 20
format: int64
type: integer
x-go-name: Buy
x-order: 20
hold:
description: Number of analysts that give a hold recommendation
examples:
- 8
format: int64
type: integer
x-go-name: Hold
x-order: 30
sell:
description: Number of analysts that give a sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: Sell
x-order: 40
strong_sell:
description: Number of analysts that give a strong sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: StrongSell
x-order: 50
type: object
x-go-name: ThreeMonthsAgo
x-order: 40
GetEpsTrend_200_response:
properties:
meta:
$ref: '#/components/schemas/GetEarningsEstimate_200_response_meta'
eps_trend:
description: EPS trend data
items:
$ref: '#/components/schemas/GetEpsTrend_200_response_eps_trend_inner'
type: array
x-go-name: EpsTrend
x-order: 20
status:
description: Status of the response
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- eps_trend
- meta
- status
type: object
GetAnalystRatingsLight_200_response:
properties:
meta:
$ref: '#/components/schemas/GetAnalystRatingsLight_200_response_meta'
ratings:
description: List of analyst ratings
items:
$ref: '#/components/schemas/GetAnalystRatingsLight_200_response_ratings_inner'
type: array
x-go-name: Ratings
x-order: 20
status:
description: Response status
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- meta
- status
type: object
ApiInternalServerErrorResponseBody:
properties:
code:
description: Error code
examples:
- 500
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- Internal server error
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
GetRecommendations_200_response_meta:
description: Metadata about the symbol
properties:
symbol:
description: Symbol ticker of the instrument
examples:
- AAPL
type: string
x-go-name: Symbol
x-order: 10
name:
description: Name of the instrument
examples:
- Apple Inc
type: string
x-go-name: Name
x-order: 20
currency:
description: Currency in which the instrument is traded
examples:
- USD
type: string
x-go-name: Currency
x-order: 30
exchange_timezone:
description: Timezone of the exchange
examples:
- America/New_York
type: string
x-go-name: ExchangeTimezone
x-order: 40
exchange:
description: Exchange where the instrument is traded
examples:
- NASDAQ
type: string
x-go-name: Exchange
x-order: 50
mic_code:
description: Market identifier code (MIC) under ISO 10383 standard
examples:
- XNGS
type: string
x-go-name: MicCode
x-order: 60
type:
description: Type of the instrument
examples:
- Common Stock
type: string
x-go-name: Type
x-order: 70
required:
- currency
- exchange
- exchange_timezone
- mic_code
- name
- symbol
- type
type: object
x-go-name: Meta
x-order: 10
GetEpsRevisions_200_response_eps_revision_inner:
properties:
date:
description: Date of the EPS estimate
examples:
- '2022-09-30'
type: string
x-go-name: Date
x-order: 10
period:
description: Period of estimation, can be `current_quarter`, `next_quarter`, `current_year`, or `next_year`
examples:
- current_quarter
type: string
x-go-name: Period
x-order: 20
up_last_week:
description: Number of up revisions over the last 7 days
examples:
- 1
format: int64
type: integer
x-go-name: UpLastWeek
x-order: 30
up_last_month:
description: Number of up revisions over the last 30 days
examples:
- 5
format: int64
type: integer
x-go-name: UpLastMonth
x-order: 40
down_last_week:
description: Number of down revisions over the last 7 days
examples:
- 0
format: int64
type: integer
x-go-name: DownLastWeek
x-order: 50
down_last_month:
description: Number of down revisions over the last 30 days
examples:
- 0
format: int64
type: integer
x-go-name: DownLastMonth
x-order: 60
required:
- date
- period
type: object
ApiParameterTooLongErrorResponseBody:
properties:
code:
description: Error code
examples:
- 414
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- Input parameter array exceeds the allowed length
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
GetRecommendations_200_response_trends:
description: Analyst recommendations trends
properties:
current_month:
$ref: '#/components/schemas/GetRecommendations_200_response_trends_current_month'
previous_month:
$ref: '#/components/schemas/GetRecommendations_200_response_trends_previous_month'
2_months_ago:
$ref: '#/components/schemas/GetRecommendations_200_response_trends_2_months_ago'
3_months_ago:
$ref: '#/components/schemas/GetRecommendations_200_response_trends_3_months_ago'
type: object
x-go-name: Trends
x-order: 20
ApiForbiddenErrorResponseBody:
properties:
code:
description: Error code
examples:
- 403
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- API key lacks permissions for the requested resource
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
GetAnalystRatingsLight_200_response_ratings_inner:
properties:
date:
description: Date when the rating was released
examples:
- '2022-08-19'
type: string
x-go-name: Date
x-order: 10
firm:
description: Firm that issued the ranking
examples:
- Keybanc
type: string
x-go-name: Firm
x-order: 20
rating_change:
description: Defines the action of the firm to ranking, could be `Maintains`, `Upgrade`, `Downgrade`, `Initiates` or `Reiterates`
examples:
- Maintains
type: string
x-go-name: RatingChange
x-order: 30
rating_current:
description: Current firm's ranking of the instrument
examples:
- Overweight
type: string
x-go-name: RatingCurrent
x-order: 40
rating_prior:
description: Prior firm's ranking of the instrument
examples:
- Overweight
type: string
x-go-name: RatingPrior
x-order: 50
required:
- date
- firm
type: object
GetGrowthEstimates_200_response_growth_estimates:
description: Growth estimates data
properties:
current_quarter:
description: Projected growth of the current quarter in percentage (%)
examples:
- 0.016
format: double
type: number
x-go-name: CurrentQuarter
x-order: 10
next_quarter:
description: Projected growth of the next quarter in percentage (%)
examples:
- 0.01
format: double
type: number
x-go-name: NextQuarter
x-order: 20
current_year:
description: Projected growth of the current year in percentage (%)
examples:
- 0.087
format: double
type: number
x-go-name: CurrentYear
x-order: 30
next_year:
description: Projected growth of the next year in percentage (%)
examples:
- 0.055999998
format: double
type: number
x-go-name: NextYear
x-order: 40
next_5_years_pa:
description: Projected growth during the next 5 years in percentage (%) per annum
examples:
- 0.094799995
format: double
type: number
x-go-name: Next5YearsPA
x-order: 50
past_5_years_pa:
description: Actual growth over the last 5 years in percentage (%) per annum
examples:
- 0.23867
format: double
type: number
x-go-name: Past5YearsPA
x-order: 60
type: object
x-go-name: GrowthEstimates
x-order: 20
GetGrowthEstimates_200_response:
properties:
meta:
$ref: '#/components/schemas/GetEarningsEstimate_200_response_meta'
growth_estimates:
$ref: '#/components/schemas/GetGrowthEstimates_200_response_growth_estimates'
status:
description: Status of the request
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- meta
- status
type: object
GetAnalystRatingsLight_200_response_meta:
description: Meta information about the instrument
properties:
symbol:
description: Symbol ticker of the instrument
examples:
- AAPL
type: string
x-go-name: Symbol
x-order: 10
name:
description: Name of the instrument
examples:
- Apple Inc
type: string
x-go-name: Name
x-order: 20
currency:
description: Currency in which the instrument is traded
examples:
- USD
type: string
x-go-name: Currency
x-order: 30
exchange_timezone:
description: Timezone of the exchange
examples:
- America/New_York
type: string
x-go-name: ExchangeTimezone
x-order: 40
exchange:
description: Exchange where the instrument is traded
examples:
- NASDAQ
type: string
x-go-name: Exchange
x-order: 50
mic_code:
description: Market identifier code (MIC) under ISO 10383 standard
examples:
- XNGS
type: string
x-go-name: MicCode
x-order: 60
type:
description: Type of the instrument
examples:
- Common Stock
type: string
x-go-name: Type
x-order: 70
required:
- currency
- exchange
- exchange_timezone
- mic_code
- name
- symbol
- type
type: object
x-go-name: Meta
x-order: 10
GetEarningsEstimate_200_response_meta:
description: Meta information about the symbol
properties:
symbol:
description: Symbol ticker of the instrument
examples:
- AAPL
type: string
x-go-name: Symbol
x-order: 10
name:
description: Name of the instrument
examples:
- Apple Inc
type: string
x-go-name: Name
x-order: 20
currency:
description: Currency in which the instrument is traded
examples:
- USD
type: string
x-go-name: Currency
x-order: 30
exchange_timezone:
description: Timezone of the exchange
examples:
- America/New_York
type: string
x-go-name: ExchangeTimezone
x-order: 40
exchange:
description: Exchange where the instrument is traded
examples:
- NASDAQ
type: string
x-go-name: Exchange
x-order: 50
mic_code:
description: Market identifier code (MIC) under ISO 10383 standard
examples:
- XNGS
type: string
x-go-name: MicCode
x-order: 60
type:
description: Type of the instrument
examples:
- Common Stock
type: string
x-go-name: Type
x-order: 70
required:
- currency
- exchange
- exchange_timezone
- mic_code
- name
- symbol
- type
type: object
x-go-name: Meta
x-order: 10
GetPriceTarget_200_response_meta:
description: Meta information about the security
properties:
symbol:
description: Symbol ticker of the instrument
examples:
- AAPL
type: string
x-go-name: Symbol
x-order: 10
name:
description: Name of the instrument
examples:
- Apple Inc
type: string
x-go-name: Name
x-order: 20
currency:
description: Currency in which the instrument is traded
examples:
- USD
type: string
x-go-name: Currency
x-order: 30
exchange_timezone:
description: Timezone of the exchange
examples:
- America/New_York
type: string
x-go-name: ExchangeTimezone
x-order: 40
exchange:
description: Exchange where the instrument is traded
examples:
- NASDAQ
type: string
x-go-name: Exchange
x-order: 50
mic_code:
description: Market identifier code (MIC) under ISO 10383 standard
examples:
- XNGS
type: string
x-go-name: MicCode
x-order: 60
type:
description: Type of the instrument
examples:
- Common Stock
type: string
x-go-name: Type
x-order: 70
required:
- currency
- exchange
- exchange_timezone
- mic_code
- name
- symbol
- type
type: object
x-go-name: Meta
x-order: 10
GetEpsTrend_200_response_eps_trend_inner:
properties:
date:
description: Date of the estimation
examples:
- '2022-09-30'
type: string
x-go-name: Date
x-order: 10
period:
description: Period of estimation, can be `current_quarter`, `next_quarter`, `current_year`, or `next_year`
examples:
- current_quarter
type: string
x-go-name: Period
x-order: 20
current_estimate:
description: Actual EPS estimation for the period
examples:
- 1.26
format: double
type: number
x-go-name: CurrentEstimate
x-order: 30
7_days_ago:
description: EPS estimation value 7 days ago
examples:
- 1.26
format: double
type: number
x-go-name: SevenDaysAgo
x-order: 40
30_days_ago:
description: EPS estimation value 30 days ago
examples:
- 1.31
format: double
type: number
x-go-name: ThirtyDaysAgo
x-order: 50
60_days_ago:
description: EPS estimation value 60 days ago
examples:
- 1.32
format: double
type: number
x-go-name: SixtyDaysAgo
x-order: 60
90_days_ago:
description: EPS estimation value 90 days ago
examples:
- 1.33
format: double
type: number
x-go-name: NinetyDaysAgo
x-order: 70
required:
- date
- period
type: object
GetRevenueEstimate_200_response:
properties:
meta:
$ref: '#/components/schemas/GetEarningsEstimate_200_response_meta'
revenue_estimate:
description: Revenue estimate data
items:
$ref: '#/components/schemas/GetRevenueEstimate_200_response_revenue_estimate_inner'
type: array
x-go-name: RevenueEstimate
x-order: 20
status:
description: Status of the response
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- meta
- revenue_estimate
- status
type: object
GetAnalystRatingsUsEquities_200_response_ratings_inner:
properties:
date:
description: Date when the rating was released
examples:
- '2022-08-19'
type: string
x-go-name: Date
x-order: 10
firm:
description: Firm that issued the ranking
examples:
- Keybanc
type: string
x-go-name: Firm
x-order: 20
analyst_name:
description: Name of an analyst
examples:
- Brandon Nispel
type: string
x-go-name: AnalystName
x-order: 30
rating_change:
description: Defines the action of the firm to ranking, could be `Maintains`, `Upgrade`, `Downgrade`, `Initiates`, `Reiterates`, `Assumes`, or `Reinstates`
examples:
- Maintains
type: string
x-go-name: RatingChange
x-order: 40
rating_current:
description: Current firm's ranking of the instrument
examples:
- Overweight
type: string
x-go-name: RatingCurrent
x-order: 50
rating_prior:
description: Prior firm's ranking of the instrument
examples:
- Overweight
type: string
x-go-name: RatingPrior
x-order: 60
time:
description: Time when the rating was released or updated
examples:
- 08:29:48
type: string
x-go-name: Time
x-order: 70
action_price_target:
description: Action that firm took towards target price
examples:
- Raises
type: string
x-go-name: ActionPriceTarget
x-order: 80
price_target_current:
description: Current firm's price target for the instrument
examples:
- 185.14
format: double
type: number
x-go-name: PriceTargetCurrent
x-order: 90
price_target_prior:
description: Prior firm's price target for the instrument
examples:
- 177.01
format: double
type: number
x-go-name: PriceTargetPrior
x-order: 100
required:
- date
- firm
type: object
GetEarningsEstimate_200_response:
properties:
meta:
$ref: '#/components/schemas/GetEarningsEstimate_200_response_meta'
earnings_estimate:
description: List of earnings estimates
items:
$ref: '#/components/schemas/GetEarningsEstimate_200_response_earnings_estimate_inner'
type: array
x-go-name: EarningsEstimate
x-order: 20
status:
description: Response status
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- earnings_estimate
- meta
- status
type: object
GetRecommendations_200_response:
properties:
meta:
$ref: '#/components/schemas/GetRecommendations_200_response_meta'
trends:
$ref: '#/components/schemas/GetRecommendations_200_response_trends'
rating:
description: Rating from 0 to 10 represents overall analysts' recommendation. 0 to 2 - strong sell, 2 to 4 - sell, 4 to 6 - hold, 6 to 8 - buy, 8 to 10 - strong buy.
examples:
- 8.2
format: double
type: number
x-go-name: Rating
x-order: 30
status:
description: Response status
examples:
- ok
type: string
x-go-name: Status
x-order: 40
required:
- meta
- status
- trends
type: object
GetRecommendations_200_response_trends_previous_month:
description: Previous month recommendations
properties:
strong_buy:
description: Number of analysts that give a strong buy recommendation
examples:
- 13
format: int64
type: integer
x-go-name: StrongBuy
x-order: 10
buy:
description: Number of analysts that give a buy recommendation
examples:
- 20
format: int64
type: integer
x-go-name: Buy
x-order: 20
hold:
description: Number of analysts that give a hold recommendation
examples:
- 8
format: int64
type: integer
x-go-name: Hold
x-order: 30
sell:
description: Number of analysts that give a sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: Sell
x-order: 40
strong_sell:
description: Number of analysts that give a strong sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: StrongSell
x-order: 50
type: object
x-go-name: PreviousMonth
x-order: 20
ApiNotFoundErrorResponseBody:
properties:
code:
description: Error code
examples:
- 404
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- symbol or figi parameter is missing or invalid
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
ApiTooManyRequestsErrorResponseBody:
properties:
code:
description: Error code
examples:
- 429
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- You have run out of API credits for the current minute. 1000 API credits were used, with the current limit being 987. Wait for the next minute or consider upgrading your plan at https://twelvedata.com/pricing
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
GetRecommendations_200_response_trends_2_months_ago:
description: Two months ago recommendations
properties:
strong_buy:
description: Number of analysts that give a strong buy recommendation
examples:
- 13
format: int64
type: integer
x-go-name: StrongBuy
x-order: 10
buy:
description: Number of analysts that give a buy recommendation
examples:
- 20
format: int64
type: integer
x-go-name: Buy
x-order: 20
hold:
description: Number of analysts that give a hold recommendation
examples:
- 8
format: int64
type: integer
x-go-name: Hold
x-order: 30
sell:
description: Number of analysts that give a sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: Sell
x-order: 40
strong_sell:
description: Number of analysts that give a strong sell recommendation
examples:
- 0
format: int64
type: integer
x-go-name: StrongSell
x-order: 50
type: object
x-go-name: TwoMonthsAgo
x-order: 30
GetAnalystRatingsUsEquities_200_response:
properties:
meta:
$ref: '#/components/schemas/GetAnalystRatingsLight_200_response_meta'
ratings:
description: List of analyst ratings
items:
$ref: '#/components/schemas/GetAnalystRatingsUsEquities_200_response_ratings_inner'
type: array
x-go-name: Ratings
x-order: 20
status:
description: Response status
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- meta
- status
type: object
GetEpsRevisions_200_response:
properties:
meta:
$ref: '#/components/schemas/GetEarningsEstimate_200_response_meta'
eps_revision:
description: EPS revision data
items:
$ref: '#/components/schemas/GetEpsRevisions_200_response_eps_revision_inner'
type: array
x-go-name: EpsRevision
x-order: 20
status:
description: Status of the response
examples:
- ok
type: string
x-go-name: Status
x-order: 30
required:
- eps_revision
- meta
- status
type: object
ApiBadRequestErrorResponseBody:
properties:
code:
description: Error code
examples:
- 400
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- Invalid request
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
RatingChangeEnum:
enum:
- Maintains
- Upgrade
- Downgrade
- Initiates
- Reiterates
type: string
x-go-name: RatingChange
x-order: '60'
GetEarningsEstimate_200_response_earnings_estimate_inner:
properties:
date:
description: Date of the earnings estimate
examples:
- '2022-09-30'
type: string
x-go-name: Date
x-order: 10
period:
description: Period of estimation, can be `current_quarter`, `next_quarter`, `current_year`, or `next_year`
examples:
- current_quarter
type: string
x-go-name: Period
x-order: 20
number_of_analysts:
description: Number of analysts that made the estimation
examples:
- 27
format: int64
type: integer
x-go-name: NumberOfAnalysts
x-order: 30
avg_estimate:
description: Average estimation across analysts
examples:
- 1.26
format: double
type: number
x-go-name: AvgEstimate
x-order: 40
low_estimate:
description: Lowest estimation given by an analyst
examples:
- 1.13
format: double
type: number
x-go-name: LowEstimate
x-order: 50
high_estimate:
description: Highest estimation given by an analyst
examples:
- 1.35
format: double
type: number
x-go-name: HighEstimate
x-order: 60
year_ago_eps:
description: Average estimation of this period's earnings given a year ago
examples:
- 1.24
format: double
type: number
x-go-name: YearAgoEPS
x-order: 70
required:
- date
- period
type: object
ApiUnauthorizedErrorResponseBody:
properties:
code:
description: Error code
examples:
- 401
format: int64
type: integer
x-go-name: Code
message:
description: Error message
examples:
- apikey parameter is incorrect or not specified
type: string
x-go-name: Message
status:
description: Error status
examples:
- error
type: string
x-go-name: Status
required:
- code
- message
- status
type: object
x-go-package: gitlab.atlasgroup.ai/twelvedata/api/route/description
GetRevenueEstimate_200_response_revenue_estimate_inner:
properties:
date:
description: Date of the estimate
examples:
- '2022-09-30'
type: string
x-go-name: Date
x-order: 10
period:
description: Period of estimation, can be `current_quarter`, `next_quarter`, `current_year`, or `next_year`
examples:
- current_quarter
type: string
x-go-name: Period
x-order: 20
number_of_analysts:
description: Number of analysts that made the estimation
examples:
- 24
format: int64
type: integer
x-go-name: NumberOfAnalysts
x-order: 30
avg_estimate:
description: Average estimation across analysts
examples:
- 88631500000
format: double
type: number
x-go-name: AvgEstimate
x-order: 40
low_estimate:
description: Lowest estimation given by an analyst
examples:
- 85144300000
format: double
type: number
x-go-name: LowEstimate
x-order: 50
high_estimate:
description: Highest estimation given by an analyst
examples:
- 92794900000
format: double
type: number
x-go-name: HighEstimate
x-order: 60
year_ago_sales:
description: Total revenue received a year ago relative to period
examples:
- 83360000000
format: double
type: number
x-go-name: YearAgoSales
x-order: 70
sales_growth:
description: Estimated sales growth of the period in relation to year-ago sales in prc (%)
examples:
- 0.06
format: double
type: number
x-go-name: SalesGrowth
x-order: 80
type: object
securitySchemes:
authorizationHeader:
description: Enter the token with the `apikey ` prefix, e.g. "apikey abcde12345".
in: header
name: Authorization
type: apiKey
queryParameter:
in: query
name: apikey
type: apiKey
x-group-list:
- description: Access real-time and historical market prices—time series and exchange rates—for equities, forex, cryptocurrencies, ETFs, and more. These endpoints form the foundation for any trading or data-driven application.
name: Market data
order: 10
- children:
- description: Asset Catalog endpoints are your starting point. They return the complete inventory of tradeable instruments available through Twelve Data — over 1,000,000 symbols across 50+ countries. You query a catalog first to discover which symbols exist, then pass those symbols to price, fundamental, or indicator endpoints.
name: Asset catalogs
order: 10
- description: Discovery endpoints help you find instruments when you don't already know the exact identifier. The Asset Catalog is the phone book; Discovery is the search engine on top of it.
name: Discovery
order: 20
- description: 'Market endpoints answer operational questions about exchanges themselves: which ones are open right now, what are their trading hours, and how far back does data go for a given instrument?'
name: Markets
order: 30
- description: 'Metadata endpoints return the lookup tables and enumerations that define valid parameter values across the entire API. They answer: what instrument types exist? What intervals are supported? Which countries are covered? What technical indicators can I use?'
name: Supporting metadata
order: 40
description: Lookup static metadata—symbol lists, exchange details, currency information-to filter, validate, and contextualize your core data calls. Ideal for building dropdowns, mappings, and ensuring data consistency.
name: Reference data
order: 20
- description: In-depth company and fund financials—income statements, balance sheets, cash flows, profiles, corporate events, and key ratios. Unlock comprehensive datasets for valuation, screening, and fundamental research.
name: Fundamentals
order: 30
- name: Currencies
order: 35
- description: 'ETF-focused metadata and analytics: universe lists, family and type groupings, NAV snapshots, performance metrics, risk measures, and current fund composition. Tailored to the unique characteristics and reporting cadence of exchange-traded funds.'
name: ETFs
order: 40
- description: 'Mutual-fund-specific listings and snapshots: fund directories, issuer families, fund types, NAV history, dividend records, key ratios, and portfolio holdings. Ideal for long-term performance analysis and portfolio attribution.'
name: Mutual funds
order: 50
- description: 'Money-market-fund directories and full-data snapshots: fund listings ranked by fund size, plus screener metrics (fund size, liquidity, weighted average maturity), yields, key facts, and risk indicators. Focused on short-term, low-risk cash-management instruments for liquidity and capital-preservation analysis.'
name: Money market funds
order: 55
- children:
- description: Plotted directly on the price chart to smooth or envelope price data, highlighting trend direction, support/resistance, and mean-reversion levels (e.g. moving averages, Bollinger Bands, Parabolic SAR, Ichimoku Cloud, Keltner Channels, McGinley Dynamic).
name: Overlap studies
order: 10
- description: Oscillators that measure the speed or strength of price movement, helping detect overbought/oversold conditions, divergences, and shifts in trend momentum (e.g. RSI, MACD, ROC, Stochastics, ADX, CCI, Coppock Curve, TRIX).
name: Momentum indicators
order: 20
- description: Use trading volume to confirm price moves or warn of exhaustion—volume and price in tandem suggest trend strength, while divergences can signal reversals (e.g. OBV, Chaikin AD, Accumulation/Distribution Oscillator).
name: Volume indicators
order: 30
- description: Quantify the range or dispersion of price over time to gauge risk, size stops, or identify breakouts (e.g. ATR, NATR, True Range) and adaptive overlays like SuperTrend.
name: Volatility indicators
order: 40
- description: Convert raw OHLC data into derived series or aggregated values to feed other indicators or reveal different perspectives on price (e.g. typical price, HLC3, weighted close, arithmetic transforms like SUM, AVG, LOG, SQRT).
name: Price transform
order: 50
- description: Detect and follow recurring periodic patterns in price action using Hilbert Transform–based measures of cycle period and phase (e.g. HT_SINE, HT_DCPERIOD, HT_DCPHASE, HT_PHASOR, HT_TRENDMODE).
name: Cycle indicators
order: 60
- description: Scan bars or bar‐groups for predefined candlestick patterns that historically signal continuation or reversal setups (e.g. Doji, Hammer, Engulfing, Three Black Crows, Morning Star, Dark Cloud Cover, etc.).
name: Pattern recognition
order: 70
- description: Compute fundamental statistical metrics on price series—dispersion, regression, correlation, and forecasting components—for standalone analysis or as inputs to other models (e.g. STDDEV, VAR, LINEARREG, CORREL, TSF, BETA).
name: Statistic functions
order: 80
- name: Math transform
order: 90
description: On-demand calculation of popular indicators (SMA, EMA, RSI, MACD, Bollinger Bands, etc.) over any supported time series. Streamline chart overlays, signal generation, and backtesting without external libraries.
name: Technical indicators
order: 60
- description: Forward-looking and consensus analytics—earnings and revenue estimates, EPS trends and revisions, growth projections, analyst recommendations and ratings, price targets, and other consensus metrics. Perfect for incorporating expert forecasts and sentiment into your models and dashboards.
name: Analysis
order: 70
- description: 'Compliance and filings data: insider transactions, SEC reports, governance documents, and more. Critical for audit trails, due-diligence workflows, and risk-management integrations.'
name: Regulatory
order: 80
- description: High-throughput and management endpoints for power users—submit and monitor batch jobs to pull large datasets asynchronously, track your API usage and quotas programmatically, and access other developer-focused tools for automating and scaling your data workflows.
name: Advanced
order: 90
x-original-swagger-version: '2.0'