magnifying-glass-plusRead Positions

These endpoints provide public, read-only access to PredictBase position data.

  • No authentication required

  • Rate-limited

  • Position data may be delayed by up to ~2 seconds


Get Active User Positions

Returns a list of a user’s active positions, including:

  • Aggregated position metrics (shares, avg cost, total cost)

  • Related market metadata

  • Full trade history for each position

Endpoint

GET /get_active_positions/{user}

Full URL

https://api.predictbase.app/get_active_positions/{user}

Authentication

  • None (rate-limited)

Response Example

Each item represents one user position per market option.


Field Descriptions

Field
Description

id

Unique position ID (marketId-optionIndex-user)

user.id

User wallet address

optionIndex

Selected option index

shares

Total shares owned (1e6 precision)

totalCost

Total USDC spent (1e6 precision)

avgCost

Average cost per share (1e6 precision)

claimed

Whether the winning has been claimed for the position

claimedAmount

USDC claimed (1e6 precision)

isRefund

True if position was refunded (Cancelled Markets)

placedAt

First trade timestamp (unix seconds)

claimedAt

Claim timestamp or null


Data Notes

  • USDC values use 1e6 precision (Example: "550000" = 0.55 USDC)

  • Timestamps are Unix seconds

Last updated