get_lighter_instruments
List available Lighter.xyz instruments with market IDs, fees, and decimals to identify valid trading symbols and active markets.
Instructions
List all available Lighter.xyz instruments with market IDs, fees, size/price decimals, and active status. Use this to discover valid Lighter symbols.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | Array of result records | |
| count | Yes | Total number of records in the full result set | |
| nextCursor | No | Cursor for next page, if more results available |
Implementation Reference
- src/index.ts:776-780 (handler)Registration of the 'get_lighter_instruments' tool via the registerInstrumentsTool helper. The handler calls api().lighter.instruments.list() and formats the response. This is an instrument list tool (no input params) that returns all available Lighter.xyz instruments.
registerInstrumentsTool( "get_lighter_instruments", "List all available Lighter.xyz instruments with market IDs, fees, size/price decimals, and active status. Use this to discover valid Lighter symbols.", () => api().lighter.instruments.list() ); - src/index.ts:776-780 (registration)The tool is registered using the registerInstrumentsTool helper (defined at line 361) which wraps registerTool (line 328). registerInstrumentsTool passes an empty input schema {} and ListOutputSchema, and provides the SDK call api().lighter.instruments.list() as the handler.
registerInstrumentsTool( "get_lighter_instruments", "List all available Lighter.xyz instruments with market IDs, fees, size/price decimals, and active status. Use this to discover valid Lighter symbols.", () => api().lighter.instruments.list() ); - src/index.ts:361-370 (helper)registerInstrumentsTool helper function that registers an instrument-list tool with no input parameters, returning formatted list output.
function registerInstrumentsTool( name: string, description: string, sdkCall: () => Promise<unknown[]> ): void { registerTool(name, description, {}, ListOutputSchema, async () => { const data = await sdkCall(); return formatResponse(data); }); } - src/index.ts:328-358 (helper)registerTool is the core helper that wraps server.registerTool with API key guard, error handling, and annotation configuration.
function registerTool( name: string, description: string, inputSchema: ZodRawShape, outputSchema: ZodRawShape, handler: (params: any) => Promise<McpContent> ): void { server.registerTool( name, { description, inputSchema, outputSchema, annotations: TOOL_ANNOTATIONS, }, async (params: any) => { if (!client) { return { content: [{ type: "text" as const, text: MISSING_KEY_MESSAGE }], isError: true, }; } try { return await handler(params); } catch (err) { const error = err instanceof OxArchiveError ? err : new OxArchiveError(String(err), 500); return formatError(error); } } ); } - src/index.ts:73-75 (schema)LighterCoinParam schema used by the single-instrument variant (get_lighter_instrument), but not by get_lighter_instruments which takes no params.
const LighterCoinParam = z .string() .describe("Lighter.xyz coin symbol, e.g. 'BTC', 'ETH'");