Skip to main content
Glama

api_haystack_get_swap_quote

Get optimized swap quotes across Algorand DEXes and LST protocols to preview best-price routes before executing trades.

Instructions

Get an optimized swap quote from Haystack Router — a DEX aggregator that finds the best swap route across multiple Algorand DEXes (Tinyman V2, Pact, Folks) and LST protocols (tALGO, xALGO). Returns the best-price quote with route details, USD values, and price impact. Use this to preview a swap before executing. 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)
typeNoQuote type: fixed-input (specify input amount, default) or fixed-output (specify desired output amount)fixed-input
addressNoUser Algorand address (optional, needed for auto opt-in detection)
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