Skip to content

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

Terminal window
polygolem data positions --user 0x...
polygolem data closed-positions --user 0x...
polygolem data trades --user 0x... --limit 20
polygolem data activity --user 0x... --limit 20
polygolem data holders --token-id <token-id> --limit 20
polygolem data value --user 0x...
polygolem data markets-traded --user 0x...
polygolem data open-interest --token-id <token-id>
polygolem data leaderboard --limit 20
polygolem data live-volume --limit 20

SDK

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:

FieldUse
assetCTF token ID held by the wallet
conditionIdMarket condition used for redeem calldata
redeemableRedemption readiness signal
mergeableFuture merge-flow readiness signal
negativeRiskChooses NegRiskCtfCollateralAdapter instead of CtfCollateralAdapter
outcome, outcomeIndexHeld side and its index
oppositeOutcome, oppositeAssetOpposite side, useful for operator output
endDateResolution 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.