---
title: Check how much of an order filled
description: Answer a cancellation ticket from the paper order record. Look it up by Alpaca ID or recover it with the ID your app assigned.
url: https://paper-orders.salmaddocs.com/guides/check-an-order
---

# Check how much of an order filled

Answer a cancellation ticket from the paper order record. Look it up by Alpaca ID or recover it with the ID your app assigned.

## Did any shares fill before cancellation?

A canceled paper order for US stocks can have earlier fills. If the support ticket gives only the status, the quantity is unknown. [Look up the existing paper order by its Alpaca ID](#look-up-an-existing-paper-order) with the read-only `GET /v2/orders/{order_id}` and check `filled_qty`. Zero means no shares filled. A positive value gives the total shares filled before cancellation.

**Reply before checking the record**

> Cancellation stops the unfilled part of your paper order. Could you share the order ID so I can check how many shares filled?

If your app lost the response and saved its own ID, [recover the order by client order ID](#recover-the-order-after-a-lost-response). To see how the answer changes once you have a record, inspect the synthetic canceled order in the lab folder from the [quickstart](/quickstart).

```sh
node inspect.mjs fixtures/canceled.json
```

The synthetic paper order reports `status: canceled`, `qty: "10"` and `filled_qty: "3"`. Three shares filled before cancellation. The remaining seven will not execute on that order. For this fixture, show **3 of 10 filled, remainder canceled**. That count belongs to this order. An account position can include other orders.

| Sample snapshot | Status | Filled so far |
| --- | --- | ---: |
| Received | `accepted` | 0 of 10 |
| Partly executed | `partially_filled` | 3 of 10 |
| Remainder canceled | `canceled` | 3 of 10 |

The three rows have the same order ID. Adding their filled quantities would double-count the same three shares. These are selected example snapshots. An order can follow other paths. [Alpaca order lifecycle](https://docs.alpaca.markets/us/docs/orders-at-alpaca)

## Look up a paper order by Alpaca ID

Use the Alpaca-assigned `id` from the order object as the path parameter for `GET /v2/orders/{order_id}`. The UUID in the lab belongs only to the fixture. For an account lookup, use a US stock order placed by share quantity and the paper Trading API keys for the account that placed it.

Set `ORDER_ID`, `APCA_API_KEY_ID` and `APCA_API_SECRET_KEY` in your shell, then run this command from the extracted lab folder.

```sh
curl --fail-with-body --silent --show-error \
  -H "APCA-API-KEY-ID: $APCA_API_KEY_ID" \
  -H "APCA-API-SECRET-KEY: $APCA_API_SECRET_KEY" \
  "https://paper-api.alpaca.markets/v2/orders/${ORDER_ID:?Set ORDER_ID to the Alpaca order UUID}" \
  -o order.json && node inspect.mjs order.json
```

On success, match the printed `Order` to the ticket. Read `Status` and `Filled` together. The script preserves fractional shares for `asset_class: "us_equity"` and prints `units` if an older snapshot omits the asset class. A notional order specifies a cash amount and may have no `qty`. [Order lookup reference](https://docs.alpaca.markets/us/reference/getorderbyorderid-1) · [Paper trading environment](https://docs.alpaca.markets/us/docs/paper-trading)

## Recover a lost response by client order ID

If the original response timed out and your app saved its `client_order_id`, use the read-only `GET /v2/orders:by_client_order_id` to recover the existing order. A timeout leaves its status unknown. Submitting again can create a second order.

Set `CLIENT_ORDER_ID` to the exact value your app saved. From the extracted lab folder, use the keys for the same paper account. The command encodes the client ID as a query parameter.

```sh
curl --get --fail-with-body --silent --show-error \
  -H "APCA-API-KEY-ID: $APCA_API_KEY_ID" \
  -H "APCA-API-SECRET-KEY: $APCA_API_SECRET_KEY" \
  --data-urlencode "client_order_id=${CLIENT_ORDER_ID:?Set CLIENT_ORDER_ID to the ID your app saved}" \
  "https://paper-api.alpaca.markets/v2/orders:by_client_order_id" \
  -o order.json && node inspect.mjs order.json
```

A successful lookup returns the Alpaca `id`, `status` and cumulative `filled_qty`. The inspector prints the Alpaca ID as `Order`, so you can save it with your original client ID. If either lookup returns HTTP 404, the fill quantity is still unknown. Check the account, ID type and exact saved value before repeating the lookup. A missing record cannot establish a zero fill. [Client order ID lookup](https://docs.alpaca.markets/us/reference/getorderbyclientorderid)