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

# Order completions

> Orders and TWAPs that ended after being executed, for every user on Hyperliquid, a list of wallets or a builder code, in time order: the REST counterpart of the [`orderCompletions` WebSocket channel](/live-data/ws-order-completions). Use it to catch up after a disconnect, or to read a past window.

Same entries as the WebSocket channel. **Order completions**: `filled`, or a final status after a partial fill (`sz` is then the size left unfilled), with Hyperliquid's `order` / `status` / `statusTimestamp`, plus `user`, `builder` (or `null`) and `fills`, the order's fills in the 30 s before it ended. **TWAP ends** (`finished`, `terminated`, `stopped`, `error`, for TWAPs that executed something): `twapId`, `status`, `statusTimestamp`, `user`, `builder: null` and `twap`, Hyperliquid's TWAP state with `executedSz` and `executedNtl`.

**Paging**: `limit` entries per page, ascending time. The response headers `X-Has-More` and `X-Next-Cursor` tell whether a next page exists; pass `X-Next-Cursor` as `cursor` with the same `startTime` / `endTime` / `users`. Pages always end on a whole millisecond.

**Coverage**: from 2026-10-27 20:00 UTC, 90 days retained. Fills of the last minute may not be attached yet: for live data, use the WebSocket channel. Served from the EU region whatever the client's location.

**Filters**: `users` (up to 20,000 wallets) and `builder` (a builder code) combine as a union. Unknown fields are refused with `422` and the name of the field, so a typo never returns the unfiltered stream.



## OpenAPI

````yaml /live-data/openapi-rest.json post /info#orderCompletions
openapi: 3.0.3
info:
  title: 'Hypedexer API: Live Data (REST)'
  version: 0.1.0
  description: >-
    REST API for real-time Hyperliquid market data served from our own
    Hyperliquid nodes.


    All data is accessed through a single unified endpoint `POST /info` that
    dispatches based on the `type` field in the JSON body.


    ## Request types


    | Type | Description | Handled |

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

    | `metaAndAssetCtxs` | Asset context (funding, OI, prices) | Locally (Redis
    cache) |

    | `allMids` | Mid prices for all coins | Locally (Redis cache) |

    | `userFills` / `userFillsByTime` | Fills for a specific user | Locally
    (volume files) |

    | `allFills` | All fills globally | Locally (volume files) |

    | `trades` | Trade data | Locally (volume files) |

    | `l2Book` / `l2Books` | L2 order book snapshot | Locally |

    | `availableDates` | Available data dates | Locally |

    | `clearinghouseState` | Clearinghouse state, one user (`user`) or many in
    one call (`users`), per dex with `dex` | Locally with upstream proxy per
    user |

    | `openInterestHistory` | Open interest history of a market (~30 s samples,
    with mark price, 24h volume, funding, premium) | Indexed history |

    | `userFunding` / `accountFunding` | Funding payments of a user | Indexed
    history, returned unwrapped |

    | `userNonFundingLedgerUpdates` | Native ledger of a user: deposits,
    withdrawals, transfers, vaults, staking, borrow/lend | Indexed history,
    returned unwrapped |

    | `historicalOrders` | Latest orders of a user with their status | Indexed
    history, returned unwrapped |

    | `userTwapSliceFills` | Fills of a user's TWAP orders with their parent |
    Indexed history, returned unwrapped |

    | `fills` / `recentFills` | Indexed fills with filters (compact shape) |
    Indexed history, returned unwrapped; paging in `X-Has-More` /
    `X-Next-Cursor` headers |

    | `builderFills` / `builderFillsByTime` / `builderOrdersByTime` | Every fill
    or order routed through one builder code | Indexed history |

    | `tpslBook` | Aggregated resting TP/SL trigger orders of a coin, by price |
    Indexed history |

    | `oraclePriceHistory` / `slippageHistory` / `marketLiquidityHistory` |
    Per-market series (~30 to 60 s samples, about 7 days) | Indexed history |

    | `stakingOverview` / `validatorAprHistory` / `globalStakingSummary` |
    Validator snapshots and network staking figures | Indexed history |

    | `liqHistory` | Liquidation events, cursor paging in headers | Indexed
    history |

    | `userTwapStatusesByTime` / `userTwapSummaries` | Status and latest state
    of a user's TWAP orders | Indexed history |

    | `dataCoverage` | Start and latest timestamp per dataset | Indexed history
    |

    | `borrowLendReserveHistory` | Borrow/lend reserve history, one sample per
    minute | Indexed history, returned unwrapped |

    | `meta`, `spotMeta`, `openOrders`, ... | Proxied to local Hyperliquid node
    | Proxied to upstream |


    ## Authentication


    Required. Send your key in the `X-API-Key` header or as `Authorization:
    Bearer <key>`. A request without a valid key returns `401`.


    ## Response format


    Most types return:

    ```json

    { "result": <data>, "cursor": null }

    ```


    `allMids` returns the result directly (not wrapped):

    ```json

    { "BTC": "66764.5", "ETH": "3421.2" }

    ```


    Proxied types return the upstream response as-is.
  contact:
    name: Hypedexer
