Data API
The Data API (https://data-api.polymarket.com) is read-only from
polygolem’s point of view. It does not require API keys for the current CLI
surface.
CLI
polygolem data positions --user 0x...polygolem data closed-positions --user 0x...polygolem data trades --user 0x... --limit 20polygolem data activity --user 0x... --limit 20polygolem data holders --token-id <token-id> --limit 20polygolem data value --user 0x...polygolem data markets-traded --user 0x...polygolem data open-interest --token-id <token-id>polygolem data leaderboard --limit 20polygolem data live-volume --limit 20SDK
Use pkg/data when you only need Data API analytics. The public
pkg/universal facade exposes the same Data API methods when a caller already
uses one client for Gamma, CLOB, Data API, discovery, and streams. Both public
surfaces return DTOs from pkg/types.
import "github.com/TrebuchetDynamics/polygolem/pkg/data"
client := data.NewClient(data.Config{})positions, err := client.CurrentPositionsWithLimit(ctx, user, 20)leaders, err := client.TraderLeaderboard(ctx, 20)volume, err := client.LiveVolume(ctx, 20)Position Fields For Settlement
GET /positions is the read-only source Polygolem uses to distinguish a
filled order from a redeemable winner. Current position rows include:
| Field | Use |
|---|---|
asset | CTF token ID held by the wallet |
conditionId | Market condition used for redeem calldata |
redeemable | Redemption readiness signal |
mergeable | Future merge-flow readiness signal |
negativeRisk | Chooses NegRiskCtfCollateralAdapter instead of CtfCollateralAdapter |
outcome, outcomeIndex | Held side and its index |
oppositeOutcome, oppositeAsset | Opposite side, useful for operator output |
endDate | Resolution window context |
There is no separate resolved boolean in the current schema. A settlement
worker should filter on redeemable=true and then route through the V2
collateral adapter that matches negativeRisk.