Portfolio
GET /api/positions
Insights Open / Pending / Closed tabs. Accepts the legacy roll-up filters (open/pending/closed) and migration 040's granular sub-states (pending_resting, pending_awaiting_resolution, closed_won, closed_lost, closed_sold, closed_canceled). Open rows are live mark-to-marketed via the per-user portfolio price cache (portfolio:<userId>); markSource indicates whether live prices were available. Response includes a summary block (openExposureUsd, openCostUsd, unrealizedPnlUsd, unrealizedPnlPct) and hasMore.
Authorization
privy AuthorizationBearer <token>
Privy access token. For live POST /execute, use the wallet-auth JWT instead.
In: header
Query Parameters
status?string
Default
"open"Value in
"open" | "pending" | "closed" | "pending_resting" | "pending_awaiting_resolution" | "closed_won" | "closed_lost" | "closed_sold" | "closed_canceled" | "all"limit?integer
Range
value <= 200offset?integer
Response Body
curl -X GET "https://api.pear.trade/api/positions"Empty