Portfolio
GET /api/positions/by-market/{venue}/{marketId}/preview
One-shot read for the mobile 'Add to position' sheet. Combines the current user_positions row (live mark when available), a venue cost estimate from runCostRundown, and program-aware cashback math from identity.referral_programs. See API_REFERENCE.md §6.6.4. Rate-limited under the mobile_reads bucket (120 req/min) so the FE can call per keystroke.
Authorization
privy AuthorizationBearer <token>
Privy access token. For live POST /execute, use the wallet-auth JWT instead.
In: header
Path Parameters
venue*string
Value in
"polymarket" | "kalshi"marketId*string
Query Parameters
amountUsd*number
Range
0 <= valueside?string
Value in
"buy" | "sell"outcome?string
Value in
"yes" | "no"pearId?string
Required when the user has no existing position on this market (fresh entry).
Response Body
curl -X GET "https://api.pear.trade/api/positions/by-market/polymarket/string/preview?amountUsd=0"Empty
Empty
Empty
Empty
Empty
Empty