TAAPI.IO Market Data API

Raw OHLCV (Open, High, Low, Close, Volume) candle data from supported exchanges and markets.

GitHub OpenAPI

Operations 9

GET /candles OHLCV Candles #
GET /indicator/avgprice Average Price #
GET /indicator/heikinashicandles Heikin Ashi Candles #
GET /indicator/medprice Median Price #
GET /indicator/price Price #
GET /indicator/typprice Typical Price #
GET /indicator/volume Volume #
GET /indicator/volumesplit Volume Split #
GET /indicator/wclprice Weighted Close Price #

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/taapi-io:taapi-io-market-data-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

taapi-io-market-data-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TAAPI.IO Market Data API
  version: 2.0.0
  description: 'Technical Analysis API providing indicator calculations and OHLCV candle data for crypto and stock markets.


    Each indicator is exposed as its own endpoint (`GET /indicator/`) with only the parameters that indicator actually accepts documented.


    ## Authentication


    All endpoints require a valid API key passed as a **Bearer token** in the `Authorization` header:


    ```

    Authorization: Bearer

    ```


    Get your API key at taapi.io.


    ## Rate Limiting


    Requests are rate-limited per API key according to your subscription plan (see taapi.io for plan limits). Limits use a **fixed window**: the window (15 seconds by default) starts with your first request, and the counter resets when it expires.


    Every authenticated response includes these headers:


    | Header | Meaning |

    |--------|---------|

    | `X-RateLimit-Limit` | Requests allowed per window |

    | `X-RateLimit-Remaining` | Requests left in the current window |

    | `X-RateLimit-Reset` | Seconds until the current window resets |


    When the limit is exceeded the API returns **HTTP 429** with:


    ```json

    { "error": "Too Many Requests", "retryAfter": 9 }

    ```


    Wait `retryAfter` seconds before retrying.


    ## Real-time streaming (WebSocket)


    For live indicator updates over a persistent connection, use the **streaming** service on the same domain:


    - **WebSocket URL:** `wss://v2.taapi.io/streaming` (or your base URL + `/streaming` if using path-based routing)

    - **Health check:** `GET https://v2.taapi.io/streaming/health`


    All messages are JSON objects with a `type` field. Streaming uses `interval` (not `timeframe` as in REST); allowed intervals are `1m`, `5m`, `15m` and `1h`. Symbols use the same format as the REST API (`BTCUSDT`, not `BTC/USDT`) and must appear in `GET /exchanges/{exchange}/symbols`.


    **Connection flow:**


    1. Connect to the WebSocket URL.

    2. **Authenticate** — send: `{ "type": "auth", "token": "Bearer " }`

    - Response: `{ "type": "auth_ok", "userId": "...", "plan": { "socketSubscriptionsAllowed": 10, "streamThrottleMs": 5000 } }` or `{ "type": "auth_error", "error": "..." }`

    3. **Subscribe** to an indicator — send:

    `{ "type": "subscribe", "id": "my_rsi", "exchange": "binance", "symbol": "BTCUSDT", "interval": "1m", "indicator": "rsi", "params": { "period": 14 } }`

    - Response: `{ "type": "subscribed", "id": "binance_btcusdt_1m_my_rsi", "subscription": "binance:btcusdt:1m", "indicator": "rsi" }`

    - The returned `id` is the **scoped id**: `___`, lowercased. Use it to unsubscribe and to read updates.

    4. **Receive updates** — the server pushes only values that changed, keyed by scoped id. Values are arrays, as in the REST API:

    `{ "type": "update", "subscription": "binance:btcusdt:1m", "data": { "binance_btcusdt_1m_my_rsi": { "value": [41.99], "timestamp": [1793656260] } } }`

    5. **Unsubscribe** — send the scoped id: `{ "type": "unsubscribe", "id": "binance_btcusdt_1m_my_rsi" }` → `{ "type": "unsubscribed", "id": "binance_btcusdt_1m_my_rsi" }`


    **Other message types:**


    - `{ "type": "subscribe_bulk", "exchange": "binance", "symbols": ["BTCUSDT", "ETHUSDT"], "intervals": ["1m"], "indicators": [{ "id": "my_rsi", "name": "rsi", "params": { "period": 14 } }] }` — subscribes every symbol × interval × indicator combination. The server replies `subscribe_bulk_ack`, then `subscribe_bulk_complete` with the `subKeys` registered.

    - `{ "type": "unsubscribe_all" }` → `{ "type": "unsubscribed_all", "message": "..." }`

    - `{ "type": "list" }` → `{ "type": "subscriptions", "data": { ... } }` (add `"unpack": true` for a flat array)

    - `{ "type": "ping" }` → `{ "type": "pong", "timestamp": 1793656260000 }`

    - Errors arrive as `{ "type": "error", "error": "..." }`.


    Use the same API key (Bearer token) as for the REST API.'
servers:
- url: https://v2.taapi.io
  description: Production
- url: http://localhost:8080
  description: Local development
security:
- bearerAuth: []
tags:
- name: Market Data
  description: Raw OHLCV (Open, High, Low, Close, Volume) candle data from supported exchanges and markets.
