---
title: "Get a single order"
url: https://docs.truemarkets.co/api/gateway/get-order
description: "Returns full execution details for an order owned by the authenticated user."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Get a single order

Returns full execution details for an order owned by the authenticated user.

## Request

```
GET https://api.truemarkets.co/v1/gateway/orders/{id}
```

### Authentication

Bearer token in `Authorization`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `TM-On-Behalf-Of` | header | string (uuid) | no | Act as one of your organization's users. The value is the `user_id` returned when the user was created; the request then reads and writes that user's account. Requires an organization token and a user your organization created: `400` for a personal token, a repeated header or a non-UUID, `403` for a user outside your organization. Not accepted on organization-scoped routes. |
| `id` | path | string | yes | Order ID |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

Order retrieved

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `order_id` | string | no | Unique order identifier |
| `asset_id` | string (uuid), nullable | no | Asset id the order was placed against. May be null for orders sourced directly from the venue. |
| `economic_asset_id` | string (uuid), nullable | no | Economic asset the order's listing lists, shared by its listings on every venue and chain. Null when the order recorded none. |
| `asset_symbol` | string, nullable | no | Asset symbol the order was placed against. May be null for orders sourced directly from the venue. |
| `base_asset` | string | no | Base asset symbol (e.g. `BTC`, `ETH`, `SOL`) |
| `quote_asset` | string | no | Quote asset symbol (the CeFi listing's instrument quote, e.g. `PYUSD` or `USDC`; `USDC` for DeFi) |
| `type` | string, one of `market`, `limit` | no | The type of order to place — how the order executes. * **market** — Execute immediately at the best available price. Buy orders require `qty_unit: quote`. Price must not be specified. * **limit** — Place an order at a specific price. Requires `price` and `qty_unit: base`. `chain` is optional: omit it for a CeFi limit order, or supply a DeFi chain (e.g. `hypercore-spot`) to rest the order on-chain. With a `trigger`, the type is how the fired order executes and must be `market`. |
| `side` | string, one of `buy`, `sell` | no | The side of the order. * **buy** — Purchase the base asset using the quote asset. * **sell** — Sell the base asset in exchange for the quote asset. |
| `price` | string, nullable | no | For limit orders, the limit price submitted. For market orders, the reference price at order creation. Null when no price was recorded. |
| `qty` | string | no | Original order quantity in the denomination specified by `qty_unit` at creation |
| `qty_unit` | string, one of `base`, `quote` | no | Denomination of `qty` at creation |
| `executed_qty` | string | no | Quantity of the base asset that has been filled so far |
| `leaves_qty` | string | no | Remaining base asset quantity yet to be filled. Zero when the order is complete. |
| `executed_vwap` | string | no | Volume-weighted average price across all fills for this order |
| `fee` | string | no | Total fee charged for this order in the quote asset, `0` until part of it fills. For CeFi orders this is the cumulative `trade_fee` across all fills; for DeFi orders it is the order's fee once any of it has filled. The fee an order is expected to pay before it fills is the quote's `fee`. |
| `tx_hash` | string | no | On-chain transaction hash for DeFi orders. Omitted for CeFi orders. |
| `explorer_url` | string | no | Public block-explorer page for the order. Hyperliquid orders link to the wallet's address page on the Hyperliquid explorer, since only the venue order id is recorded. Set on `GET /orders` and the transaction feed, like `asset_type`; omitted for CeFi orders and until the venue has acknowledged the order. |
| `failure_reason` | string | no | Human-readable reason the order failed, such as insufficient balance. Present only on failed orders. |
| `venue` | string, one of `defi`, `cefi` | no | The trading venue to filter by. * **defi** — Decentralized exchange (on-chain swaps). * **cefi** — Centralized exchange (off-chain order book). |
| `chain` | string | no | Chain the DeFi order executed on. Omitted for CeFi orders. |
| `status` | string, one of `initialized`, `pending`, `cancel_pending`, `complete`, `canceled`, `active`, `failed` | no | The current status of the order. * **initialized** — Order has been created but not yet submitted. For DeFi orders, the client must sign the returned payloads and call the execute endpoint. For CeFi buy orders with insufficient balance, a funding bridge is prepared first. * **pending** — Order has been submitted but is not yet confirmed by the CeFi exchange or on-chain. * **active** — Order was accepted by the CeFi exchange and is open for trading. Applies to limit orders that are working in the order book. * **cancel_pending** — A cancellation request has been sent to the CeFi exchange and is awaiting confirmation. * **complete** — Order has been fully executed. For CeFi orders this means the CeFi exchange reported a fill; for DeFi orders the on-chain swap was confirmed. * **canceled** — Order was successfully canceled via a cancel request or by exchange/market conditions. * **failed** — Order was rejected by the CeFi exchange or DeFi execution failed (e.g. on-chain transaction reverted, balance check failed). |
| `created_at` | string (date-time) | no | Timestamp when the order was created (RFC 3339) |
| `asset_type` | string, one of `spot`, `perp` | no | Product type of the traded asset. `perp` for Hyperliquid perpetuals, `spot` otherwise. Lets clients tell perp orders apart from spot ones sharing the same symbol. |
| `trigger` | object | no | Set on a TP/SL trigger order, the same shape it was created with. Such an order is a `market` close, so `price` is null while it rests. |
| `trigger.type` | string, one of `take_profit`, `stop_loss` | yes | Trigger direction relative to the position. |
| `trigger.price` | string | yes | Trigger price per unit of base asset as a decimal string. |
| `placed_by` | string, one of `user`, `service` | no | Who placed the order: the user, or a platform service acting for them, such as a strategy trading from their Strategies wallet. |
| `strategy_managed` | boolean | no | True on an order a platform service placed for the user (`placed_by` is `service`). It is read-only here: `POST /orders/{id}/cancel` and modify return 422. A live open order conductor has no record of carries its DeFi order id as `order_id`. Omitted otherwise. |

### 400

Bad request

### 401

Unauthorized

### 403

Forbidden. On order creation this also covers an asset that is not available to trade from the country the request came from.

### 404

Not found

### 500

Internal server error
