---
title: "Get order"
method: GET
path: "/trading/orders/{orderId}"
tags: ["Orders"]
---

# Get order

`GET /trading/orders/{orderId}`

## Request

- Base URL: `https://api.enterprise.sandbox.uphold.com`
- URL: `https://api.enterprise.sandbox.uphold.com/trading/orders/{orderId}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/core/oauth2/token` scopes: `trading.orders:read`
- TypeScript: <https://skmtc.dev/uphold/apis/trading-api/docs/trading/orders/:orderId/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve an order by its id.

## Path parameters

- `orderId` string, uuid, required

## Headers

- `X-On-Behalf-Of` string
- `X-Uphold-User-Ip` union
  - string, ipv4
  - string, ipv6
- `X-Uphold-User-Agent` string
- `X-Uphold-User-Origin` string
- `X-Uphold-User-Country` string
- `X-Uphold-User-Subdivision` string
- `X-Uphold-User-City` string

## Response `200`

Order retrieved.

- object
  - `order` TradingOrder, required
    - `id` string, uuid, required: The id of the order.
    - `clientOrderId` string, required: The key chosen when the order was created.
    - `side` 'buy' | 'sell', required: Whether the base asset is bought or sold.
    - `type` 'market' | 'limit', required: The type of the order.
    - `origin` TradingAccountNode, required
      - `type` 'account', required: The type of the node.
      - `id` string, uuid, required: The account id.
    - `destination` TradingAccountNode, required
      - `type` 'account', required: The type of the node.
      - `id` string, uuid, required: The account id.
    - `quantity` string, required: The quantity the order was sized by.
    - `price` string: The limit price. Absent on a market order.
    - `timeInForce` 'fok', required: How long the order stays active. Only `fok` is supported for now.
    - `status` 'pending' | 'open' | 'closed', required: The status of the order. `closed` does not mean the order executed.
    - `execution` TradingOrderExecution, required: What the order has executed so far.
      - `quantity` string, required: The base quantity executed.
      - `notional` string, required: The gross amount executed, in the quote asset.
      - `averagePrice` string, nullable, required: The average price, in the quote asset per one unit of the base asset. Null until something executes.
    - `timeline` TradingOrderTimelineItem[], required: The events of the order's lifecycle, oldest first.
      - `event` 'created' | 'filled' | 'canceled' | 'rejected' | 'failed', required: The event that occurred in the order's lifecycle.
      - `reason` 'insufficient-liquidity' | 'limit-price-not-met' | 'unspecified-error' | 'venue-closed' | 'venue-limit-exceeded' | 'venue-rejected': Why the order did not execute.
      - `createdAt` string, date-time, required: The time at which the event occurred.
    - `createdAt` string, date-time, required: The time at which the order was created.
    - `updatedAt` string, date-time, required: The last time at which the order was updated.

## Other responses

- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Resource not found.
- `429`: Too Many Requests.

---

[API](https://skmtc.dev/uphold/apis/trading-api.md) - [All operations](https://skmtc.dev/uphold/apis/trading-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uphold/apis/trading-api/revisions/d567e5492a13?raw)
