> ## Documentation Index
> Fetch the complete documentation index at: https://chainstack-docs-polygon-erigon-trace-deprecation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# twapHistory | Hyperliquid info

> The info endpoint with type: "twapHistory" returns a user's TWAP order history on Hyperliquid.

<Info>
  You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `info` endpoint with `type: "twapHistory"` returns a user's TWAP (time-weighted average price) order history — each record's creation time, state, and current status.

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"twapHistory"`.
* `user` (string, required) — Address in 42-character hexadecimal format.

## Response

Returns an array of TWAP history records. Each record contains:

* `time` (integer) — Creation time of the record (seconds since epoch).
* `state` (object) — The state of the TWAP order (coin, size, executed amounts, side, and related fields).
* `status` (object) — The current status, for example `{"status": "finished"}`, `{"status": "activated"}`, `{"status": "terminated"}`, or `{"status": "error", "description": "..."}`.
* `twapId` (integer) — The ID of the TWAP order.

## Example request

<CodeGroup>
  ```shell Shell theme={null}
  curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"type": "twapHistory", "user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"}' \
    https://api.hyperliquid.xyz/info
  ```

  ```python Python (hyperliquid-python-sdk) theme={null}
  from hyperliquid.info import Info
  from hyperliquid.utils import constants

  info = Info(constants.MAINNET_API_URL, skip_ws=True)

  # The SDK has no dedicated twapHistory helper, so post the request directly.
  twap_history = info.post("/info", {
      "type": "twapHistory",
      "user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568",
  })
  print(twap_history)
  ```

  ```typescript TypeScript (@nktkas/hyperliquid) theme={null}
  import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";

  const transport = new HttpTransport();
  const info = new InfoClient({ transport });

  const twapHistory = await info.twapHistory({
    user: "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568",
  });
  console.log(twapHistory);
  ```
</CodeGroup>

## Example response

```json theme={null}
[]
```

The example returns an empty array because the queried address has no TWAP history. An account with TWAP orders returns an array of history records as described above.

## Use cases

The `info` endpoint with `type: "twapHistory"` is useful for:

* Auditing a user's past TWAP orders
* Trading dashboards that show TWAP execution history
* Analyzing TWAP order outcomes over time


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_twap_history.json post /info
openapi: 3.0.0
info:
  title: Hyperliquid Node API
  version: 1.0.0
  description: This is an API for interacting with Chainstack Hyperliquid node.
servers:
  - url: https://api.hyperliquid.xyz
security: []
paths:
  /info:
    post:
      tags:
        - hyperliquid operations
      summary: info (twapHistory)
      operationId: infoTwapHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: Request type
                  default: twapHistory
                  enum:
                    - twapHistory
                user:
                  type: string
                  description: User address in 42-character hexadecimal format.
                  default: '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'
              required:
                - type
                - user
      responses:
        '200':
          description: The user's TWAP order history.
          content:
            application/json:
              schema:
                type: array
                description: >-
                  Each item is a TWAP history record with its creation time,
                  state, and status.
                items:
                  type: object
                  properties:
                    time:
                      type: integer
                      description: Creation time of the record (seconds since epoch).
                    state:
                      type: object
                      description: State of the TWAP order.
                    status:
                      type: object
                      description: >-
                        Current status of the TWAP order (e.g., finished,
                        activated, terminated, error).
                    twapId:
                      type: integer
                      description: ID of the TWAP order.

````