Skip to main content
Coming soon. There is no official TypeScript package yet. Until there is, call the API with fetch or generate a client from the OpenAPI spec, as below.

Use the API directly

Call the API from your server, never from a browser or mobile app: the key must stay secret.
  • Keep amounts and weights as the strings the API returns, or parse them with a decimal library. JavaScript numbers are floating point and lose precision (see Units and pricing).
  • Generate one Idempotency-Key per order (for example with crypto.randomUUID()), store it with the order, and reuse it on every retry (see Idempotency and safe retries).

Generate a client

The OpenAPI spec describes every endpoint, request and response. Any OpenAPI 3.1 client or type generator for TypeScript can turn https://docs.bullionwale.com/openapi.json into typed calls. Regenerate it when the spec changes.