> For the complete documentation index, see [llms.txt](https://pacifica.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pacifica.gitbook.io/docs/api-documentation/api/last-order-id.md).

# 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.
