> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bullionwale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Every endpoint of the Bullionwale API, generated from its OpenAPI spec.

<Warning>
  **Availability, as of 2026-10-19: test environment available on request; production trading switched off.**

  | Environment | Status |
  | - | - |
  | Test (`/api/trading/test/v1`) | **Available on request.** Ask the Bullionwale desk to turn on API access for your account and issue a test key. Test orders are simulated and nothing is booked. |
  | Production (`/api/trading/v1`) | **Switched off.** Implemented, but production orders are refused (`403 production_trading_disabled`). Bullionwale will enable it per account once it opens; it is not available today. |

  `https://api.bullionwale.com` serves the API. Without a valid key, every call answers `401`. Your Bullionwale relationship manager will tell you when production trading opens.
</Warning>

The pages in this section are generated from the [OpenAPI spec](/openapi-and-postman). There is no "try it" console: production calls place real orders, so you run requests from your own code.

## Base URL and paths

Once the API is available, the base URL is `https://api.bullionwale.com`. Each endpoint exists in both environments:

| Endpoint | Test | Production |
| - | - | - |
| Who am I | `GET /api/trading/test/v1/me` | `GET /api/trading/v1/me` |
| Place an order | `POST /api/trading/test/v1/orders` | `POST /api/trading/v1/orders` |
| List orders | `GET /api/trading/test/v1/orders` | `GET /api/trading/v1/orders` |
| One order | `GET /api/trading/test/v1/orders/{order_id}` | `GET /api/trading/v1/orders/{order_id}` |
| Positions | `GET /api/trading/test/v1/positions` | `GET /api/trading/v1/positions` |

## Authentication

Send your API key in the `X-API-Key` header on every call. A test key (`bwk_test.…`) works only on the test paths and a live key (`bwk_live.…`) only on the production paths. See [Getting access](/getting-access).

## Conventions

* Request and response bodies are JSON.
* In requests, `quantity` and `expected_price` are JSON numbers. In responses, every amount and weight is a decimal **string**.
* Quantities are weights in the symbol's measure (`unit`: `g` or `kg`), not lots.
* Times are ISO 8601. Responses include the UTC offset; a `since` filter without a zone is read as UTC.
* `POST /orders` requires an `Idempotency-Key` header. See [Idempotency](/idempotency).
* Every refusal is `{"detail": {"code": ..., "message": ...}}`. See [Errors](/errors) for every code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.