Create a swap (deposit address)
create_swapCreate a swap from a quoteToken returned by get_quote. Returns a one-time depositAddress, the exact amount to send, expiresAt and a swapId for tracking. Only call after the user confirmed the route and both addresses. The swap only happens when the user sends the funds. Repeating the call with the same quoteToken and addresses returns the same deposit address.
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": {
"quoteToken": "<quoteToken>",
"destinationAddress": "<destinationAddress>",
"refundAddress": "<refundAddress>"
},
"name": "create_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quoteToken | Yes | quoteToken of the chosen route (valid for about 2 minutes). | |
| refundAddress | Yes | Address on the sell asset's network that receives a refund if the swap cannot complete. | |
| destinationAddress | Yes | Address that receives the bought asset, on the buy asset's network. |