ref_finance_execute_swap
Swap tokens on Ref Finance using a specific pool or optimizing for liquidity and rates. Specify input/output tokens, amounts, and swap type for efficient transactions.
Instructions
Execute a swap on Ref Finance based on two tokens and a pool id. Prioritize pools with higher liquidity and better rates for the user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | The account id of the user doing the swap | |
| amount | Yes | The amount of the input tokens to swap | |
| networkId | No | mainnet | |
| swapType | No | The type of estimate to get. Defaults to the ref finance smart router to find the best price over all available pools | |
| tokenIn | Yes | ||
| tokenOut | Yes |