Skip to main content
Glama

GET_TRADES

Retrieve recent cryptocurrency trade data from Upbit exchange to analyze market activity and transaction patterns for informed trading decisions.

Instructions

Get recent trades for a market

Input Schema

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

Implementation Reference

  • The main handler function that executes the tool logic: fetches recent trades from Upbit API for the given market and returns formatted JSON.
    execute: async ({ market }: Params) => { const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const data = await fetchJson<unknown>(client, "/trades/ticks", { params: { market }, }); return JSON.stringify(data, null, 2); },
  • Zod schema defining the input parameter 'market' for the tool.
    const paramsSchema = z.object({ market: z.string().min(3).describe("Upbit market code, e.g., KRW-BTC"), });
  • src/index.ts:33-33 (registration)
    Registers the getTradesTool with the FastMCP server.
    server.addTool(getTradesTool);
  • src/index.ts:16-16 (registration)
    Imports the getTradesTool from its definition file.
    import { getTradesTool } from "./tools/get-trades.js";

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