get_token_price
Retrieve real-time token prices in USD from multiple decentralized exchanges by providing a token contract address and blockchain network.
Instructions
Get real-time token price from multiple DEX sources.
Args: token_address: The token contract address (0x...) chain: Blockchain network. Options: ethereum, base, polygon, bsc
Returns: Token price in USD with source information.
Price: $0.15
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token_address | Yes | ||
| chain | No | ethereum |
Implementation Reference
- coinrailz_mcp/__init__.py:257-272 (handler)The `get_token_price` handler implements the token pricing tool by constructing the payload and calling the `call_coinrailz_service` utility. It is registered with the FastMCP instance via the `@mcp.tool()` decorator.
async def get_token_price(token_address: str, chain: str = "ethereum") -> str: """ Get real-time token price from multiple DEX sources. Args: token_address: The token contract address (0x...) chain: Blockchain network. Options: ethereum, base, polygon, bsc Returns: Token price in USD with source information. Price: $0.15 """ payload = {"tokenAddress": token_address, "chain": chain} result = await call_coinrailz_service("token-price", payload) return json.dumps(result, indent=2)