Each link opens the JSON file in your browser; save it with the file name shown (in most browsers, right-click the link and choose Save link as).
Both environment files point
base_url at https://api.bullionwale.com (check the availability notice on the introduction first). Their key fields are empty: you fill them in.
Using the Postman collection
- Download the collection and both environment files, then import all three into Postman (Import, then select the files).
- Pick the test environment and paste your test key into its
api_keyvalue. Keep the variable’s type as secret, and never commit or share an environment file that contains a key. - Run the requests in the Test environment folder, starting with Who am I.
wrong_env_api_key (a live key), read_only_api_key (a test key without orders:write) and new_api_key (the replacement from a rotation). These folders run only against the test API.
If you cannot download the files, Postman can also build a collection from the spec: choose Import, then Link, and enter
https://docs.bullionwale.com/openapi.json. A collection made that way has every request but none of the safety guards below, so use the collection from this page to place orders.Safety guards
The collection is built so that it cannot place a real order by accident. Its collection-level script decides, before every request, whether that request may run, and skips it otherwise:- Test orders run only when the environment’s path is the test path and
api_keyis abwk_test.key. - The production Place order runs only when the path is the production path,
api_keyis abwk_live.key, and a variable namedconfirm_production_ordersis set toI-UNDERSTAND-REAL-ORDERS. That variable is in neither environment file on purpose: add it yourself, only when you mean to place a real order, and remove it afterwards. - Reads run only when the key matches the folder, so running the whole collection under one environment skips the other environment’s requests instead of failing.
- Every request is skipped unless
base_urlis just a scheme and a host (for examplehttps://api.bullionwale.com), so a stray path inbase_urlcannot send a request somewhere else.
Idempotency-Key: {{prod_idem_key}}:
- the key is set to a fresh value only when it is empty;
- it is cleared only after a definitive answer (
200,201,202,409other thanbooking_conflict, or422); - after a
5xx, a timeout or no answer it is kept, so sending again replays the same order instead of booking a second one.
prod_idem_key yourself.
Running it with newman
To run the test folder from the command line (newman 6.1 or later), from the folder you saved the collection and the test environment file to:--env-var keeps it out of the environment file.