For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /gateway.md.

About Gateway

Gateway lets you offer crypto, stablecoin and tokenized stock trading to your users inside your product. You create a user for each of your customers, and your servers place orders on their behalf from that user's own wallets. To trade your own account from code, use the Trading API.

Real funds

Every trade moves real funds on-chain. A first trade costs a few dollars of USDC, and we pay the network fees.

Where Gateway fits

Your app
Your organization
API key from the dashboard
You keep your own login and customer records. Your customers never sign in to True Markets.
Your usersSOLEVM
cust_7781
cust_7782
cust_7783
Your own ids. Each user gets a Solana and an EVM wallet when you create it.
True Markets
Gateway
orders · transfers
balances · transactions
You call it. We run the wallets and the trades.
What they trade
Crypto, stablecoins and tokenized stocks
The catalog lists every asset.

Every wallet transaction needs two approvals: one from the signer key on that user, and ours. Neither of us can move a user's funds alone.

How a trade works

Your servers mint an organization token from your API key and send it on every call, with TM-On-Behalf-Of naming the user. Placing an order or transfer returns unsigned wallet transactions, called payloads. You sign each one with your signer key and post the signatures to execute. Nothing moves until you do.

Place an order for a user, sign the payloads, execute
const forUser = { "TM-On-Behalf-Of": userId };

const order = await post(
  "/v1/gateway/orders",
  {
    asset_id: assetId,
    qty: "2",
    qty_unit: "quote",
    side: "buy",
    type: "market",
  },
  forUser,
);

const signatures = await Promise.all(
  order.payloads.map((p) => stamp(p.payload)),
);

await post(
  `/v1/gateway/orders/${orderId}/execute`,
  {
    signatures,
    auth_type: "api_key",
  },
  forUser,
);

post() sends your organization token. stamp() signs a payload with your signer key. Getting started defines both.

Your serverTrue Markets
Sign inwith organization API key
Sign {key_id}.{timestamp}POST /v1/auth/api-key/token
Organization tokenlasts one hour, no refresh token
Place the orderwith token + TM-On-Behalf-Of
Create the order for a userPOST /v1/gateway/orders
Unsigned payloadsone wallet transaction each
Sign and executewith signer key
Stamp each payloadwherever the signer key lives
Execute with the signaturesPOST /v1/gateway/orders/{id}/execute
Order statuscomplete, or pending until final

Use cases

  • Neobanks: let customers buy crypto and tokenized stocks next to their cash balance.
  • Fintech and payment apps: add a crypto product without building custody or exchange connections.
  • Wallet apps: offer trading inside the wallet, across chains.
  • Brokerages and investing apps: add crypto and tokenized stocks to an existing portfolio.
  • Global apps: give users outside the US and UK access to tokenized stocks.
  • AI agent platforms: let an agent trade for each of your users, from that user's own wallet.

Tokenized stocks are not offered in the US or UK.

Start building

You can also create a test user on the dashboard's Users page and look at its wallets before you write any code.

Reference

Was this page helpful?YesNo