Clients and SDKs
True Markets publishes first-party SDKs that wrap signing, token refresh, and every Retail API operation as typed methods. They auto-load TM_KEY_FILE from your environment, so there's no manual JWT step.
| Language | Package | Requires |
|---|---|---|
| TypeScript | @truemarkets/sdk | Node 18+ or Bun |
| Python | truemarkets | Python 3.10+ |
Methods are generated from the OpenAPI spec and named after operationIds (listAssets/list_assets, createOrder/create_order, getOrderStatus/get_order_status, and so on). Autocomplete shows the full surface; each SDK's README covers the DeFi flow and Turnkey signing helpers.
These target the custodial Retail API
The SDKs wrap the Retail Gateway. For non-custodial DeFi trading on Solana and Base, use the CLI instead.
Get going
- Install — npm, bun, or pip.
- Authenticate — point
TM_KEY_FILEat your key bundle. - Fetch a quote — the shortest useful call.
Related
- Retail API reference — every endpoint, schema, and error code.
- Retail quickstart — the same flow in raw HTTP, if you'd rather see the wire format.
- Discord — SDK questions and integration chat.