TAAPI.IO Divergence API

Divergence indicators

GitHub OpenAPI

Operations 5

GET /indicator/rsidivergence RSI Divergence #
GET /indicator/rsidivergencebearish RSI Bearish Divergence #
GET /indicator/rsidivergencebullish RSI Bullish Divergence #
GET /indicator/rsidivergencehiddenbearish RSI Hidden Bearish Divergence #
GET /indicator/rsidivergencehiddenbullish RSI Hidden Bullish Divergence #

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-divergence-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-divergence-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TAAPI.IO Divergence 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: Divergence
  description: Divergence indicators
paths:
  /indicator/rsidivergence:
    get:
      summary: RSI Divergence
      description: '**RSIDIVERGENCE** — RSI Divergence detects both bullish and bearish divergences between price action and the RSI indicator, signaling potential trend reversals.'
      operationId: get_rsidivergence
      tags:
      - Divergence
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      - name: period
        in: query
        required: false
        description: period
        schema:
          type: integer
          default: 14
          example: 14
      - name: srcKey
        in: query
        required: false
        description: srcKey
        schema:
          type: string
          default: close
          example: close
      - name: lbR
        in: query
        required: false
        description: lbR
        schema:
          type: integer
          default: 5
          example: 5
      - name: lbL
        in: query
        required: false
        description: lbL
        schema:
          type: integer
          default: 14
          example: 14
      - name: rangeUpper
        in: query
        required: false
        description: rangeUpper
        schema:
          type: integer
          default: 60
          example: 60
      - name: rangeLower
        in: query
        required: false
        description: rangeLower
        schema:
          type: integer
          default: 5
          example: 5
      - name: plotBull
        in: query
        required: false
        description: plotBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBull
        in: query
        required: false
        description: plotHiddenBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotBear
        in: query
        required: false
        description: plotBear
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBear
        in: query
        required: false
        description: plotHiddenBear
        schema:
          type: boolean
          default: true
          example: true
      responses:
        '200':
          description: RSI Divergence result
          content:
            application/json:
              schema:
                type: object
                properties:
                  bull:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  hiddenBull:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  bear:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  hiddenBear:
                    description: Indicator output values — always an array, even when results=1.
                    type: array
                    items:
                      type: number
                      format: double
                  rsi:
                    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/rsidivergencebearish:
    get:
      summary: RSI Bearish Divergence
      description: '**RSIDIVERGENCEBEARISH** — RSI Bearish Divergence occurs when price makes a higher high but RSI makes a lower high, warning of weakening upward momentum and a potential reversal downward.'
      operationId: get_rsidivergencebearish
      tags:
      - Divergence
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      - name: period
        in: query
        required: false
        description: period
        schema:
          type: integer
          default: 14
          example: 14
      - name: srcKey
        in: query
        required: false
        description: srcKey
        schema:
          type: string
          default: close
          example: close
      - name: lbR
        in: query
        required: false
        description: lbR
        schema:
          type: integer
          default: 5
          example: 5
      - name: lbL
        in: query
        required: false
        description: lbL
        schema:
          type: integer
          default: 14
          example: 14
      - name: rangeUpper
        in: query
        required: false
        description: rangeUpper
        schema:
          type: integer
          default: 60
          example: 60
      - name: rangeLower
        in: query
        required: false
        description: rangeLower
        schema:
          type: integer
          default: 5
          example: 5
      - name: plotBull
        in: query
        required: false
        description: plotBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBull
        in: query
        required: false
        description: plotHiddenBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotBear
        in: query
        required: false
        description: plotBear
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBear
        in: query
        required: false
        description: plotHiddenBear
        schema:
          type: boolean
          default: true
          example: true
      responses:
        '200':
          description: RSI Bearish Divergence 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
                  rsi:
                    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/rsidivergencebullish:
    get:
      summary: RSI Bullish Divergence
      description: '**RSIDIVERGENCEBULLISH** — RSI Bullish Divergence occurs when price makes a lower low but RSI makes a higher low, signaling weakening downward momentum and a potential reversal upward.'
      operationId: get_rsidivergencebullish
      tags:
      - Divergence
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      - name: period
        in: query
        required: false
        description: period
        schema:
          type: integer
          default: 14
          example: 14
      - name: srcKey
        in: query
        required: false
        description: srcKey
        schema:
          type: string
          default: close
          example: close
      - name: lbR
        in: query
        required: false
        description: lbR
        schema:
          type: integer
          default: 5
          example: 5
      - name: lbL
        in: query
        required: false
        description: lbL
        schema:
          type: integer
          default: 14
          example: 14
      - name: rangeUpper
        in: query
        required: false
        description: rangeUpper
        schema:
          type: integer
          default: 60
          example: 60
      - name: rangeLower
        in: query
        required: false
        description: rangeLower
        schema:
          type: integer
          default: 5
          example: 5
      - name: plotBull
        in: query
        required: false
        description: plotBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBull
        in: query
        required: false
        description: plotHiddenBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotBear
        in: query
        required: false
        description: plotBear
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBear
        in: query
        required: false
        description: plotHiddenBear
        schema:
          type: boolean
          default: true
          example: true
      responses:
        '200':
          description: RSI Bullish Divergence 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
                  rsi:
                    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/rsidivergencehiddenbearish:
    get:
      summary: RSI Hidden Bearish Divergence
      description: '**RSIDIVERGENCEHIDDENBEARISH** — RSI Hidden Bearish Divergence occurs when price makes a lower high but RSI makes a higher high, confirming continuation of a downtrend.'
      operationId: get_rsidivergencehiddenbearish
      tags:
      - Divergence
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      - name: period
        in: query
        required: false
        description: period
        schema:
          type: integer
          default: 14
          example: 14
      - name: srcKey
        in: query
        required: false
        description: srcKey
        schema:
          type: string
          default: close
          example: close
      - name: lbR
        in: query
        required: false
        description: lbR
        schema:
          type: integer
          default: 5
          example: 5
      - name: lbL
        in: query
        required: false
        description: lbL
        schema:
          type: integer
          default: 14
          example: 14
      - name: rangeUpper
        in: query
        required: false
        description: rangeUpper
        schema:
          type: integer
          default: 60
          example: 60
      - name: rangeLower
        in: query
        required: false
        description: rangeLower
        schema:
          type: integer
          default: 5
          example: 5
      - name: plotBull
        in: query
        required: false
        description: plotBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBull
        in: query
        required: false
        description: plotHiddenBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotBear
        in: query
        required: false
        description: plotBear
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBear
        in: query
        required: false
        description: plotHiddenBear
        schema:
          type: boolean
          default: true
          example: true
      responses:
        '200':
          description: RSI Hidden Bearish Divergence 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
                  rsi:
                    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/rsidivergencehiddenbullish:
    get:
      summary: RSI Hidden Bullish Divergence
      description: '**RSIDIVERGENCEHIDDENBULLISH** — RSI Hidden Bullish Divergence occurs when price makes a higher low but RSI makes a lower low, confirming continuation of an uptrend.'
      operationId: get_rsidivergencehiddenbullish
      tags:
      - Divergence
      parameters:
      - $ref: '#/components/parameters/exchange'
      - $ref: '#/components/parameters/symbol'
      - $ref: '#/components/parameters/timeframe'
      - $ref: '#/components/parameters/results'
      - $ref: '#/components/parameters/backtrack'
      - name: period
        in: query
        required: false
        description: period
        schema:
          type: integer
          default: 14
          example: 14
      - name: srcKey
        in: query
        required: false
        description: srcKey
        schema:
          type: string
          default: close
          example: close
      - name: lbR
        in: query
        required: false
        description: lbR
        schema:
          type: integer
          default: 5
          example: 5
      - name: lbL
        in: query
        required: false
        description: lbL
        schema:
          type: integer
          default: 14
          example: 14
      - name: rangeUpper
        in: query
        required: false
        description: rangeUpper
        schema:
          type: integer
          default: 60
          example: 60
      - name: rangeLower
        in: query
        required: false
        description: rangeLower
        schema:
          type: integer
          default: 5
          example: 5
      - name: plotBull
        in: query
        required: false
        description: plotBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBull
        in: query
        required: false
        description: plotHiddenBull
        schema:
          type: boolean
          default: true
          example: true
      - name: plotBear
        in: query
        required: false
        description: plotBear
        schema:
          type: boolean
          default: true
          example: true
      - name: plotHiddenBear
        in: query
        required: false
        description: plotHiddenBear
        schema:
          type: boolean
          default: true
          example: true
      responses:
        '200':
          description: RSI Hidden Bullish Divergence 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
                  rsi:
                    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'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Your TAAPI API key, passed as a Bearer token in the Authorization header.