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

# Take profits & stop losses

> Take-profit and stop-loss trigger-order routes across Hyperliquid core, HIP-3, and HIP-4, with the window and wallet filter params.

Take-profit and stop-loss orders are trigger orders: they rest until a price condition fires. This route returns trigger-order lifecycle rows, including take-profit and stop-loss orders, for a symbol. Use `order_type` and `trigger_condition` to identify the trigger type. It is available on Hyperliquid core, HIP-3, and HIP-4.

Use this route to see which trigger orders were placed, canceled, or fired, including their trigger condition and price. Use [Trades](/rest-api/trades) for any resulting execution and [Order history](/rest-api/order-history) for the wider lifecycle.

<Warning>
  Take-profit and stop-loss records are drawn from the same `l4_orders` order-event capture as order history, so they share its coverage start: Hyperliquid core and HIP-3 begin 2026-03-10; HIP-4 begins 2026-05-02. A query entirely before that window returns `200` with an empty array — that means the dataset doesn't cover that period, not that no trigger orders existed. For fills from before the order-event start date, use [Trades](/rest-api/trades) instead.
</Warning>

## Get take profits & stop losses

<Tabs>
  <Tab title="Hyperliquid">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/hyperliquid/orders/BTC/tpsl?start=1783885994093&end=1783885994093&limit=1" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/v1/hyperliquid/orders/{symbol}/tpsl`. Plain perp symbols such as `BTC`.
  </Tab>

  <Tab title="HIP-3">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/hyperliquid/hip3/orders/km:US500/tpsl" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/v1/hyperliquid/hip3/orders/{symbol}/tpsl`. Namespaced builder symbols, case-sensitive.
  </Tab>

  <Tab title="HIP-4">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/hyperliquid/hip4/orders/%230/tpsl" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/v1/hyperliquid/hip4/orders/{symbol}/tpsl`. Outcome side ids such as `%230`.
  </Tab>
</Tabs>

The current OpenAPI leaves each response item untyped. The Hyperliquid core example below is representative and abridged. Fields can be omitted or added by order type and venue family, so capture a live fixture before binding a strict client model.

## Request parameters

| Parameter   | In    | Type    | Required | Description                                                                                                                                        |
| ----------- | ----- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `symbol`    | path  | string  | Yes      | Trading pair symbol, e.g. `BTC`                                                                                                                    |
| `start`     | query | integer | No       | Start time, Unix milliseconds (e.g. `1767225600000`)                                                                                               |
| `end`       | query | integer | No       | End time, Unix milliseconds                                                                                                                        |
| `triggered` | query | boolean | No       | Filter by whether the trigger fired                                                                                                                |
| `user`      | query | string  | No       | Filter by wallet address. `user_address` is not read by this route — passing it is silently ignored and returns unfiltered results, so use `user`. |
| `limit`     | query | integer | No       | Max results. Default 1000, max 10000                                                                                                               |
| `cursor`    | query | string  | No       | Pagination cursor from `meta.next_cursor`                                                                                                          |

## Example response

Hyperliquid core, `BTC`. The example is representative and abridged. The wallet and request ID values are synthetic. The opaque response cursor and transaction hash are omitted.

```json theme={"theme":"github-dark"}
{
  "success": true,
  "data": [
    {
      "timestamp": "2026-07-12T19:53:14.093Z",
      "block_time": "2026-07-12T19:53:14.093Z",
      "block_number": 1070255443,
      "seq": 418,
      "coin": "BTC",
      "user_address": "0x1234567890abcdef1234567890abcdef12345678",
      "status": "open",
      "side": "B",
      "limit_price": 70169,
      "size": 0.03158,
      "orig_size": 0.03158,
      "oid": 494263411055,
      "order_type": "Stop Market",
      "trigger_condition": "Price above 64972",
      "trigger_price": 64972,
      "is_trigger": true,
      "is_position_tpsl": false,
      "reduce_only": true
    }
  ],
  "meta": {
    "count": 1,
    "request_id": "33333333-3333-4333-8333-333333333333"
  }
}
```

## When to use it

A take-profit or stop-loss sits as a trigger until its price condition fires. Triggering and filling are separate lifecycle events. Pair this route with [Trades](/rest-api/trades) to see whether the triggered order executed and [Order history](/rest-api/order-history) to follow later status changes. Use the `user` filter to study one wallet's risk management, or pull the whole symbol to see where triggers cluster around price. Keep the trigger price, side, status, and timestamps together so you can follow the sequence without treating one event as the order's final state.

## Stream it live

There is no dedicated take-profit or stop-loss channel. Trigger orders surface in the L4 order-event stream (`l4_orders`, plus the venue-prefixed variants), where you can filter for trigger order types as they are placed, fired, or canceled.

```javascript theme={"theme":"github-dark"}
ws.send(JSON.stringify({ op: "subscribe", channel: "l4_orders", symbol: "BTC" }));
```

Connection and reconnect handling live in the [WebSocket](/websocket) tab; see [WebSocket channels](/websocket/channels) for the family matrix.

## Export in bulk

Take-profit and stop-loss records ship in the `l4_orders` (Order Events / TP/SL) export schema (`$8/GB`, `$25 minimum`), delivered as Parquet with ZSTD compression. Build a selection in the [Data catalog](/data-catalog); columns and coverage keys are on [Export schemas](/export-schemas).

## Next

Use [Order history](/rest-api/order-history) for full order lifecycle, [Order flow](/rest-api/order-flow) for aggregated activity, or [Order books](/rest-api/order-books) for the L4 book.
