get_trades
Retrieve recent trade ticks for a specific cryptocurrency symbol using the Upbit MCP Server, enabling precise market analysis and decision-making.
Instructions
Get recent trade ticks for a symbol
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Implementation Reference
- tools/get_trades.py:4-9 (handler)The main handler function for the 'get_trades' tool. It takes a symbol parameter and fetches recent trade ticks from the Upbit API using httpx.async def get_trades(symbol: str) -> list[dict]: """Get recent trade ticks for a symbol""" url = f"{API_BASE}/trades/ticks" async with httpx.AsyncClient() as client: res = await client.get(url, params={"market": symbol}) return res.json()
- main.py:44-44 (registration)Registration of the get_trades tool in the MCP server using FastMCP's mcp.tool() decorator.mcp.tool()(get_trades)
- main.py:8-8 (registration)Import statement for the get_trades function in main.py.from tools.get_trades import get_trades
- tools/get_trades.py:4-4 (schema)Type hints defining the input schema (symbol: str) and output schema (list[dict]) for the tool.async def get_trades(symbol: str) -> list[dict]: