Get positions
Fetch all open positions held by an account with a GET request. Pass the account identifier (e.g. wallet address or API key) to list every market position the account currently holds.
Base URL
All API requests use this base:
HTTP request
Send a GET request to the positions endpoint with the required headers and the account identifier as a query parameter.
Endpoint
GET https://nqyocjuqubsdrguazcjz.supabase.co/rest/v1/rpc/get_positions?account_id=eq.<account-id>
Replace <account-id> with the wallet address or account ID associated with your API key.
Required headers
apikey: <your-api-key> Accept: application/json
Query parameters
- account_id (required) — The wallet address or account identifier whose positions to return.
Example:
GET https://nqyocjuqubsdrguazcjz.supabase.co/rest/v1/rpc/get_positions?account_id=eq.7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
Response
On success, the API returns 200 with a JSON object containing an array of positions:
{
"success": true,
"positions": [
{
"market_id": "uuid",
"market_title": "string",
"side": "yes" | "no",
"outcome_representation": "string",
"shares": number,
"average_price": number,
"current_price": number,
"value_usd": number,
"market_status": "open" | "closed" | "resolved"
}
]
}shares — number of outcome shares held. average_price — volume-weighted average buy price (0–1). current_price — latest YES/NO price. value_usd — approximate value in $PREDICT. If the account has no positions, positions is an empty array.
