Retrieve all open positions for a specific trading account including quantity, cost basis, current market value, and unrealized profit/loss. Track portfolio holdings and performance metrics in real-time.
Use Case: Display a portfolio summary with current positions, P&L, and percentage gains/losses for each holding.
GetPositionsResponse / PositionResponse (svc/trade-xh-svc/internal/transport/http/response.go). Position numerics are decimal strings. instrument is normalized for display (E, I, O become EQUITY, INDEX, OPTION). The sample includes every JSON field on the response object.
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Account ID
Account positions retrieved successfully
Response for GET /v1/accounts/{id}/positions. Cached positions for the account plus data availability metadata (trade-xh-svc). Numeric amounts are returned as decimal strings.