Skip to main content
Glama

GET_ORDERBOOK

Retrieve an orderbook snapshot for a specified cryptocurrency market on Upbit. Input the market code to access real-time bid and ask data for trading analysis and decision-making.

Instructions

Get orderbook snapshot for a given market

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketYesUpbit market code, e.g., KRW-BTC

Implementation Reference

  • The execute function implementing the core logic of the GET_ORDERBOOK tool, which fetches the orderbook snapshot from the Upbit API for the given market.
    execute: async ({ market }: Params) => { const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const data = await fetchJson<unknown>(client, "/orderbook", { params: { markets: market }, }); /** biome-ignore lint/suspicious/noExplicitAny: <not important> */ const item = Array.isArray(data) ? (data as any[])[0] : (data as any); return JSON.stringify(item, null, 2); },
  • Zod schema defining the input parameters for the GET_ORDERBOOK tool (market string).
    const paramsSchema = z.object({ market: z.string().min(3).describe("Upbit market code, e.g., KRW-BTC"), });
  • src/index.ts:32-32 (registration)
    Registers the getOrderbookTool with the FastMCP server instance.
    server.addTool(getOrderbookTool);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IQAIcom/mcp-upbit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server