get_orderbook
Retrieve an orderbook snapshot for a specified trading pair on Upbit. Use this tool to access detailed market data for informed trading decisions.
Instructions
Get orderbook snapshot for a given symbol
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Implementation Reference
- tools/get_orderbook.py:4-9 (handler)The main handler function that implements the get_orderbook tool logic. It asynchronously fetches the orderbook data for the specified symbol from the Upbit API endpoint.async def get_orderbook(symbol: str) -> dict: """Get orderbook snapshot for a given symbol""" url = f"{API_BASE}/orderbook" async with httpx.AsyncClient() as client: res = await client.get(url, params={"markets": symbol}) return res.json()[0]
- main.py:43-43 (registration)Registers the get_orderbook function as an MCP tool using FastMCP's tool decorator.mcp.tool()(get_orderbook)