servers:
  - url: https://api.hypedexer.com
    description: Production, routed to the nearest region (EU or JP)
security:
  - BearerAuth: []
tags:
  - name: Health
    description: Service health and info.
  - name: Asset Context
    description: >-
      Real-time asset context data: funding, open interest, oracle/mark/mid
      prices, volumes.
  - name: Mid Prices
    description: Mid prices for all coins, optionally filtered by DEX.
  - name: Fills
    description: >-
      Executed fills from the Hyperliquid fullnode volumes. Supports
      user-specific and global queries.
  - name: Trades
    description: Trade data from the fullnode volumes.
  - name: Order Book
    description: L2 order book snapshots.
  - name: Metadata
    description: Volume availability and data metadata.
  - name: Clearinghouse
    description: >-
      Clearinghouse state with multi-user support. Each user is fetched
      individually from the upstream Hyperliquid node.
  - name: Proxied Perpetuals
    description: >-
      Perpetual market metadata, margin, OI caps, DEX configs. Proxied to
      upstream Hyperliquid node.
  - name: Proxied Spot
    description: >-
      Spot market metadata, balances, and deploy state. Proxied to upstream
      Hyperliquid node.
  - name: Proxied Trading
    description: >-
      Orders, positions, and active asset data. Proxied to upstream Hyperliquid
      node.
  - name: Proxied Account
    description: >-
      User account info: fees, rate limits, sub-accounts, agents, roles. Proxied
      to upstream Hyperliquid node.
  - name: Proxied Vaults
    description: >-
      Vault summaries, equities, and leaderboards. Proxied to upstream
      Hyperliquid node.
  - name: Proxied Staking
    description: >-
      Delegations, staking summaries, and validator votes. Proxied to upstream
      Hyperliquid node.
  - name: Proxied Exchange
    description: >-
      Exchange status, liquidatable positions, web data. Proxied to upstream
      Hyperliquid node.
  - name: Account History
    description: >-
      Per-address history served from our index, in Hyperliquid's `info` shapes:
      funding payments, native ledger and orders.
  - name: Borrow/Lend
    description: >-
      History of Hyperliquid's borrow/lend reserves, sampled every minute from
      our own node.
  - name: Builders
    description: >-
      Builder-wide feeds: every fill and order routed through one builder code,
      whatever the user.
  - name: Market History
    description: >-
      Per-market series sampled from our own node every 30 to 60 seconds, kept
      about 7 days: open interest, oracle prices, slippage, liquidity.
  - name: Staking
    description: Validator snapshots and network staking figures from our own node.
  - name: Liquidations
    description: Indexed liquidation events with cursor paging.
  - name: Coverage
    description: >-
      What the index holds: per-dataset start and latest timestamp in the region
      answering.
