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

# TWAP stop and trigger levels

> Price levels where running TWAP flow switches off and waiting TWAP flow switches on, for one market.



## OpenAPI

````yaml /data-api/openapi.json get /v1/markets/{coin}/twap-levels
openapi: 3.1.0
info:
  title: Hyperdash Data API
  version: v1
  description: >-
    Hyperliquid data from Hyperdash's own nodes and stored datasets; requests
    never call Hyperliquid's public API. Every response reports the credits it
    cost.
servers:
  - url: https://data.hyperdash.com
security: []
tags:
  - name: Accounts
  - name: Async jobs
  - name: Builders
  - name: Cohorts
  - name: HIP-3 dexes
  - name: Leaderboards
  - name: Lending
  - name: Liquidations
  - name: Markets
  - name: 'Markets: analytics'
  - name: 'Markets: funding'
  - name: 'Markets: liquidation and stop levels'
  - name: 'Markets: open interest and positioning'
  - name: 'Markets: order book'
  - name: 'Markets: prices and candles'
  - name: 'Markets: queue priority'
  - name: 'Markets: trades and flow'
  - name: 'Markets: TWAPs'
  - name: Network
  - name: Outcomes
  - name: Positions
  - name: Referrals
  - name: Snapshots
  - name: Spot
  - name: Staking
  - name: Traders
  - name: Vaults
paths:
  /v1/markets/{coin}/twap-levels:
    get:
      tags:
        - 'Markets: TWAPs'
      summary: TWAP stop and trigger levels
      description: >-
        Price levels where running TWAP flow switches off and waiting TWAP flow
        switches on, for one market. There is one row per price level, `kind`
        and side, highest price first.


        **How it works**

        - `kind=stop`: running TWAPs that stop once the price reaches `px`, a
        buy from below and a sell from above. Hyperliquid announced it will
        pause them there instead and resume when the price comes back.

        - `kind=trigger`: TWAPs waiting to start once the price moves above or
        below `px`. A waiting TWAP's stop applies once it has started.

        - Each row sums the TWAPs' remaining size and their average size per
        minute.

        - Average size per minute is remaining size over the remaining scheduled
        time, both at the snapshot's cut. For a waiting TWAP it is its size over
        its duration.

        - When the snapshot is undated, a running TWAP counts its time left in
        its own 30-second slices.


        **Fields**

        - Rows are aggregates. No wallets are returned.

        - `meta.levels` counts every level, and `meta.truncated` is true when
        more than 500 exist.

        - `meta` also has the market's unconditional TWAP flow: running buy and
        sell TWAPs, their remaining size and average size per minute, and how
        many wait for a trigger.

        - `meta.as_of` equals `meta.snapshot_time`, and is `null` when unknown.


        **Coverage**

        - Levels come from the latest node state snapshot, identified by
        `meta.snapshot_id`.

        - The snapshot is cut from the node state every 10,000 blocks, about
        every 12 minutes, and published about 3 minutes later, so it is 3 to 15
        minutes old.

        - `meta.snapshot_time` is its block time in epoch ms, or `null` when
        unknown, when there is no running TWAP to date it by.
        `meta.snapshot_time_estimated` is true when that time is derived from
        its TWAPs' next slices, accurate to within 15 seconds.

        - TWAPs started, ended or terminated since the snapshot are not
        reflected.


        **Credits:** 10 per request + 1 per row + 5 per node read.


        **Scope:** `analytics:read`
      operationId: getMarketTwapLevels
      parameters:
        - name: coin
          in: path
          required: true
          description: >-
            Core-exchange perp, for example `BTC` or `kPEPE`. HIP-3 markets are
            not covered.
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            X-Credits-Charged:
              schema:
                type: integer
            X-Credit-Price-Version:
              schema:
                type: integer
            X-Request-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                  - next_cursor
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        px:
                          type: string
                          description: Price level. Decimal string.
                        kind:
                          type: string
                          description: >-
                            `stop` when flow switches off here or `trigger` when
                            flow switches on here.
                        side:
                          type: string
                          description: '`buy` or `sell`.'
                        when:
                          type: string
                          description: >-
                            `above` or `below`: the TWAPs act once the price
                            moves above or below `px`.
                        twaps:
                          type: integer
                          description: TWAPs at this level.
                        remaining_sz:
                          type: string
                          description: >-
                            Size they still have to trade, in base units.
                            Decimal string.
                        remaining_notional:
                          type: string
                          description: '`remaining_sz` times `px`, in quote. Decimal string.'
                        flow_sz_per_min:
                          type: string
                          description: >-
                            Average size per minute they trade, in base units.
                            Decimal string.
                    description: Result rows.
                  has_more:
                    type: boolean
                    description: '`true` when another page follows.'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor for the next page, passed as `cursor`. `null` on
                      the last page.
                  meta:
                    type: object
                    description: >-
                      Response metadata. Its keys depend on the endpoint and are
                      described above.
        '400':
          description: 'Invalid parameter (also: a request body that is not valid JSON)'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Invalid, expired or revoked key
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Scope, plan, history or credit limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Price version changed, or a cursor's snapshot expired
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: >-
            Rate limited (Retry-After; free): request rate, concurrent requests
            (a request counts one slot per 1,000 rows it can return), or this
            server busy with your workspace's requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Upstream data source failed (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Backend at capacity or temporarily unavailable (Retry-After)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '504':
          description: Upstream data source timed out (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
      x-codeSamples:
        - lang: curl
          source: >-
            curl -H "Authorization: Bearer $HYPERDASH_API_KEY"
            'https://data.hyperdash.com/v1/markets/BTC/twap-levels'
components:
  schemas:
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        code:
          type: string
        detail:
          type: string
        hint:
          type: string
        request_id:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your API key, sent as `Bearer hdk_sk_live_v1_…`.

````

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