Twelve Data Reference Data API

Catalogs of instruments, exchanges, and supporting metadata.

OpenAPI Specification

twelvedata-reference-data-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Twelve Data REST Core Data Reference Data 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: Reference Data
  description: Catalogs of instruments, exchanges, and supporting metadata.
paths:
  /stocks:
    get:
      operationId: listStocks
      tags:
      - Reference Data
      summary: List stocks
      description: Returns the daily-updated catalog of available stock symbols across exchanges.
      parameters:
      - name: symbol
        in: query
        schema:
          type: string
      - name: exchange
        in: query
        schema:
          type: string
      - name: country
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Stock catalog payload.
  /forex_pairs:
    get:
      operationId: listForexPairs
      tags:
      - Reference Data
      summary: List forex pairs
      description: Returns the catalog of available foreign-exchange currency pairs.
      parameters:
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Forex pair catalog payload.
  /cryptocurrencies:
    get:
      operationId: listCryptocurrencies
      tags:
      - Reference Data
      summary: List cryptocurrencies
      description: Returns the catalog of available cryptocurrency pairs across exchanges.
      parameters:
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Cryptocurrency catalog payload.
  /etfs:
    get:
      operationId: listEtfs
      tags:
      - Reference Data
      summary: List ETFs
      description: Returns the catalog of available exchange-traded fund symbols.
      parameters:
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: ETF catalog payload.
  /indices:
    get:
      operationId: listIndices
      tags:
      - Reference Data
      summary: List indices
      description: Returns the catalog of available market indices.
      parameters:
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Index catalog payload.
  /exchanges:
    get:
      operationId: listExchanges
      tags:
      - Reference Data
      summary: List exchanges
      description: Returns the catalog of available equity exchanges.
      parameters:
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Exchange catalog payload.
  /symbol_search:
    get:
      operationId: symbolSearch
      tags:
      - Reference Data
      summary: Symbol search
      description: Finds instruments by name, symbol, ISIN, or FIGI.
      parameters:
      - name: symbol
        in: query
        required: true
        schema:
          type: string
        description: Search term (name, ticker, ISIN, or FIGI).
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Symbol search payload.
  /earliest_timestamp:
    get:
      operationId: getEarliestTimestamp
      tags:
      - Reference Data
      summary: Earliest timestamp
      description: Returns the earliest date for which data is available for an instrument and interval.
      parameters:
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/interval'
      - $ref: '#/components/parameters/apikeyParam'
      responses:
        '200':
          description: Earliest timestamp payload.
components:
  parameters:
    symbol:
      name: symbol
      in: query
      required: true
      schema:
        type: string
      description: Instrument symbol, e.g. AAPL, EUR/USD, or BTC/USD.
    apikeyParam:
      name: apikey
      in: query
      required: true
      schema:
        type: string
      description: Your Twelve Data API key.
    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.
  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>`.'