---
title: GET /v1/orders/{id}
---

# `GET /v1/orders/{id}`

Get an order

One order's status.

Money, price, rate and count fields cross the wire as decimal strings; units are shown beside each field ([Wire encoding](/api/wire-encoding)). Group: [Orders](/api/reference/orders/).

**Auth:** API key (`x-api-key`)

**Scope:** `read`

**Rate limit:** the `read` budget ([Rate limits](/api/rate-limits))

**Effect:** `read`: reads only

## Parameters

- <span id="param-id"></span>`id` (path) · string · required

## Request

```bash [curl]
curl -fsS "$HB/v1/orders/$ID" \
  -H "x-api-key: $HB_KEY"
```

```python [Python]
import os

import requests

HB = os.environ.get("HB", "https://testnet.hardbasis.com")
ID = os.environ["ID"]

resp = requests.get(
    f"{HB}/v1/orders/{ID}",
    headers={
        "x-api-key": os.environ["HB_KEY"],
    },
)
resp.raise_for_status()
print(resp.json())
```

```ts [TypeScript]
const HB = process.env.HB ?? "https://testnet.hardbasis.com";
const ID = process.env.ID!;

const res = await fetch(`${HB}/v1/orders/${ID}`, {
  method: "GET",
  headers: {
    "x-api-key": process.env.HB_KEY!,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
```

## Responses

- **200**: OK
  - <span id="res-200-orderId"></span>`orderId` · string · required
  - <span id="res-200-marketId"></span>`marketId` · string · required
  - <span id="res-200-side"></span>`side` · enum(`buy`, `sell`) · required
  - <span id="res-200-type"></span>`type` · enum(`market`, `limit`, `stop_market`, `take_profit_market`) · required
  - <span id="res-200-contracts"></span>`contracts` · string · unit `contracts` · required
  - <span id="res-200-sizeShares"></span>`sizeShares` · string \| null · optional
  - <span id="res-200-status"></span>`status` · enum(`accepted`, `filled`, `canceled`, `rejected`) · required
  - <span id="res-200-reason"></span>`reason` · string \| null · required
  - <span id="res-200-heldUntilTsMs"></span>`heldUntilTsMs` · string \| null · unit `ms` · optional: Set only while the order is held: it is an accepted limit order, on an account that is not under an admin orders block, its market follows the NASDAQ calendar and is outside regular trading hours, and a fill would open or increase exposure against the account's current position. A held order is not evaluated against prices until this instant, the next session open, and is neither filled nor rejected meanwhile. null when the order is not held. Evaluated at the time of the request; no WebSocket frame carries it, so refetch the order when this instant passes.

Example `200` response:

```json
{
  "orderId": "string",
  "marketId": "string",
  "side": "buy",
  "type": "market",
  "contracts": "100000",
  "sizeShares": "string",
  "status": "accepted",
  "reason": "string",
  "heldUntilTsMs": "100000"
}
```

## Errors

Every refusal carries a stable `code` from [`ErrorCode`](/api/reference/all#errorcode) beside human `error` prose; match on the code. See [Errors](/api/errors).

- **401**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **403**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **404**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **429**: A token bucket is exhausted.
