Skip to main content
Room ID: polymarket_trader_pnl
Endpoint: wss://api.struct.to/ws
Rate: 0.1 credits per message
Stream profit and loss updates for tracked traders. The room emits three event types covering global PnL across all markets, PnL for a specific market, and PnL for a specific event.

Subscribe

The traders filter is required. Provide one or more wallet addresses (0x-prefixed) to track.

Filters

FilterTypeRequiredDescription
tradersstring[]YesWallet addresses to track (0x-prefixed)

Example

{
  "type": "join_room",
  "payload": {
    "room_id": "polymarket_trader_pnl"
  }
}
{
  "type": "room_message",
  "payload": {
    "room_id": "polymarket_trader_pnl",
    "message": {
      "action": "subscribe",
      "traders": ["0x1234567890abcdef1234567890abcdef12345678"]
    }
  }
}

Response

{
  "type": "trader_pnl_stream_subscribe_response",
  "room_id": "polymarket_trader_pnl",
  "data": {
    "traders": ["0x1234567890abcdef1234567890abcdef12345678"],
    "rejected": []
  }
}

Events

trader_global_pnl_update

Overall PnL across all markets for a tracked trader.
{
  "type": "trader_global_pnl_update",
  "room_id": "polymarket_trader_pnl",
  "data": {
    "trader": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "timestamp": 1713012345678,
    "realized_pnl_usd": "12500.75",
    "total_volume_usd": "450000.00",
    "buy_volume_usd": "230000.00",
    "sell_volume_usd": "180000.00",
    "redemption_volume_usd": "40000.00",
    "merge_volume_usd": "0.00",
    "events_traded": 15,
    "markets_traded": 42,
    "total_buys": 120,
    "total_sells": 85,
    "total_redemptions": 12,
    "total_merges": 0,
    "markets_won": 28,
    "markets_lost": 14,
    "market_win_rate_pct": "66.67",
    "avg_pnl_per_market": "297.64",
    "avg_pnl_per_trade": "60.98",
    "avg_hold_time_seconds": "172800.00",
    "total_fees": "900.00",
    "best_trade_pnl_usd": "5200.00",
    "best_trade_condition_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "worst_trade_pnl_usd": "-1200.00",
    "worst_trade_condition_id": null,
    "first_trade_at": 1740000000,
    "last_trade_at": 1743500000,
    "timeframe": "lifetime"
  }
}

trader_market_pnl_update

PnL for a specific market.
{
  "type": "trader_market_pnl_update",
  "room_id": "polymarket_trader_pnl",
  "data": {
    "trader": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "timestamp": 1713012345678,
    "condition_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "event_slug": "bitcoin-price-markets",
    "outcomes_traded": 2,
    "total_buys": 5,
    "total_sells": 3,
    "total_redemptions": 0,
    "total_merges": 0,
    "buy_usd": "2000.00",
    "sell_usd": "2350.25",
    "redemption_usd": "0.00",
    "merge_usd": "0.00",
    "realized_pnl_usd": "350.25",
    "winning_outcomes": 1,
    "total_fees": "8.70",
    "first_trade_at": 1742000000,
    "last_trade_at": 1743500000,
    "timeframe": null
  }
}

trader_event_pnl_update

PnL for a specific event.
{
  "type": "trader_event_pnl_update",
  "room_id": "polymarket_trader_pnl",
  "data": {
    "trader": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "timestamp": 1713012345678,
    "event_slug": "bitcoin-price-markets",
    "markets_traded": 3,
    "outcomes_traded": 5,
    "total_buys": 12,
    "total_sells": 8,
    "total_redemptions": 2,
    "total_merges": 0,
    "total_volume_usd": "15000.00",
    "buy_usd": "8000.00",
    "sell_usd": "5500.00",
    "redemption_usd": "1500.00",
    "merge_usd": "0.00",
    "realized_pnl_usd": "800.00",
    "winning_markets": 2,
    "losing_markets": 1,
    "total_fees": "30.00",
    "first_trade_at": 1741000000,
    "last_trade_at": 1743500000,
    "timeframe": null
  }
}
Last modified on April 13, 2026