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

# historicalOrders | Hyperliquid Info API

> Hyperliquid historicalOrders: fetch a user's recent orders - both open and finalized - each with its current status and status timestamp.

<CardGroup cols={2}>
  <Card title="Credit Cost"> 1 per call</Card>
  <Card title="Processing"> Realtime</Card>
</CardGroup>

The Hyperliquid info endpoint with `type: "historicalOrders"` is used to fetch a user's recent orders - both open and finalized - each with its current status and status timestamp.

<Tip>
  Estimate your monthly cost for this API using the [Pricing Calculator](/docs/pricing-calculator?endpoint=%2Fapi-reference%2Fhyperliquid-info%2Fhistorical-orders).
</Tip>

<Info>
  * Wire-equal to `POST api.hyperliquid.xyz/info` with `{"type": "historicalOrders", "user": "0x..."}`.
  * Returns the user's most recent orders across every coin, **open and finalized** (filled, canceled, and other terminal states). For only the currently-resting orders, use <a href="/docs/api-reference/hyperliquid-info/open-orders">`openOrders`</a> or <a href="/docs/api-reference/hyperliquid-info/frontend-open-orders">`frontendOpenOrders`</a>.
  * `limit` caps the number returned; the **default and maximum is 2000**.
</Info>

Returns an array of the user's recent orders, newest-relevant first, each wrapped with the order's terminal-or-current `status` and the millisecond timestamp that status was set. Use it to reconstruct recent order history, audit fills/cancels, or drive an activity view.

## Endpoint

```
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
```

## Request

<ParamField body="type" type="string" required default="historicalOrders">
  Always `"historicalOrders"`.
</ParamField>

<ParamField body="user" type="string" required>
  The account address in 42-character hex format, e.g. `"0x0000000000000000000000000000000000000000"`.
</ParamField>

<ParamField body="limit" type="int">
  Maximum number of orders to return. Defaults to `2000`; values above `2000` are capped at `2000`.
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://hypercore.goldrushdata.com/info \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "type": "historicalOrders",
      "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
      "limit": 100
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch("https://hypercore.goldrushdata.com/info", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      type: "historicalOrders",
      user: "0x31ca8395cf837de08b24da3f660e77761dfb974b",
      limit: 100,
    }),
  });

  const orders = await response.json();
  for (const { order, status, statusTimestamp } of orders) {
    console.log(order.coin, order.side, order.oid, status, statusTimestamp);
  }
  ```

  ```python Python theme={null}
  import os, requests

  response = requests.post(
      "https://hypercore.goldrushdata.com/info",
      headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
      json={"type": "historicalOrders", "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b", "limit": 100},
  )

  for entry in response.json():
      o = entry["order"]
      print(o["coin"], o["side"], o["oid"], entry["status"], entry["statusTimestamp"])
  ```
</CodeGroup>

## Response

An array of order entries. Each element pairs the `order` with its `status` and the millisecond timestamp that status took effect.

```json theme={null}
[
  {
    "order": {
      "coin": "POPCAT",
      "side": "A",
      "limitPx": "0.043668",
      "sz": "16812.0",
      "oid": 513957677284,
      "timestamp": 1786384269962,
      "triggerCondition": "N/A",
      "isTrigger": false,
      "triggerPx": "0.0",
      "children": [],
      "isPositionTpsl": false,
      "reduceOnly": false,
      "orderType": "Limit",
      "origSz": "16812.0",
      "tif": "Alo",
      "cloid": null
    },
    "status": "canceled",
    "statusTimestamp": 1786384274789
  }
]
```

### Field descriptions

<Note>
  `limitPx`, `sz`, `origSz`, and `triggerPx` are returned as **decimal strings**, preserving upstream precision. Do not parse them as floats.
</Note>

<ResponseField name="[]" type="array<object>">
  One entry per order.

  <Expandable title="entry fields">
    <ResponseField name="order" type="object">
      The order.

      <Expandable title="order fields">
        <ResponseField name="coin" type="string">Asset symbol, e.g. `"BTC"`, `"POPCAT"`, or `"@107"` for spot.</ResponseField>
        <ResponseField name="side" type="string">`"B"` = bid (buy), `"A"` = ask (sell).</ResponseField>
        <ResponseField name="limitPx" type="string">Limit price (decimal string).</ResponseField>
        <ResponseField name="sz" type="string">Remaining size (decimal string).</ResponseField>
        <ResponseField name="origSz" type="string">Original order size (decimal string).</ResponseField>
        <ResponseField name="oid" type="int">Order id.</ResponseField>
        <ResponseField name="cloid" type="string | null">Client order id (hex) if one was supplied, else `null`.</ResponseField>
        <ResponseField name="timestamp" type="int">Order creation time (ms since epoch).</ResponseField>
        <ResponseField name="orderType" type="string">e.g. `"Limit"`, `"Stop Market"`, `"Stop Limit"`.</ResponseField>
        <ResponseField name="tif" type="string | null">Time-in-force, e.g. `"Alo"`, `"Gtc"`, `"Ioc"`.</ResponseField>
        <ResponseField name="reduceOnly" type="bool">Whether the order is reduce-only.</ResponseField>
        <ResponseField name="isTrigger" type="bool">Whether it is a trigger (stop/take-profit) order.</ResponseField>
        <ResponseField name="triggerCondition" type="string">Human-readable trigger condition, or `"N/A"`.</ResponseField>
        <ResponseField name="triggerPx" type="string">Trigger price (decimal string).</ResponseField>
        <ResponseField name="isPositionTpsl" type="bool">Whether it is a position-level TP/SL.</ResponseField>
        <ResponseField name="children" type="array">Child orders (e.g. TP/SL legs) attached to this order.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="status" type="string">The order's current or terminal status. Hyperliquid defines many values; observed examples include `"open"`, `"filled"`, `"canceled"`, `"selfTradeCanceled"`, and `"iocCancelRejected"`.</ResponseField>
    <ResponseField name="statusTimestamp" type="int">Millisecond timestamp when the status took effect.</ResponseField>
  </Expandable>
</ResponseField>

## Related endpoints

<CardGroup cols={2}>
  <Card title="orderStatus" href="/docs/api-reference/hyperliquid-info/order-status">Look up the status of a single order by `oid` or `cloid`.</Card>
  <Card title="openOrders" href="/docs/api-reference/hyperliquid-info/open-orders">A user's currently-resting open orders.</Card>
  <Card title="frontendOpenOrders" href="/docs/api-reference/hyperliquid-info/frontend-open-orders">Open orders with additional frontend fields.</Card>
  <Card title="userFills" href="/docs/api-reference/hyperliquid-info/user-fills">A user's recent fills.</Card>
</CardGroup>