paths:
  /info#orderCompletions:
    post:
      tags:
        - Account History
      summary: Order completions
      description: >-
        Orders and TWAPs that ended after being executed, for every user on
        Hyperliquid, a list of wallets or a builder code, in time order: the
        REST counterpart of the [`orderCompletions` WebSocket
        channel](/live-data/ws-order-completions). Use it to catch up after a
        disconnect, or to read a past window.


        Same entries as the WebSocket channel. **Order completions**: `filled`,
        or a final status after a partial fill (`sz` is then the size left
        unfilled), with Hyperliquid's `order` / `status` / `statusTimestamp`,
        plus `user`, `builder` (or `null`) and `fills`, the order's fills in the
        30 s before it ended. **TWAP ends** (`finished`, `terminated`,
        `stopped`, `error`, for TWAPs that executed something): `twapId`,
        `status`, `statusTimestamp`, `user`, `builder: null` and `twap`,
        Hyperliquid's TWAP state with `executedSz` and `executedNtl`.


        **Paging**: `limit` entries per page, ascending time. The response
        headers `X-Has-More` and `X-Next-Cursor` tell whether a next page
        exists; pass `X-Next-Cursor` as `cursor` with the same `startTime` /
        `endTime` / `users`. Pages always end on a whole millisecond.


        **Coverage**: from 2026-10-27 20:00 UTC, 90 days retained. Fills of the
        last minute may not be attached yet: for live data, use the WebSocket
        channel. Served from the EU region whatever the client's location.


        **Filters**: `users` (up to 20,000 wallets) and `builder` (a builder
        code) combine as a union. Unknown fields are refused with `422` and the
        name of the field, so a typo never returns the unfiltered stream.
      operationId: orderCompletions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - startTime
              properties:
                type:
                  type: string
                  enum:
                    - orderCompletions
                startTime:
                  type: integer
                  description: >-
                    Inclusive lower bound on `statusTimestamp`, epoch
                    milliseconds
                endTime:
                  type: integer
                  description: >-
                    Inclusive upper bound on `statusTimestamp`, epoch
                    milliseconds. Default: now
                users:
                  type: array
                  items:
                    type: string
                  maxItems: 20000
                  description: >-
                    Optional: only the completions of these wallets
                    (0x-prefixed, case-insensitive), up to 20,000
                builder:
                  type: string
                  description: >-
                    Optional: only the completions of orders placed with this
                    builder code (0x-prefixed). Combined with `users` as a
                    union: an entry is returned when it matches either.
                limit:
                  type: integer
                  minimum: 1
                  maximum: 5000
                  default: 2000
                  description: Entries per page
                cursor:
                  type: string
                  description: The `X-Next-Cursor` header of the previous page
            example:
              type: orderCompletions
              startTime: 1793116800000
              endTime: 1793120400000
              users:
                - '0x3b8e1c2d4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c'
              limit: 2000
      responses:
        '200':
          description: Order completions and TWAP ends in time order
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    order:
                      type: object
                      properties:
                        coin:
                          type: string
                        side:
                          type: string
                          enum:
                            - A
                            - B
                        limitPx:
                          type: string
                        sz:
                          type: string
                          description: Remaining size
                        origSz:
                          type: string
                          description: Original size
                        oid:
                          type: integer
                        orderType:
                          type: string
                        tif:
                          type: string
                          nullable: true
                        reduceOnly:
                          type: boolean
                        isTrigger:
                          type: boolean
                        triggerPx:
                          type: string
                        triggerCondition:
                          type: string
                        isPositionTpsl:
                          type: boolean
                        timestamp:
                          type: integer
                          description: Order placement time, ms
                        cloid:
                          type: string
                          nullable: true
                        children:
                          type: array
                          items:
                            type: object
                    twapId:
                      type: integer
                      description: TWAP ends only
                    twap:
                      type: object
                      description: >-
                        TWAP ends only: Hyperliquid's TWAP state (coin, side,
                        sz, executedSz, executedNtl, minutes, randomize,
                        reduceOnly, timestamp, stopPx, trigger, user)
                    status:
                      type: string
                      description: >-
                        `filled` or the final status after a partial fill; for a
                        TWAP `finished`, `terminated`, `stopped` or `error`
                    statusTimestamp:
                      type: integer
                      description: Time of the final status, ms
                    user:
                      type: string
                    builder:
                      type: object
                      nullable: true
                      properties:
                        b:
                          type: string
                        f:
                          type: number
                          description: Builder fee, tenths of a basis point
                    fills:
                      type: array
                      items:
                        type: object
                        description: >-
                          A fill of this order in the same block, in
                          Hyperliquid's fill shape (`coin`, `px`, `sz`, `side`,
                          `time`, `startPosition`, `dir`, `closedPnl`, `hash`,
                          `oid`, `crossed`, `tid`, `fee`, `feeToken`, `twapId`,
                          plus `cloid`, `builder` and `builderFee` when present)
              example:
                - order:
                    coin: ETH
                    side: B
                    limitPx: '3951.2'
                    sz: '0.0'
                    origSz: '2.5'
                    oid: 586400000002
                    timestamp: 1793095817722
                    orderType: Market
                    tif: FrontendMarket
                    reduceOnly: false
                    isTrigger: false
                    triggerPx: '0.0'
                    triggerCondition: N/A
                    isPositionTpsl: false
                    children: []
                    cloid: null
                  status: filled
                  statusTimestamp: 1793095817722
                  user: '0x3b8e1c2d4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c'
                  builder: null
                  fills:
                    - coin: ETH
                      px: '3949.8'
                      sz: '2.5'
                      side: B
                      time: 1793095817722
                      startPosition: '0'
                      dir: Open Long
                      closedPnl: '0'
                      hash: >-
                        0x7a1c9e4b2d8f6a3c5e0b9d7f1a4c6e8b2d0f3a5c7e9b1d4f6a8c0e2b4d6f8a1c
                      oid: 586400000002
                      crossed: true
                      tid: 1023400000000002
                      fee: '3.555'
                      feeToken: USDC
                      twapId: null
                - twapId: 2400001
                  status: finished
                  statusTimestamp: 1793123600000
                  user: '0x3b8e1c2d4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c'
                  builder: null
                  twap:
                    coin: ETH
                    side: A
                    sz: '3.0'
                    executedSz: '3.0'
                    executedNtl: '7050.12'
                    minutes: 30
                    randomize: false
                    reduceOnly: false
                    timestamp: 1793121800000
                    stopPx: null
                    trigger: null
                    user: '0x3b8e1c2d4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c'
          headers:
            X-Has-More:
              description: '`true` when a next page exists'
              schema:
                type: string
                enum:
                  - 'true'
                  - 'false'
            X-Next-Cursor:
              description: >-
                Value to pass as `cursor` for the next page (the last
                millisecond served)
              schema:
                type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - BearerAuth: []
components:
  responses:
    Unauthorized:
      description: >-
        Missing or invalid API key. The body is `missing api key` or `invalid
        api key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid API key
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Hypedexer API key, sent as `Authorization: Bearer <key>`. The
        `X-API-Key: <key>` header and the `api_key` query parameter are accepted
        as well.

````

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