get_account_info
Retrieve account metadata including currency code and account ID for Trading 212 investment accounts to enable portfolio tracking and account management.
Instructions
Retrieve account metadata including currency code and account ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:564-576 (handler)The handler block that executes the 'get_account_info' tool (along with related account tools) using the client.getAccountSummary() method.
case 'get_account_info': case 'get_account_cash': case 'get_account_summary': { const summary = await client.getAccountSummary(); return { content: [ { type: 'text', text: JSON.stringify(summary, null, 2), }, ], }; } - src/index.ts:64-71 (registration)The definition and registration of the 'get_account_info' tool within the tools array.
{ name: 'get_account_info', description: 'Retrieve account metadata including currency code and account ID', inputSchema: { type: 'object', properties: {}, }, }, - src/client.ts:142-144 (helper)The 'getAccountSummary' method in the Trading212Client class, which performs the actual API call to retrieve the account information.
async getAccountSummary(): Promise<AccountSummary> { return this.request('/equity/account/summary', {}, AccountSummarySchema); }