get_ticker
Retrieve real-time ticker data for specific cryptocurrency symbols from the Upbit exchange. Input a symbol to access accurate pricing and market information for informed trading decisions.
Instructions
Get the latest ticker data from Upbit
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Implementation Reference
- tools/get_ticker.py:4-9 (handler)The main handler function that fetches the latest ticker data for the given symbol from the Upbit API using httpx.async def get_ticker(symbol: str) -> dict: """Get the latest ticker data from Upbit""" url = f"{API_BASE}/ticker" async with httpx.AsyncClient() as client: res = await client.get(url, params={"markets": symbol}) return res.json()[0]
- main.py:42-42 (registration)Registration of the get_ticker tool with FastMCP using the mcp.tool() decorator.mcp.tool()(get_ticker)
- main.py:6-6 (registration)Import of the get_ticker handler function into main.py for registration.from tools.get_ticker import get_ticker