binance.market.exchangeInfo
Retrieve exchange information and symbol filters to understand trading parameters and restrictions on Binance.
Instructions
Get exchange information including filters per symbol.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/market.ts:48-55 (handler)The tool execution handler: fetches exchange information using the binance client and returns the data, with error conversion.async run() { try { const res = await binance.exchangeInfo(); return res.data; } catch (err) { throw toToolError(err); } }
- src/tools/market.ts:12-12 (schema)Zod input schema for the tool (empty object as no parameters are required).const exchangeInfoSchema = z.object({});
- src/index.ts:24-39 (registration)Tool registration loop in FastMCP server that adds this tool (included in the 'tools' array) with a wrapper execute function calling the tool's run method.tools.forEach((tool) => { server.addTool({ name: tool.name, description: tool.description, parameters: tool.parameters, execute: async (args) => { try { const result = await tool.run(args); return JSON.stringify(result, null, 2); } catch (error) { const handled = error instanceof ToolError ? error : new ToolError((error as Error).message); throw handled; } }, }); });
- src/index.ts:14-22 (registration)The tools array where tool_exchange_info is included for registration.const tools = [ tool_market_price, tool_market_klines, tool_exchange_info, tool_account_balances, tool_open_orders, tool_place_order, tool_cancel_order, ];
- src/binance/client.ts:14-14 (helper)Initialization of the binance Spot client used by the tool handler.export const binance = new Spot(apiKey, apiSecret, { baseURL });