get_balances
Retrieve token balances for your team in the Trading Simulator to monitor holdings and track portfolio performance.
Instructions
Get token balances for your team
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_balances"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/api-client.ts:257-264 (handler)Core handler function that executes the getBalances tool logic by making an authenticated API request to retrieve token balances.
async getBalances(): Promise<BalancesResponse | ErrorResponse> { return this.request<BalancesResponse>( 'GET', '/api/account/balances', null, 'get balances' ); } - src/index.ts:110-119 (registration)MCP tool registration including name, description, and input schema (no parameters required).
{ name: "get_balances", description: "Get token balances for your team", inputSchema: { type: "object", properties: {}, additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#" } }, - src/index.ts:460-466 (handler)MCP CallToolRequest dispatch handler for get_balances tool, delegates to tradingClient.getBalances() and formats response.
case "get_balances": { const response = await tradingClient.getBalances(); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; } - src/types.ts:132-142 (schema)Type definitions for BalancesResponse (output) and TokenBalance used in getBalances response.
export interface TokenBalance { token: string; amount: number; chain: BlockchainType; specificChain: SpecificChain | null; } export interface BalancesResponse extends ApiResponse { teamId: string; balances: TokenBalance[]; }