Skip to main content
Glama

api_haystack_execute_swap

Execute optimized token swaps on Algorand by finding the best routes across multiple DEXes and LST protocols, then signing and submitting atomic transaction groups.

Instructions

Execute an optimized token swap via Haystack Router — gets the best route across multiple DEXes (Tinyman V2, Pact, Folks) and LST protocols, then signs and submits the atomic transaction group using the active wallet account. This is an all-in-one tool: quote → sign → submit → confirm. All amounts are in base units (e.g., 1000000 = 1 ALGO).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromASAIDYesInput asset ID (0 = ALGO, 31566704 = USDC, 312769 = USDt, etc.)
toASAIDYesOutput asset ID (0 = ALGO, 31566704 = USDC, 312769 = USDt, etc.)
amountYesAmount in base units (e.g., 1000000 = 1 ALGO with 6 decimals)
slippageNoSlippage tolerance percentage (e.g., 1 = 1%). Recommended: 0.5-1% stable pairs, 1-3% volatile, 3-5% low liquidity
typeNoQuote type: fixed-input (specify input, default) or fixed-output (specify desired output)fixed-input
noteNoOptional note to attach to the input transaction (plain text)
maxGroupSizeNoMaximum transactions in atomic group (default: 16)
maxDepthNoMaximum routing hops (default: 4)
networkNoAlgorand network to use (default: mainnet)
itemsPerPageNoNumber of items per page for paginated responses (default: 10)
Install Server

Other Tools

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/GoPlausible/algorand-mcp'

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