get_market_hours
Retrieve market hours for specific exchanges via the Paper MCP Server. Enables AI assistants to provide trading schedule details using natural language queries, supporting informed trading decisions.
Instructions
Get market hours for an exchange
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exchange | No | Exchange name (optional) |
Implementation Reference
- src/index.ts:502-508 (handler)Handler implementation for the 'get_market_hours' tool. Fetches market hours from the API endpoint, optionally filtered by exchange.case 'get_market_hours': if (args.exchange) { response = await api.get(`/market-data/market-hours/${args.exchange}`); } else { response = await api.get('/market-data/market-hours'); } break;
- src/index.ts:322-330 (schema)Tool definition including name, description, and input schema for 'get_market_hours' used in tool registration.name: 'get_market_hours', description: 'Get market hours for an exchange', inputSchema: { type: 'object', properties: { exchange: { type: 'string', description: 'Exchange name (optional)' } } } },
- src/index.ts:388-392 (registration)Registration of all tools including 'get_market_hours' via the tools array returned in ListTools handler.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });