Skip to main content
Glama

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
NameRequiredDescriptionDefault
accountIdYesThe account id of the user doing the swap
amountYesThe amount of the input tokens to swap
networkIdNomainnet
swapTypeNoThe type of estimate to get. Defaults to the ref finance smart router to find the best price over all available pools
tokenInYes
tokenOutYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nearai/near-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server