paths:
  /candles:
    get:
      summary: OHLCV Candles
      description: Returns raw OHLCV (Open, High, Low, Close, Volume) candle data for the specified market and timeframe.
      operationId: getCandles
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Array of OHLCV candles, ordered oldest to newest.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Candle'
        '202':
          description: Fetch queued — retry after a short delay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/avgprice:
    get:
      summary: Average Price
      description: '**AVGPRICE** — Average Price returns the arithmetic mean of the open, high, low, and close for each bar.'
      operationId: get_avgprice
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Average Price result
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/heikinashicandles:
    get:
      summary: Heikin Ashi Candles
      description: '**HEIKINASHICANDLES** — Returns Heikin Ashi candles, which smooth price action by averaging OHLC values, making trends easier to identify.'
      operationId: get_heikinashicandles
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Heikin Ashi Candles result
          content:
            application/json:
              schema:
                type: object
                properties:
                  values:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/medprice:
    get:
      summary: Median Price
      description: '**MEDPRICE** — Median Price returns the midpoint of the high-low range: (high + low) / 2.'
      operationId: get_medprice
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Median Price result
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/price:
    get:
      summary: Price
      description: Returns the current or most recent price for the specified symbol and exchange.
      operationId: get_price
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Price result
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/typprice:
    get:
      summary: Typical Price
      description: '**TYPPRICE** — Typical Price returns the average of the high, low, and close: (high + low + close) / 3.'
      operationId: get_typprice
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Typical Price result
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/volume:
    get:
      summary: Volume
      description: Returns the trading volume for the specified symbol, exchange, and timeframe.
      operationId: get_volume
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Volume result
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/volumesplit:
    get:
      summary: Volume Split
      description: '**VOLUMESPLIT** — Returns volume data split into buy and sell volume, providing insight into the directional pressure behind trading activity.'
      operationId: get_volumesplit
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Volume Split result
          content:
            application/json:
              schema:
                type: object
                properties:
                  valueTotal:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  valueBuy:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  valueSell:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  percentBuy:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  percentSell:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
  /indicator/wclprice:
    get:
      summary: Weighted Close Price
      description: '**WCLPRICE** — Weighted Close Price gives extra weight to the closing price: (high + low + close × 2) / 4.'
      operationId: get_wclprice
      tags:
      - Market Data
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      responses:
        '200':
          description: Weighted Close Price result
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  timestamp:
                    description: Unix timestamps aligned to each result value — always an array.
                    type: array
                    items:
                      type: integer
        '202':
          description: Calculation queued — retry after a short delay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingResponse'
        '400':
          description: Missing or invalid query parameters — ensure ex, sym, and tf are all provided and valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required: ex, sym, tf'
        '401':
          description: Unauthorized — a valid API key must be provided as a Bearer token in the Authorization header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid or inactive token
        '404':
          description: Unknown indicator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    exchange:
      name: exchange
      in: query
      required: true
      description: 'Exchange identifier: `binance`, `binancefutures`, `bybit`, `gateio`, `kraken`, or `stocks` for US stocks. `GET /exchanges` returns the current list.'
      schema:
        type: string
        example: binance
    symbol:
      name: symbol
      in: query
      required: true
      description: Trading pair or ticker symbol (e.g. `BTCUSDT`, `ETHUSDT`, `AAPL`)
      schema:
        type: string
        example: BTCUSDT
    backtrack:
      name: backtrack
      in: query
      required: false
      description: Number of candles to skip from the end (shift results back in time).
      schema:
        type: integer
        default: 0
        example: 0
    timeframe:
      name: timeframe
      in: query
      required: true
      description: Candle timeframe
      schema:
        type: string
        enum:
        - 1m
        - 5m
        - 15m
        - 1h
        - 4h
        - 1d
        - 1w
        example: 1h
    results:
      name: results
      in: query
      required: false
      description: Number of results to return. Use `max` to return all available results.
      schema:
        type: integer
        default: 1
        example: 1
  responses:
    RateLimited:
      description: Rate limit exceeded — your plan allows a fixed number of requests per window (15 seconds by default). Wait `retryAfter` seconds (also in `X-RateLimit-Reset`) before retrying.
      headers:
        X-RateLimit-Limit:
          description: Requests allowed per window for your plan.
          schema:
            type: integer
            example: 30
        X-RateLimit-Remaining:
          description: Requests left in the current window.
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          description: Seconds until the current window resets.
          schema:
            type: integer
            example: 9
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Too Many Requests
              retryAfter:
                type: integer
                description: Seconds until the current window resets.
                example: 9
  schemas:
    PendingResponse:
      type: object
      properties:
        pending:
          type: boolean
          example: true
        key:
          type: string
          example: ta:binance:BTCUSDT:1h:rsi:abc123:rmax
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: 'Unknown indicator: fakeindicator'
    Candle:
      type: object
      properties:
        timestamp:
          type: integer
          example: 1708300800
        timestampHuman:
          type: string
          example: '2024-02-19 00:00:00'
        open:
          type: number
          format: double
          example: 51200.5
        high:
          type: number
          format: double
          example: 52100
        low:
          type: number
          format: double
          example: 50900.25
        close:
          type: number
          format: double
          example: 51850.75
        volume:
          type: number
          format: double
          example: 1234.56
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Your TAAPI API key, passed as a Bearer token in the Authorization header.