Skip to main content
Event: trader_market_pnl
Endpoint: wss://api.struct.to/ws/alerts
Cost: 0.1 credits per event
Fires when a trader’s profit and loss in a specific market crosses the configured thresholds. Unlike trader_global_pnl, this event is scoped to individual markets, allowing you to track performance on a per-market basis.

Filters

FilterTypeRequiredDescription
tradersstring[]NoSpecific trader wallet addresses (max 500)
condition_idsstring[]NoRestrict to specific markets (max 500)
event_slugsstring[]NoRestrict to specific events (max 500)
min_realized_pnl_usdnumberNoMinimum realized PnL in USD
max_realized_pnl_usdnumberNoMaximum realized PnL in USD
min_buy_usdnumberNoMinimum buy volume in USD
min_volume_usdnumberNoMinimum total volume in USD
max_volume_usdnumberNoMaximum total volume in USD
min_sell_volume_usdnumberNoMinimum sell volume in USD
timeframesstring[]NoTimeframes to track (valid: 1d, 7d, 30d, lifetime)
exclude_shortterm_marketsbooleanNoExclude short-term “updown” markets

Subscribe

{
  "op": "subscribe",
  "event": "trader_market_pnl",
  "traders": ["0x37BA57e2942A57F05B5E4BCFD4d027845cFC40ec"],
  "min_realized_pnl_usd": 1000,
  "exclude_shortterm_markets": true
}

Response

{
  "event": "trader_market_pnl",
  "timestamp": 1775913505260,
  "data": {
    "trader": "0x37BA57e2942A57F05B5E4BCFD4d027845cFC40ec",
    "condition_id": "0x4fec624c0ff2bfae89956cebd6fbc9c58f995f824382dc587dc5a32a4b15940b",
    "event_slug": "2026-us-midterm-elections",
    "timeframe": "7d",
    "outcomes_traded": 2,
    "total_buys": 12,
    "total_sells": 8,
    "total_redemptions": 3,
    "total_merges": 1,
    "buy_usd": 10000.00,
    "sell_usd": 3500.00,
    "redemption_usd": 1200.00,
    "merge_usd": 300.00,
    "realized_pnl_usd": 3200.50,
    "winning_outcomes": 2,
    "total_fees": 30.00,
    "first_trade_at": 1712966400,
    "last_trade_at": 1713052800
  }
}
Last modified on April 13, 2026