Create a swap order
create_swapCreate a durable order that spends amount of fromToken. Returns the deposit address and exact amount to send. Confirm with the user first. Never retry after a timeout or error: another call creates another order.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fromChainId": "<fromChainId>",
"fromToken": "<fromToken>",
"toChainId": "<toChainId>",
"toToken": "<toToken>",
"amount": "<amount>",
"toAddress": "<toAddress>"
},
"name": "create_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Human decimal amount, e.g. "0.5". Not atomic units. | |
| toToken | Yes | Token address from search_tokens, or "native" for the chain coin. | |
| fromToken | Yes | Token address from search_tokens, or "native" for the chain coin. | |
| toAddress | Yes | Recipient address on toChainId. | |
| toChainId | Yes | Chain id from list_chains. | |
| fromChainId | Yes | Chain id from list_chains. | |
| refundAddress | No | Only for a native-coin source such as XMR or TRX; token sources refund to the sender. |