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

# Orders

> Order listing, creation and cancellation endpoint reference

## List Orders

```text theme={null}
GET /api/v1/orders
```

**Authentication:** `API key HMAC`

Query parameters:

| Query        | Type           | Required | Description                                                                                         |
| ------------ | -------------- | -------- | --------------------------------------------------------------------------------------------------- |
| `market`     | UUID string    | No       | Market UUID.                                                                                        |
| `status`     | enum string    | No       | `PENDING`, `EXECUTING`, `EXECUTED` or `REJECTED`. `CANCELLED` is rejected; use `/orders/paginated`. |
| `maker`      | address string | No       | Maker address.                                                                                      |
| `marketName` | string         | No       | Case-insensitive partial market name.                                                               |
| `sortBy`     | enum string    | No       | `created_at`, `total`, `amount` or `filled`. Default `created_at`.                                  |
| `order`      | enum string    | No       | `ASC` or `DESC`. Default `DESC`.                                                                    |

Response type: `OrderWithMarket[]`.

When `status` is omitted, the endpoint returns all non-cancelled statuses. Passing `status=CANCELLED` returns `400`.

## List Orders Paginated

```text theme={null}
GET /api/v1/orders/paginated
```

**Authentication:** `API key HMAC`

Query parameters:

| Query        | Type           | Required | Description                                                                              |
| ------------ | -------------- | -------- | ---------------------------------------------------------------------------------------- |
| `market`     | UUID string    | No       | Market UUID.                                                                             |
| `status`     | enum string    | No       | `PENDING`, `EXECUTING`, `EXECUTED`, `CANCELLED` or `REJECTED`.                           |
| `maker`      | address string | No       | Maker address.                                                                           |
| `marketName` | string         | No       | Case-insensitive partial market name.                                                    |
| `page`       | integer        | No       | Page number. Default `1`.                                                                |
| `limit`      | integer        | No       | Results per page. Default `30`.                                                          |
| `sortBy`     | enum string    | No       | `created_at`, `total`, `amount` or `filled`. Default `created_at`.                       |
| `order`      | enum string    | No       | `ASC` or `DESC`. Default `DESC`.                                                         |
| `total`      | boolean        | No       | Include a bounded total count. Default `false`.                                          |
| `cursor`     | string         | No       | Opaque cursor from the previous response. Valid only with the default `created_at` sort. |

When `status` is omitted, this endpoint returns active orders only: `PENDING` and `EXECUTING`.

Response type: `OrderPagination`.

| Field         | Type                | Required | Description                                        |
| ------------- | ------------------- | -------- | -------------------------------------------------- |
| `first`       | integer             | Yes      | One-based index of the first row.                  |
| `last`        | integer             | Yes      | One-based index of the last row.                   |
| `limit`       | integer             | Yes      | Results per page.                                  |
| `total`       | integer or null     | Yes      | Bounded total when `total=true`; otherwise `null`. |
| `totalCapped` | boolean             | No       | Whether `total` reached the server-side cap.       |
| `data`        | `OrderWithMarket[]` | Yes      | Orders on this page.                               |
| `hasMore`     | boolean             | Yes      | Whether another cursor page exists.                |
| `nextCursor`  | string or null      | Yes      | Opaque cursor for the next page.                   |

## Get Order

```text theme={null}
GET /api/v1/orders/{id}
```

**Authentication:** `API key HMAC`

Path parameters:

| Parameter | Type        | Required | Description |
| --------- | ----------- | -------- | ----------- |
| `id`      | UUID string | Yes      | Order UUID. |

Response type: `OrderWithMarket`.

## Create Order

```text theme={null}
POST /api/v1/orders
```

**Authentication:** `API key HMAC`

Request body type: `CreateOrder`.

| Field            | Type           | Required | Description                                                                                   |
| ---------------- | -------------- | -------- | --------------------------------------------------------------------------------------------- |
| `salt`           | string         | Yes      | Unique uint256 numeric string. Max 78 characters.                                             |
| `taker`          | address string | Yes      | Taker address. Use the zero address for open GTC maker orders.                                |
| `tokenId`        | string         | Yes      | Outcome token ID as a numeric string. Max 78 characters.                                      |
| `makerAmount`    | string         | Yes      | Positive integer string in base units. Max 78 characters.                                     |
| `takerAmount`    | string         | Yes      | Positive integer string in base units. Max 78 characters.                                     |
| `expiration`     | integer        | Yes      | Unix timestamp in seconds, or `0`.                                                            |
| `feeRateBps`     | integer        | No       | Fee rate in basis points. Range `0` to `10000`.                                               |
| `side`           | integer        | Yes      | `0` buy, `1` sell.                                                                            |
| `signature`      | string         | No       | Client-side EIP-712 order signature.                                                          |
| `orderType`      | enum string    | Yes      | `GTC`, `FOK` or `FAK`.                                                                        |
| `postOnly`       | boolean        | No       | Maker-only flag. Valid for GTC only; a crossing post-only order is rejected. Default `false`. |
| `priceUint`      | string         | No       | Server-compatible price integer.                                                              |
| `idempotencyKey` | UUID v4 string | No       | Client key for deduplicating repeated submission of the same logical order.                   |

