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. Closing is done by Bullionwale; the API does not close or cancel orders.
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.
Positions and your weight allocation
GET /positions shows, per metal, what your weight allocation sees:
200 OK
symbols: one row per symbol with an open position, with the open bought and sold weight and their net, in the metal’s unit.
How the allocation works:
- It is weight, not money. It caps your open exposure in grams or kilograms per metal. A market order, from the API, the web or the app, runs no rupee margin check.
- Buys and sells net off. An offsetting trade frees allocation again. An order that would take
usedpastlimitis refused with400 limit_exceeded. - Reducing your exposure is always allowed, even when
usedis already abovelimit(for example after Bullionwale lowered your allocation). - Pending orders count. In production, an order still
pendingalready counts towardsnet. - On the test path,
GET /positionsshows your test book against your real allocation (see Test and production).