# Last order ID

### Overview

`last_order_id` is an exchange-wide, nonce included in all trading-related API responses. Use it to determine the ordering of events across endpoints without relying on server timestamps.

### Why Use It

Server-side timestamps can be affected by clock drift. last\_order\_id provides guaranteed sequential ordering across all trading events.

### Affected Endpoints

#### REST API

* [/api/v1/positions](https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-positions)
* [/api/v1/trades](https://docs.pacifica.fi/api-documentation/api/rest-api/markets/get-recent-trades)
* [/api/v1/orders](https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-open-orders)

#### WebSocket

* [bbo](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/best-bid-offer-bbo)
* [trades](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/trades)
* [account\_positions](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-positions)
* [account\_orders](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-orders)
* [account\_order\_updates](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-order-updates)
* [account\_trades](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-trades)

### Notes

* The last\_order\_id is shared across all above endpoints, allowing you to sequence events from different streams relative to each other.
* For specific response implementation, check each endpoints' docs above.


---

# 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://pacifica.gitbook.io/docs/api-documentation/api/last-order-id.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.
