Create a swap (deposit address)
create_swapIdempotent
Create 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.
Input Schema
TableJSON 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. |