Response type: `Order`.

## Create Batch Orders

```text theme={null}
POST /api/v1/orders/batch
```

**Authentication:** `API key HMAC`

Request body:

| Field    | Type            | Required | Description                                  |
| -------- | --------------- | -------- | -------------------------------------------- |
| `orders` | `CreateOrder[]` | Yes      | Orders to create. Minimum `1`, maximum `50`. |

Response type: `CreateBatchOrdersResponse`.

| Field     | Type                 | Required | Description                         |
| --------- | -------------------- | -------- | ----------------------------------- |
| `results` | `BatchOrderResult[]` | Yes      | Per-order results in request order. |

`BatchOrderResult`:

| Field     | Type        | Required | Description                                |
| --------- | ----------- | -------- | ------------------------------------------ |
| `index`   | integer     | Yes      | Index of the order in the submitted batch. |
| `success` | boolean     | Yes      | Whether that order was created.            |
| `orderId` | UUID string | No       | Created order UUID when successful.        |
| `error`   | string      | No       | Error message when unsuccessful.           |

## Cancel Order

```text theme={null}
POST /api/v1/orders/{id}/cancel
```

**Authentication:** `API key HMAC`

Path parameters:

| Parameter | Type        | Required | Description |
| --------- | ----------- | -------- | ----------- |
| `id`      | UUID string | Yes      | Order UUID. |

Response type: `Order`.

## Cancel Batch Orders

```text theme={null}
POST /api/v1/orders/batch-cancel
```

**Authentication:** `API key HMAC`

Request body:

| Field      | Type           | Required | Description                                       |
| ---------- | -------------- | -------- | ------------------------------------------------- |
| `orderIds` | UUID string\[] | Yes      | Order UUIDs to cancel. Minimum `1`, maximum `50`. |

Response type: `BatchCancelOrdersResponse`.

| Field     | Type                       | Required | Description                     |
| --------- | -------------------------- | -------- | ------------------------------- |
| `results` | `BatchCancelOrderResult[]` | Yes      | Per-order cancellation results. |

`BatchCancelOrderResult`:

| Field     | Type        | Required | Description                      |
| --------- | ----------- | -------- | -------------------------------- |
| `orderId` | UUID string | Yes      | Order UUID.                      |
| `success` | boolean     | Yes      | Whether the order was cancelled. |
| `error`   | string      | No       | Error message when unsuccessful. |

## Cancel Market Orders

```text theme={null}
POST /api/v1/orders/cancel
```

**Authentication:** `API key HMAC`

Request body:

| Field    | Type        | Required | Description  |
| -------- | ----------- | -------- | ------------ |
| `market` | UUID string | Yes      | Market UUID. |

Response type: `Order[]`.

## Cancel Event Orders

```text theme={null}
POST /api/v1/orders/cancel-event
```

**Authentication:** `API key HMAC`

Cancels all of your open orders across every market in one event.

Request body:

| Field     | Type        | Required | Description        |
| --------- | ----------- | -------- | ------------------ |
| `eventId` | UUID string | Yes      | Parent event UUID. |

Response type: `CancelAllOrdersResponse`.

| Field            | Type           | Required | Description                                               |
| ---------------- | -------------- | -------- | --------------------------------------------------------- |
| `clearedMarkets` | UUID string\[] | Yes      | Event-market UUIDs with orders successfully cancelled.    |
| `failedMarkets`  | UUID string\[] | No       | Event-market UUIDs that failed cancellation. Retry these. |

## Cancel All Orders

```text theme={null}
POST /api/v1/orders/cancel-all
```

**Authentication:** `API key HMAC`

Response type: `CancelAllOrdersResponse`.

| Field            | Type           | Required | Description                                         |
| ---------------- | -------------- | -------- | --------------------------------------------------- |
| `clearedMarkets` | UUID string\[] | Yes      | Market UUIDs with orders successfully cancelled.    |
| `failedMarkets`  | UUID string\[] | No       | Market UUIDs that failed cancellation. Retry these. |

## Get Order Book Events

```text theme={null}
GET /api/v1/orders/events
```

**Authentication:** `API key HMAC`

Query parameters:

| Query   | Type    | Required | Description                          |
| ------- | ------- | -------- | ------------------------------------ |
| `page`  | integer | No       | Page number. Default `1`.            |
| `limit` | integer | No       | Results per page. Default `30`.      |
| `total` | boolean | No       | Include total count. Default `true`. |

Response type: `Pagination<OrderbookEvent>`.

When `total=true`, the count is bounded and the response can include `totalCapped`.

## Order

