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

# Open Orders

> Understanding and managing open orders

## Order Quantity Fields

In the response from [Get Open Orders](/latest/perps/rest-api/get-account-open-orders):

* **`quantity`**: The remaining quantity of the order yet to be filled.
* **`filledQuantity`**: The cumulative quantity that has already been filled.

The sum of `quantity` and `filledQuantity` equals the original order quantity.

## Order Statuses

<Note>
  All open orders—regardless of status (`active`, `pending`, `cancelling`, or `modifying`)—are counted towards the [Maximum Open Orders Per Market](/latest/perps/guides/rate-limits#maximum-open-orders-per-market) limit.
</Note>

The [Get Open Orders](/latest/perps/rest-api/get-account-open-orders) endpoint returns all open orders, including those in intermediate states. The possible statuses are:

| Status         | Description                                                 |
| -------------- | ----------------------------------------------------------- |
| **active**     | Order is live in the order book and available for matching. |
| **pending**    | Order has been received and is awaiting activation.         |
| **cancelling** | Cancellation has been requested; awaiting confirmation.     |
| **modifying**  | Modification has been requested; awaiting confirmation.     |

These intermediate statuses allow for tracking orders that may be temporarily in transition.

## Polling Order Status

To check the status of an order, use the following endpoints as appropriate:

* **[Get Open Order By ID](/latest/perps/rest-api/get-account-open-order-by-id):**
  * Returns only currently open orders.
* **[Get Order By ID](/latest/perps/rest-api/get-order-by-id):**
  * Returns both open orders and recent order history (orders cancelled or filled within approximately one hour).

**Best Practices:**

* Always specify the `market` parameter in your query.
* Provide either `order-id` or `client-request-id` (never both).
  * Use `client-request-id` to check the status of an order you submitted but for which you have not yet received a response.
  * Use `order-id` when you have the order ID (e.g., for cancellations or confirmed creations).
* If the order is not found or is outside the recent-history window (\~1 hour), the endpoint will return a `404 Not Found` response.
