Skip to main content

Quickstart

Fetch a quote for $25 of BTC. No explicit auth call — the client picks up TM_KEY_FILE and signs for you.

import { Client } from "@truemarkets/sdk";

const client = new Client();

const { data: quote } = await client.gateway.computeQuote({
body: {
base_asset: "BTC",
quote_asset: "USDC",
qty: "25",
qty_unit: "quote",
side: "buy",
},
});

qty_unit: "quote" means "$25 of BTC"; use "base" to specify a BTC amount instead.

Going further

A quote doesn't move funds. To place an actual order you create it, execute it, then poll status — the Retail quickstart walks the whole sequence, and the SDK method names map straight onto it (createOrder, executeOrder, getOrderStatus).

Next steps

  • CLI — drive DeFi trading from your terminal, no code required.
  • Retail API reference — every endpoint, schema, and error code.
  • Discord — SDK questions, MCP setup help, and integration chat.