Quickstart
Fetch a quote for $25 of BTC. No explicit auth call — the client picks up TM_KEY_FILE and signs for you.
- TypeScript
- Python
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",
},
});
from truemarkets import Client
from truemarkets._generated.gateway.models import (
OrderSide,
QuoteRequest,
QuoteRequestQtyUnit,
)
c = Client()
quote = c.gateway.compute_quote(body=QuoteRequest(
base_asset="BTC",
quote_asset="USDC",
qty="25",
qty_unit=QuoteRequestQtyUnit.QUOTE,
side=OrderSide.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.