get_portfolio
Retrieve current portfolio holdings and performance data for your trading team in the simulation environment.
Instructions
Get portfolio information for your team
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:468-474 (handler)MCP CallToolRequest handler case for 'get_portfolio': calls tradingClient.getPortfolio() and returns formatted text response.case "get_portfolio": { const response = await tradingClient.getPortfolio(); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; }
- src/api-client.ts:271-278 (handler)TradingSimulatorClient.getPortfolio(): performs authenticated HTTP GET to backend /api/account/portfolio endpoint.async getPortfolio(): Promise<PortfolioResponse | ErrorResponse> { return this.request<PortfolioResponse>( 'GET', '/api/account/portfolio', null, 'get portfolio' ); }
- src/index.ts:120-129 (registration)Tool registration in TRADING_SIM_TOOLS array (returned by ListToolsRequest): name, description, empty input schema.{ name: "get_portfolio", description: "Get portfolio information for your team", inputSchema: { type: "object", properties: {}, additionalProperties: false, $schema: "http://json-schema.org/draft-07/schema#" } },
- src/types.ts:145-160 (schema)Output type definitions: TokenPortfolioItem and PortfolioResponse (extends ApiResponse).export interface TokenPortfolioItem { token: string; amount: number; price: number; value: number; chain: BlockchainType; specificChain: SpecificChain | null; } export interface PortfolioResponse extends ApiResponse { teamId: string; totalValue: number; tokens: TokenPortfolioItem[]; snapshotTime: string; source: PortfolioSource; }