Create a swap
create_swapCreate a swap order and get a one-time deposit address. Nothing moves until the user sends the deposit from their own wallet. Before calling, confirm with the user both currencies and their networks, the amount and the payout address. Afterwards tell the user to send exactly amount of the from currency, on its network, to depositAddress, to add depositExtraId as the memo or tag when it is set, and to keep trackUrl. Show any warnings to the user.
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": {
"from": "<from>",
"to": "<to>",
"amount": "<amount>",
"address": "<address>"
},
"name": "create_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Currency to receive. Currency id from search_currencies, for example btc, eth or usdttrc20. | |
| from | Yes | Currency to send. Currency id from search_currencies, for example btc, eth or usdttrc20. | |
| amount | Yes | Amount of the from currency the user will send, as a decimal like "0.05". | |
| address | Yes | The user's wallet address that receives the to currency. It must be on the to currency's network. | |
| extraId | No | Memo or tag for the payout address. Only when the receiving wallet needs one, such as an exchange account with a deposit tag. |