ref_finance_execute_swap
Execute token swaps on Ref Finance by selecting input and output tokens using either smart routing for optimal rates or a specific pool. Supports NEAR blockchain networks.
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
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 |