getForexList
Retrieve the complete list of forex currency pairs traded globally. Use this data to analyze and track currency pair performance for informed investment decisions.
Instructions
Access a comprehensive list of all currency pairs traded on the forex market with the FMP Forex Currency Pairs API. Analyze and track the performance of currency pairs to make informed investment decisions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/forex.ts:16-39 (handler)MCP tool registration for 'getForexList'. The handler calls forexClient.getList() which fetches /forex-list from the FMP API, returning all currency pairs as JSON.
server.tool( "getForexList", "Access a comprehensive list of all currency pairs traded on the forex market with the FMP Forex Currency Pairs API. Analyze and track the performance of currency pairs to make informed investment decisions.", {}, async () => { try { const results = await forexClient.getList(); return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }], }; } catch (error) { return { content: [ { type: "text", text: `Error: ${ error instanceof Error ? error.message : String(error) }`, }, ], isError: true, }; } }); - src/tools/forex.ts:19-19 (schema)Input schema for 'getForexList' — empty object (no parameters required).
{}, - src/api/forex/ForexClient.ts:21-26 (helper)The getList() method on ForexClient that calls super.get('/forex-list') to fetch the list of forex currency pairs.
async getList(options?: { signal?: AbortSignal; context?: FMPContext; }): Promise<ForexPair[]> { return super.get<ForexPair[]>("/forex-list", {}, options); } - src/api/forex/types.ts:1-7 (schema)Type definition for ForexPair — the return type of getForexList, containing symbol, fromCurrency, toCurrency, fromName, toName.
export interface ForexPair { symbol: string; fromCurrency: string; toCurrency: string; fromName: string; toName: string; } - src/toolception-adapters/marketModuleAdapters.ts:26-31 (registration)Registration of the forex module adapter that loads registerForexTools (which includes getForexList) via toolception's module system.
forex: createModuleAdapter('forex', registerForexTools), statements: createModuleAdapter('statements', registerStatementsTools), 'form-13f': createModuleAdapter('form-13f', registerForm13FTools), indexes: createModuleAdapter('indexes', registerIndexesTools), 'insider-trades': createModuleAdapter('insider-trades', registerInsiderTradesTools), };