Twelve Data Time Series API

Historical and real-time OHLCV time series.

Operations 2

GET /time_series Time series (OHLCV) #
GET /time_series/cross Cross time series #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twelvedata-time-series-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twelvedata-time-series-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Twelve Data REST Core Data Time Series API
  description: 'REST API for Twelve Data financial market data covering stocks, forex, cryptocurrencies, ETFs, indices, commodities, and funds. Provides historical and real-time time series (OHLCV), quotes and prices, 100+ technical indicators, reference / catalog data, and company fundamentals. All requests are authenticated with an apikey supplied either as a query parameter (?apikey=) or via the `Authorization: apikey <KEY>` header. Every endpoint consumes a data-weight number of API credits; the per-minute credit quota resets each minute.'
  termsOfService: https://twelvedata.com/terms
  contact:
    name: Twelve Data Support
    url: https://support.twelvedata.com
  version: '1.0'
servers:
- url: https://api.twelvedata.com
  description: Twelve Data REST base URL
security:
- apikeyQuery: []
- apikeyHeader: []
tags:
- name: Time Series
  description: Historical and real-time OHLCV time series.
paths:
  /time_series:
    get:
      operationId: getTimeSeries
      tags:
      - Time Series
      summary: Time series (OHLCV)
      description: Returns meta and time series (open, high, low, close, volume) for the requested instrument at the requested interval. Core endpoint for historical and intraday market data.
      parameters:
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/interval'
      - name: outputsize
        in: query
        schema:
          type: integer
          default: 30
        description: Number of data points to return (max 5000).
      - name: exchange
        in: query
        schema:
          type: string
        description: Exchange to which the instrument belongs.
      - name: format
        in: query
        schema:
          type: string
          enum:
          - JSON
          - CSV
          default: JSON
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Time series payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeSeriesResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
  /time_series/cross:
    get:
      operationId: getTimeSeriesCross
      tags:
      - Time Series
      summary: Cross time series
      description: Computes a cross-rate time series between two instruments (for example, exotic currency pairs) that are not directly quoted.
      parameters:
      - name: symbol
        in: query
        required: true
        schema:
          type: string
        description: Base/quote cross expression, e.g. EUR/JPY derived cross.
      - $ref: '#/components/parameters/interval'
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Cross time series payload.
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    apikeyParam:
      name: apikey
      in: query
      required: true
      schema:
        type: string
      description: Your Twelve Data API key.
    symbol:
      name: symbol
      in: query
      required: true
      schema:
        type: string
      description: Instrument symbol, e.g. AAPL, EUR/USD, or BTC/USD.
    interval:
      name: interval
      in: query
      required: true
      schema:
        type: string
        enum:
        - 1min
        - 5min
        - 15min
        - 30min
        - 45min
        - 1h
        - 2h
        - 4h
        - 1day
        - 1week
        - 1month
      description: Time interval between two consecutive data points.
  schemas:
    TimeSeriesResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            symbol:
              type: string
            interval:
              type: string
            currency:
              type: string
            exchange:
              type: string
            type:
              type: string
        values:
          type: array
          items:
            type: object
            properties:
              datetime:
                type: string
              open:
                type: string
              high:
                type: string
              low:
                type: string
              close:
                type: string
              volume:
                type: string
        status:
          type: string
          example: ok
    Error:
      type: object
      properties:
        code:
          type: integer
          description: HTTP-style status code.
        message:
          type: string
          description: Human-readable error message.
        status:
          type: string
          example: error
  responses:
    RateLimited:
      description: API credit limit for the current minute has been exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apikeyQuery:
      type: apiKey
      in: query
      name: apikey
      description: API key supplied as the `apikey` query parameter.
    apikeyHeader:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key supplied as `Authorization: apikey <KEY>`.'