Skip to main content
An order is a market buy or sell of one symbol, for a weight. You place it with 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 always filled. 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
The production request is the same, on /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
An order that is not on your account answers 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:
  1. Call GET /orders/{order_id} every 1 to 2 seconds.
  2. Stop when status is no longer pending: open means booked, rejected means nothing was booked, and, rarely, deleted.
  3. Give up polling after about 30 seconds and check again later. Reads do not use your order budget.
Never place the order again with a new 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.