POST /orders, follow it with GET /orders/{order_id}, and list your history with GET /orders. The API does not close or cancel orders: closing is done by Bullionwale.
Each path sits under the test base path
/api/trading/test/v1 or the production base path /api/trading/v1. Test orders are simulated and always filled; production orders are real. The production examples on this page use a live key and the production paths: check the availability notice on Production access requirements before you use them.
The order object
Both environments return these fields:
Test orders add
deal_label (T-<n>). Production orders add:
Order statuses
A test order is alwaysfilled.
A production order has one of these statuses:
A production order normally moves
pending → open → closing → closed, or pending → rejected.
Place an order
POST /orders places a market order at the current price. The Idempotency-Key header is required: 1 to 64 characters, a new UUID per order, reused unchanged on every retry of that order (see Idempotency and safe retries).
201 Created
/api/trading/v1/orders with a live key. What comes back first differs:
Every other refusal (an unknown symbol, a halted market, a moved price, your weight allocation) is the same in both environments. See Common refusals.
Read one order
200 OK
404 order_not_found.
Follow a pending order
In production,POST /orders can answer 202 Accepted with the order pending while Bullionwale’s hedge confirms it. Then:
- Call
GET /orders/{order_id}every 1 to 2 seconds. - Stop when
statusis no longerpending:openmeans booked,rejectedmeans nothing was booked, and, rarely,deleted. - Give up polling after about 30 seconds and check again later. Reads do not use your order budget.
Idempotency-Key while you are waiting: that would be a second order. See Idempotency and safe retries.
List your orders
GET /orders takes limit (1 to 200, default 50), offset, symbol_code, trade_type and since (ISO 8601; a time without a zone is UTC), and returns items newest first plus total, the number of matching orders.
In production it also takes status: pending, open, closing, closed, rejected, deleted or all (the default). all leaves out deleted orders; ask for status=deleted to list those.
200 OK
Which orders you see
In production,GET /orders returns your account’s orders from every channel: the app, the web and the API. source says which. Orders you placed through the API also carry your client_order_id.
One exception: a pending or rejected order appears only if it was placed through the API. An order placed in the app that is still being confirmed, or that the hedge refused, is not shown in the app either, so the API answers 404 order_not_found for it. It appears once it is confirmed, as open.
The test GET /orders lists only your test orders.
Common refusals
The full list, with what to do for each, is in Errors.