Polymarket

Polymarket PnL

Retrieves realized profit and loss (PnL) for a given wallet address over a specified time range and aggregation interval. You may optionally filter results to a single market using condition_id. Unlike Polymarket’s dashboard, which displays unrealized PnL, this API reports realized gains only, calculated from confirmed sell transactions or fully settled (closed) markets.

POST/v2/semantic/retrieve/parameterized

Query Parameters

granularitystring
Aggregation interval. Possible values are 1d 3d 1w 1m all
Example:
"1d"
walletstring
Wallet Id.
Example:
"0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd"
start_timestring
Filter after this timestamp
Example:
"2026-02-10"
end_timestring
Filter before this timestamp
Example:
"2026-02-28"

Response Fields

FieldTypeDescription
dateString (ISO 8601)Date for which the performance metrics are aggregated
proxy_walletStringWallet address for which performance is calculated
investedString (Decimal)Total amount invested during the period
pnlString (Decimal)Net profit and loss for the period (negative values indicate a loss)
tradesIntegerTotal number of trades executed during the period
winsIntegerNumber of profitable trades
lossesIntegerNumber of losing trades
win_rateString (Decimal)Proportion of winning trades (0–1 or percentage, depending on client interpretation)
Polymarket PnL
curl --request POST \
  --url https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_id": 569,
  "params": {
    "granularity": "1d",
    "wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
    "start_time": "2026-02-10",
    "end_time": "2026-02-28"
  },
  "pagination": {
    "limit": 10,
    "offset": 0
  },
  "formatter_config": {
    "format_type": "raw"
  }
}'
200Example response
{
  "timestamp": "",
  "params": {
    "condition_id": "ALL",
    "end_time": "2026-02-28",
    "granularity": "1d",
    "start_time": "2026-02-10",
    "wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd"
  },
  "pagination": {
    "limit": 200,
    "offset": 0,
    "has_more": true
  },
  "data": {
    "results": [
      {
        "date": "2026-02-19T00:00:00Z",
        "invested": "830494.18",
        "losses": 0,
        "pnl": "0.00",
        "proxy_wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
        "trades": 3342,
        "win_rate": "0.00",
        "wins": 0
      },
      {
        "date": "2026-02-20T00:00:00Z",
        "invested": "241245.70",
        "losses": 18,
        "pnl": "-302209.22",
        "proxy_wallet": "0x8e433d051bfb5cc6a1f7e5a0452029b7ffb4a3cd",
        "trades": 406,
        "win_rate": "0.49",
        "wins": 2
      }
    ]
  }
}