get_orderbook
Retrieve real-time orderbook data for cryptocurrency trading pairs on Upbit to analyze market depth and make informed trading decisions.
Instructions
Get orderbook snapshot for a given symbol
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "get_orderbook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Implementation Reference
- tools/get_orderbook.py:4-9 (handler)The main handler function that fetches the orderbook snapshot for a given symbol using the Upbit API via httpx.
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 imported get_orderbook function as an MCP tool using FastMCP's decorator.
mcp.tool()(get_orderbook)