Ask for access
Contact your Bullionwale relationship manager or the Bullionwale desk and ask for:- API access for your account. Without it every call is refused with
403 api_access_disabled. - A test key to build and test your integration. Start here even if you only plan to trade in production.
- The scopes the key needs (see Scopes). To place orders, ask for
orders:write. - Optionally, an expiry date for the key, and a name that tells you which of your systems uses it (for example
order-bot). The name comes back askey_namefromGET /me.
Receive and store the key
A key is one string with four parts separated by dots:bwk_testorbwk_livesays which environment the key works in.- The key id is public.
GET /mereturns it askey_id, and it is safe to quote when you talk to Bullionwale about a key. - The secret is the last part. Never share it, including with Bullionwale staff.
Send the key
Send the key on every call in theX-API-Key header:
- A test key works only on the test paths (
/api/trading/test/v1), and a live key only on the production paths (/api/trading/v1). The other combination is refused with401 wrong_environment. - Your web or mobile login is never accepted by this API, and an API key is never accepted by the web or mobile app.
Scopes
A key carries scopes that decide which calls it may make:
A new key gets
account:read, rates:read and orders:read unless you ask otherwise. orders:write is granted only when you ask for it. A call that needs a scope the key lacks is refused with 403 insufficient_scope.
A read-only key (without orders:write) is a good choice for dashboards and reconciliation jobs that never place orders.
How many keys
Each account can have a limited number of active keys per environment (five by default; Bullionwale’s limit may differ). Use separate keys for separate systems, so that one can be rotated or revoked without touching the others.Check a key
GET /me shows the account and key behind the X-API-Key header, the key’s scopes, and production_trading_available. Run it whenever you install a new key. See the quickstart for an example.