Get Currencies
whmcs_get_currenciesRetrieve all currencies configured in your WHMCS system. Provides a list of active currencies for management or display.
Instructions
Get configured currencies
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1047-1060 (registration)Registration of the 'whmcs_get_currencies' tool via server.registerTool(). It takes no input parameters and calls whmcsClient.getCurrencies().
server.registerTool( 'whmcs_get_currencies', { title: 'Get Currencies', description: 'Get configured currencies', inputSchema: {}, }, async () => { const result = await whmcsClient.getCurrencies(); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/whmcs-client.ts:1232-1245 (handler)Handler function getCurrencies() in WhmcsApiClient class. Calls the WHMCS API 'GetCurrencies' action and returns the typed response with currency data (id, code, prefix, suffix, format, rate, default).
async getCurrencies() { return this.call<WhmcsApiResponse & { totalresults: number; currencies: { currency: Array<{ id: number; code: string; prefix: string; suffix: string; format: number; rate: string; default: number; }> }; }>('GetCurrencies'); }