| Field           | Type               | Required | Description                                                    |
| --------------- | ------------------ | -------- | -------------------------------------------------------------- |
| `id`            | UUID string        | Yes      | Order UUID.                                                    |
| `salt`          | string             | Yes      | Order salt.                                                    |
| `maker`         | address string     | Yes      | Maker address.                                                 |
| `signer`        | address string     | Yes      | Signer address.                                                |
| `taker`         | address string     | Yes      | Taker address.                                                 |
| `tokenId`       | string             | Yes      | Outcome token ID.                                              |
| `makerAmount`   | number             | Yes      | Maker amount in base units.                                    |
| `takerAmount`   | number             | Yes      | Taker amount in base units.                                    |
| `expiration`    | integer            | Yes      | Unix timestamp in seconds, or `0`.                             |
| `nonce`         | integer            | Yes      | Maker nonce.                                                   |
| `feeRateBps`    | integer            | Yes      | Fee rate in basis points.                                      |
| `side`          | integer            | Yes      | `0` buy, `1` sell.                                             |
| `signatureType` | integer            | Yes      | Signature type.                                                |
| `signature`     | string             | Yes      | EIP-712 signature.                                             |
| `market`        | UUID string        | Yes      | Market UUID.                                                   |
| `orderType`     | enum string        | Yes      | `GTC`, `FOK` or `FAK`.                                         |
| `postOnly`      | boolean            | No       | Whether the order was submitted as maker-only.                 |
| `owner`         | UUID string        | Yes      | Hit user ID that owns the order.                               |
| `outcome`       | string             | Yes      | Outcome label.                                                 |
| `status`        | enum string        | Yes      | `PENDING`, `EXECUTING`, `EXECUTED`, `CANCELLED` or `REJECTED`. |
| `createdAt`     | string (date-time) | Yes      | Creation timestamp.                                            |
| `amount`        | number             | Yes      | Order size in display units.                                   |
| `price`         | number             | Yes      | Limit price.                                                   |
| `matchedAmount` | number             | Yes      | Filled amount in display units.                                |
| `hash`          | string             | Yes      | Order hash.                                                    |
| `priceUint`     | string             | Yes      | Integer price representation.                                  |
| `metadata`      | object             | No       | Additional order metadata.                                     |

`OrderWithMarket` contains every `Order` field plus required `marketInfo: OrderMarketInfo`. `GET /orders`, `GET /orders/paginated` and `GET /orders/{id}` return this enriched shape. Order values returned by create-order, cancel-order and cancel-market endpoints use the plain `Order` shape. Batch and cancel-all responses use the wrapper types documented above.

`OrderMarketInfo`:

| Field            | Type        | Required | Description                                            |
| ---------------- | ----------- | -------- | ------------------------------------------------------ |
| `icon`           | string      | Yes      | Market icon URL.                                       |
| `slug`           | string      | Yes      | Market slug.                                           |
| `title`          | string      | Yes      | Market title.                                          |
| `outcomeIndex`   | integer     | Yes      | Outcome index associated with the order.               |
| `eventId`        | UUID string | No       | Parent event UUID.                                     |
| `eventName`      | string      | No       | Parent event name.                                     |
| `eventIcon`      | string      | No       | Parent event icon URL.                                 |
| `isMultiMarket`  | boolean     | Yes      | Whether the parent event contains multiple markets.    |
| `isSeriesLayout` | boolean     | Yes      | Whether the parent event uses the daily-series layout. |

## OrderbookEvent

| Field         | Type                     | Required | Description                             |
| ------------- | ------------------------ | -------- | --------------------------------------- |
| `id`          | UUID string              | No       | Event UUID.                             |
| `name`        | string                   | No       | Event name.                             |
| `slug`        | string                   | No       | Event slug.                             |
| `createdAt`   | string (date-time)       | No       | Creation timestamp.                     |
| `startDate`   | string (date-time)       | No       | Event start timestamp.                  |
| `endDate`     | string (date-time)       | No       | Event end timestamp.                    |
| `single`      | boolean                  | No       | Whether the event has one market.       |
| `marketsView` | `OrderbookEventMarket[]` | No       | Active orderbook markets for the event. |

`OrderbookEventMarket`:

| Field                    | Type        | Required | Description                             |
| ------------------------ | ----------- | -------- | --------------------------------------- |
| `id`                     | UUID string | No       | Market UUID.                            |
| `name`                   | string      | Yes      | Market name.                            |
| `tokenId1`               | string      | Yes      | Outcome 1 token ID.                     |
| `tokenId2`               | string      | Yes      | Outcome 2 token ID.                     |
| `outcome1`               | string      | Yes      | Outcome 1 label.                        |
| `outcome2`               | string      | Yes      | Outcome 2 label.                        |
| `orderFeeRateBps`        | integer     | Yes      | Active order fee rate in basis points.  |
| `passiveOrderFeeRateBps` | integer     | Yes      | Passive order fee rate in basis points. |
