get_portfolio
Retrieve detailed portfolio information for your team using the Trading Simulator MCP Server to monitor balances, track positions, and manage trading strategies effectively.
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)The handler function for the 'get_portfolio' tool. It calls tradingClient.getPortfolio() to fetch the portfolio data and returns it as a JSON string in the MCP response format.case "get_portfolio": { const response = await tradingClient.getPortfolio(); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false }; }
- src/index.ts:120-129 (registration)Registration of the 'get_portfolio' tool in the TRADING_SIM_TOOLS array, which is returned by the ListTools handler. Includes the tool name, description, and input schema (empty object since no parameters required).{ 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:154-160 (schema)TypeScript interface defining the structure of the portfolio response, used implicitly as output schema for the get_portfolio tool.export interface PortfolioResponse extends ApiResponse { teamId: string; totalValue: number; tokens: TokenPortfolioItem[]; snapshotTime: string; source: PortfolioSource; }
- src/types.ts:145-152 (schema)Type definition for individual token portfolio items, part of the portfolio response structure.export interface TokenPortfolioItem { token: string; amount: number; price: number; value: number; chain: BlockchainType; specificChain: SpecificChain | null; }