Skip to main content

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.

LanguagePackageRequires
TypeScript@truemarkets/sdkNode 18+ or Bun
PythontruemarketsPython 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

  1. Install — npm, bun, or pip.
  2. Authenticate — point TM_KEY_FILE at your key bundle.
  3. Fetch a quote — the shortest useful call.

Next → Installation