Coming soon. There is no official Python package yet. Until there is, call the API directly or generate a client from the OpenAPI spec, as below.
Use the API directly
The API is plain HTTPS and JSON, so therequests library is all you need. Every page of these docs has a Python example: start with the quickstart. Two things to get right in your own wrapper:
- Parse every amount and weight with
decimal.Decimal, neverfloat(see Units and pricing). - Generate one
Idempotency-Keyper order, 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 generator for Python can turnhttps://docs.bullionwale.com/openapi.json into a typed client. Regenerate it when the spec changes, and keep the two rules above in the code that calls it.