# Limits

Platform constraints enforced by the HermesTrade APIs. Violating these limits returns a `400` (bad request) or `429` (rate limit exceeded) error.

***

## Order size limits

Order size limits are set per market and enforced by the CLOB. They are found on the Gamma API `Market` object:

| Field          | Type   | Description                        |
| -------------- | ------ | ---------------------------------- |
| `orderMinSize` | number | Minimum number of shares per order |
| `orderMaxSize` | number | Maximum number of shares per order |

These limits apply per individual order, not to your aggregate position. Retrieve the current values for a specific market via `GET /markets/{id}` on the Gamma API before placing orders.

The CLOB API `GET /book` response also includes `min_order_size` and `max_order_size` fields in `OrderBookSummary`.

***

## Batch order limits

| Operation               | Endpoint                  | Limit                                 |
| ----------------------- | ------------------------- | ------------------------------------- |
| Batch place orders      | `POST /orders`            | Maximum **15 orders** per request     |
| Batch cancel orders     | `DELETE /orders`          | Maximum **3000 orders** per request   |
| Batch last trade prices | `GET /last-trades-prices` | Maximum **500 token IDs** per request |

Exceeding these limits returns a `400` error.

***

## Price constraints

### Valid price range

Orders must be priced between `$0.01` and `$0.99` inclusive. Shares cannot trade at exactly `$0.00` or `$1.00` while a market is open.

### Tick size

Orders must be placed at prices that are exact multiples of the market's tick size. Submitting a price that does not conform returns a `400` error.

To retrieve the tick size for a market:

| Method                                          | Notes                                       |
| ----------------------------------------------- | ------------------------------------------- |
| `GET /tick-size?token_id={tokenID}` on CLOB API | Returns the current tick size for the token |
| `GET /tick-size/{tokenID}` on CLOB API          | Equivalent, via path parameter              |
| `Market.orderPriceMinTickSize` from Gamma API   | Stored on the market object                 |

***

## API rate limits

Rate limits are not documented in the HermesTrade OpenAPI specifications. A `429 Too Many Requests` status is returned when a rate limit is exceeded. Contact the HermesTrade team for current per-IP and per-key rate limit values before building high-frequency integrations.

***

## Pagination

### CLOB API pagination

The CLOB API uses cursor-based pagination for all paginated endpoints:

| Parameter     | Type    | Description                                                                       |
| ------------- | ------- | --------------------------------------------------------------------------------- |
| `next_cursor` | string  | Cursor token returned in the previous response; pass to get the next page         |
| `limit`       | integer | Page size (maximum varies per endpoint; check API behavior)                       |
| `page`        | integer | Page number for endpoints that use offset pagination; coerced to 1 if less than 1 |
| `from_id`     | int64   | Snowflake trade ID cursor for streaming trade history                             |

Paginated public endpoints: `GET /all-orders`, `GET /all-trades`, `GET /all-transactions`. Paginated authenticated endpoints: `GET /trades`, `GET /orders`.

### Gamma API pagination

The Gamma API uses offset-based pagination for list endpoints:

| Parameter | Type    | Description                |
| --------- | ------- | -------------------------- |
| `limit`   | integer | Number of results per page |
| `offset`  | integer | Number of results to skip  |

Available on `GET /events` and `GET /games`.

***

## Heartbeat requirement

The CLOB API includes a `POST /heartbeats` endpoint. Some market-making integrations are required to send periodic heartbeats; failure to do so may result in automatic order cancellation. Contact the HermesTrade team to confirm whether your integration type requires heartbeats and what the timeout interval is.

***

## Time and interval parameters

For price history and trade streaming endpoints:

| Parameter           | Valid values                                      |
| ------------------- | ------------------------------------------------- |
| `interval`          | `1H`, `6H`, `1D`, `1W`, `1M`, `30D`, `ALL`, `MAX` |
| `startTs` / `endTs` | Unix timestamp in seconds                         |
| `fidelity`          | Bucket size in minutes (integer)                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hermestrade.xyz/reference/limits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
