Skip to main content
Bullion is traded by weight, not by lots or contracts. Every quantity, price and total in the API follows the rules on this page.

Quantities are weights

An order’s quantity is a weight in the symbol’s quoted measure: So "quantity": 10 on GOLD_TRADE_999 is 10 grams, and "quantity": 2.5 on SILVER_999 is 2.5 kilograms. The measure follows how the symbol is quoted, not the metal: check unit on the order rather than assuming silver means kilograms. In a request, quantity is a JSON number greater than 0, with at most 4 decimal places. A symbol or your trading group can add its own size rule (minimum, maximum or step), refused with 400 quantity_rule or 400 group_quantity_rule.

Prices are per quoted measure

price is the rate in rupees per the symbol’s quoted measure: per 10 grams for the gold symbols above, per kilogram for silver. It is your own price, the same one the Bullionwale app shows you, with your account’s pricing applied. You buy at the buy price and sell at the sell price. To protect an order against a moving market, send expected_price: the price you showed or expect. If the live price has moved beyond Bullionwale’s tolerance from it, the order is refused with 409 price_moved and nothing is booked.

Totals

total is the order’s value in rupees:
rounded to the paisa (2 decimals, half to even). For example: A common mistake is price × quantity for gold: that is ten times too high, because the price is per 10 grams.

Positions and limits are per metal

Positions and weight allocations are kept per metal, in the metal’s own unit, whatever the symbol: See Positions.

Amounts are decimal strings

Every amount and weight in a response (price, total, quantity, net, limit, close_price, realized_pnl, …) is a string such as "141250.00" or "10.0000", so no precision is lost in JSON. Parse them as decimals, never as floating-point numbers:
The number of decimals shown can differ between fields and environments ("10" and "10.0000" are the same weight), so compare values as decimals, not as text.

Profit and loss

Only realized profit and loss exists: realized_pnl on a production order, set once Bullionwale has closed it. There is no mark-to-market or unrealized P&L in the API.