Create a swap (for an agent that controls the sending wallet)
create_swapCreates the swap and returns the payment instruction: the one-time deposit address, the memo if the chain needs one, the exact amount in decimal and in base units with the decimals and token contract as listed by the liquidity partner, a wallet URI where a standard exists (BIP-21, ERC-681, Solana Pay, Monero, TON), and the status URL. Use it only when you control the wallet at fromAddress and will send the deposit yourself; for a person use swap_page_link. The deposit must come from fromAddress; there is no refund address — a swap that cannot be completed is handled by support from the swap id. Floating rate: the final amount is set when the deposit confirms.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | asset slug to receive, e.g. btc | |
| from | Yes | asset slug you send, e.g. usdt-trc20 | |
| amount | Yes | decimal amount you send, as a string, within get_limits | |
| extraId | No | memo / destination tag / payment ID for the receiving side, only where that asset needs one | |
| toAddress | Yes | the receiving address for the `to` asset | |
| fromAddress | Yes | the address you will send the deposit from (a wallet you control) | |
| fromExtraId | No | the sending side's extra id, only if your wallet attaches one |