Skip to main content
Every call authenticates with one API key, sent in the X-API-Key header. There is no login, token exchange or session: the key is checked on every request.
Your web or mobile login is never accepted by this API, and an API key is never accepted by the web or mobile app. A key sent as Authorization: Bearer … is not read; send it in X-API-Key.

Key format

A key is one string with four parts separated by dots:
Treat the whole string as opaque: store it and send it exactly as you received it. Bullionwale stores only a hash of the secret, so it cannot show you a key again, only replace it (see Credentials).

Environments

A key works in one environment only: So a test key can never place a real order, and pointing a program at the wrong base path fails at once instead of half-working. See Test and production.

How many keys

Each account can hold up to 5 active keys per environment by default (Bullionwale’s limit may differ). Use a separate key for each system that calls the API, so that one can be rotated or revoked without touching the others. A read-only key (without orders:write) is a good choice for dashboards and reconciliation jobs.

When authentication fails

A refused key answers 401 with a code that says why:
401 Unauthorized
A key that authenticates can still be refused with 403: api_access_disabled (API access is off for the account), account_inactive, or insufficient_scope (see the Scope reference).
Repeated failures lock out your address. Too many 401 answers from one source address in a minute and every call from that address is refused with 429 auth_throttled, even with a good key, until it cools down. Fix a misconfigured key before it blocks your other systems. See Rate limits.