Skip to main content
Glama

DeFi Trading Agent MCP Server

by edkdev

get_swap_price

Retrieve indicative token swap prices using Aggregator Protocol for DeFi trading. Input chain ID, buy/sell token addresses, and sell amount to facilitate informed transactions.

Instructions

Get indicative price for a token swap using Aggregator Protocol

Input Schema

NameRequiredDescriptionDefault
buyTokenYesContract address of token to buy
chainIdYesBlockchain ID (e.g., 1 for Ethereum)
sellAmountYesAmount of sellToken in base units
sellTokenYesContract address of token to sell
takerNoAddress executing the trade (optional)

Input Schema (JSON Schema)

{ "properties": { "buyToken": { "description": "Contract address of token to buy", "type": "string" }, "chainId": { "description": "Blockchain ID (e.g., 1 for Ethereum)", "type": "integer" }, "sellAmount": { "description": "Amount of sellToken in base units", "type": "string" }, "sellToken": { "description": "Contract address of token to sell", "type": "string" }, "taker": { "description": "Address executing the trade (optional)", "type": "string" } }, "required": [ "chainId", "buyToken", "sellToken", "sellAmount" ], "type": "object" }

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/edkdev/defi-trading-mcp'

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