---
title: "Send funds"
url: https://docs.truemarkets.co/trading-api/send-funds
description: "Move tokens from your wallet to any address on the same chain."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Send funds

Send tokens from your wallet to any address on the same chain. A transfer works like an order: you create it, sign the payloads it returns, then execute it. A payload is an unsigned transaction.

## Create the transfer

Send the `asset_id` from the catalog, the amount in that asset with `qty_unit: "base"`, and the destination address in `to`. Leave out `network`; the transfer uses the asset's chain.

The transfer comes back with status `awaiting_signature` and its `payloads`. Keep `id` and `payloads`.

**TypeScript**

```typescript title="Create a transfer of 5 USDC on Solana"
const transfer = await post("/v1/gateway/transfers", {
  asset_id: assetId,
  qty: "5",
  qty_unit: "base",
  to: "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
});
```

**Python**

```python title="Create a transfer of 5 USDC on Solana"
transfer = post("/v1/gateway/transfers", {
    "asset_id": asset_id,
    "qty": "5",
    "qty_unit": "base",
    "to": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
})
```

**curl**

```bash title="Create a transfer of 5 USDC on Solana"
curl -s -X POST https://api.truemarkets.co/v1/gateway/transfers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "asset_id": "'"$ASSET_ID"'",
    "qty": "5",
    "qty_unit": "base",
    "to": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"
  }'
```

**Response** 201 (keep id and payloads)

```jsonc
{
  "id": "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a",
  "status": "awaiting_signature",
  "asset_symbol": "USDC",
  "chain": "solana",
  "to": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
  "qty": "5",
  "payloads": [{ "digest": "8e1a…4f2b", "payload": "{\"organizationId\":\"…\",…}" }]
  // more fields
}
```

## Sign and execute

Sign each payload with your API key, the same way you sign an order, and post the signatures in the order the payloads came back. [Getting started](https://docs.truemarkets.co/trading-api/quickstart) has the signing code.

`auth_type: "api_key"` tells us your API key made the signatures.

> **Transfers are final**
>
> Once the chain confirms a transfer, it can't be reversed. Check the address and the network before you execute.

**TypeScript**

```typescript title="Sign the payloads, then execute"
const signatures = await Promise.all(
  transfer.payloads.map((p) => stamp(p.payload)),
);

const done = await post(
  `/v1/gateway/transfers/${transferId}/execute`,
  {
    signatures,
    auth_type: "api_key",
  },
);
```

**Python**

```python title="Sign the payloads, then execute"
signatures = [stamp(p["payload"]) for p in transfer["payloads"]]

done = post(f"/v1/gateway/transfers/{transfer_id}/execute", {
    "signatures": signatures,
    "auth_type": "api_key",
})
```

**Response** 200 (the transfer, finished)

```jsonc
{
  "id": "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a",
  "status": "completed",
  "sent": "5",
  "received": "5",
  "explorer_url": "https://solscan.io/tx/4Hn8…Yt3z"
  // more fields
}
```

Execute returns once the transaction has landed, with status `completed`. If it fails, the transfer is marked `failed` and you create a new one. Executing the same transfer again returns `409`. To look a transfer up later, call `GET /v1/gateway/transfers/{id}`.

Next: [Place orders](https://docs.truemarkets.co/trading-api/place-orders)