> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vatic.trading/llms.txt
> Use this file to discover all available pages before exploring further.

# TWAP Range Comparisons

> Beta endpoint returning every closed crypto up/down market in a bounded range with target price, old snapshot-style close price, Chainlink TWAP resolution reference, directions, differences, and disagreement summary. The default maximum range is 3 days.

Returns target price, snapshot close, Chainlink TWAP close, direction comparison, and TWAP-vs-snapshot difference for every closed market in a bounded range.

The default maximum range is 3 days. That covers:

| Market type | 3-day market count |
| - | - |
| `5min` | 864 |
| `15min` | 288 |
| `4hour` | 18 |

Use explicit `start` and `end`:

```bash theme={null}
curl "https://api.vatic.trading/api/v1/twap/range?asset=btc&type=5min&start=2026-07-28T16:00:00Z&end=2026-07-31T16:00:00Z"
```

Or use `days` with an end timestamp:

```bash theme={null}
curl "https://api.vatic.trading/api/v1/twap/range?asset=btc&type=5min&days=3&end=2026-07-31T16:00:00Z"
```

For summary-only responses:

```bash theme={null}
curl "https://api.vatic.trading/api/v1/twap/range?asset=btc&type=5min&days=3&end=2026-07-31T16:00:00Z&includeRows=false"
```


## OpenAPI

````yaml GET /api/v1/twap/range
openapi: 3.1.0
info:
  title: Vatic API
  version: 1.0.0
  description: >-
    Polymarket price targets, Hyperliquid prediction market data, market
    timestamps, fee calculators, and order management for systematic prediction
    market trading.
servers:
  - url: https://api.vatic.trading
    description: Production
security: []
paths:
  /api/v1/twap/range:
    get:
      tags:
        - Chainlink TWAP
      summary: Range target vs TWAP comparisons
      description: >-
        Beta endpoint returning every closed crypto up/down market in a bounded
        range with target price, old snapshot-style close price, Chainlink TWAP
        resolution reference, directions, differences, and disagreement summary.
        The default maximum range is 3 days.
      operationId: getTwapRange
      parameters:
        - name: asset
          in: query
          required: true
          schema:
            type: string
            enum:
              - btc
              - eth
              - sol
              - xrp
              - hype
              - doge
              - bnb
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - 5min
              - 15min
              - 4hour
            default: 5min
        - name: start
          in: query
          required: false
          schema:
            type: string
            example: '2026-07-28T16:00:00Z'
          description: >-
            Range start. Accepts Unix seconds, Unix milliseconds, or ISO date
            string. Required unless `days` is supplied.
        - name: end
          in: query
          required: false
          schema:
            type: string
            example: '2026-07-31T16:00:00Z'
          description: >-
            Range end. Accepts Unix seconds, Unix milliseconds, or ISO date
            string. Defaults to now when `days` is supplied.
        - name: days
          in: query
          required: false
          schema:
            type: number
            example: 3
            maximum: 3
          description: >-
            Range length in days ending at `end`, `endTimestamp`, `asOf`, or
            now. Maximum is 3 by default.
        - name: includeRows
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: Set to false for summary-only responses.
      responses:
        '200':
          description: Range comparisons
          content:
            application/json:
              example:
                asset: btc
                marketType: 5min
                twapWindowSeconds: 30
                startIso: '2026-07-28T16:00:00.000Z'
                endIso: '2026-07-31T16:00:00.000Z'
                expectedMarkets: 864
                summary:
                  ok: 864
                  failed: 0
                  disagreements: 12
                  disagreementRate: 0.013888888888888888
        '400':
          description: Invalid input or range too large
        '502':
          description: Upstream error
        '503':
          description: Upstream throttled

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.