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

# ordersByIds: Fetch Orders by Exchange-Assigned Order IDs

> Fetch one or more orders by their exchange-assigned order IDs to check status, fill details, or confirm cancellation without scanning the full order list.

The `ordersByIds` query lets you fetch one or more specific orders using their exchange-assigned order IDs — the `id` values returned by `userOrders` or an order placement response. This is the most direct way to check order status or confirm a cancellation without retrieving your entire order list. The response `orders[]` array uses the same fields as [`userOrders`](/info/user-orders).

## Request

```json theme={"system"}
{
  "type": "ordersByIds",
  "marketDeployerId": 1,
  "orderIds": ["8280", "8281"]
}
```

<ParamField body="type" type="string" required>
  Must be `"ordersByIds"`.
</ParamField>

<ParamField body="marketDeployerId" type="integer" required>
  The market deployer the orders belong to.
</ParamField>

<ParamField body="orderIds" type="string[]" required>
  Array of exchange-assigned order IDs to look up, each expressed as an int64 decimal string (e.g. `["8280", "8281"]`). You can pass a single-element array to look up one order.
</ParamField>

## Response

```json theme={"system"}
{
  "type": "ordersByIds",
  "marketDeployerId": 1,
  "orders": [
    {
      "id": "8280",
      "clientOrderId": "0",
      "accountId": "5",
      "contractId": 1,
      "marginMode": "C",
      "positionSide": "OneWay",
      "orderSide": "B",
      "orderType": "L",
      "timeInForce": "Gtc",
      "price": "50",
      "size": "10",
      "leverage": "10",
      "status": "Open",
      "reduceOnly": false
    }
  ]
}
```

The `orders` array contains the same fields described in [`userOrders`](/info/user-orders#order-fields). Orders not found for a given ID are silently omitted from the response — check that the returned array length matches your input if you need to confirm all IDs resolved.
