> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Trader Market PnL

> Fire a webhook when a trader's realized PnL in a specific market crosses your configured bounds.

<Note>
  **Event:** `trader_market_pnl` \
  **Cost:** 0.1 credits per delivery
</Note>

Fires when a trader's realized PnL in a specific market (condition) crosses your configured bounds. The full payload schema is in the auto-generated [Trader Market PnL callback](/api-reference/webhook-callbacks/market-pnl-callback) reference; this page documents the filters and matching behavior.

## When to use this

* Alert when a trader books a target profit or loss inside a single market you care about.
* Scope PnL tracking to specific condition IDs or event slugs instead of a trader's whole book.
* Spot outsized per-market wins or drawdowns by pairing PnL bounds with volume filters.

## Subscription filters

Add these to the `filters` object when you create the subscription.

| Filter                      | Type      | Description                                             |
| --------------------------- | --------- | ------------------------------------------------------- |
| `traders`                   | string\[] | Restrict to specific trader wallet addresses (max 500). |
| `condition_ids`             | string\[] | Restrict to specific markets by condition ID (max 500). |
| `event_slugs`               | string\[] | Restrict to specific events by slug (max 500).          |
| `min_realized_pnl_usd`      | number    | Minimum realized PnL in USD.                            |
| `max_realized_pnl_usd`      | number    | Maximum realized PnL in USD.                            |
| `min_volume_usd`            | number    | Minimum traded volume in USD.                           |
| `max_volume_usd`            | number    | Maximum traded volume in USD.                           |
| `min_buy_usd`               | number    | Minimum buy-side volume in USD.                         |
| `min_sell_volume_usd`       | number    | Minimum sell-side volume in USD.                        |
| `timeframes`                | string\[] | One or more PnL windows: `1d`, `7d`, `30d`, `lifetime`. |
| `exclude_shortterm_markets` | boolean   | Exclude short-term Up/Down markets.                     |

## Example

```json theme={null}
{
  "url": "https://your-server.com/webhooks",
  "event": "trader_market_pnl",
  "filters": {
    "condition_ids": ["0x1234abcd5678ef901234abcd5678ef901234abcd5678ef901234abcd5678ef90"],
    "min_realized_pnl_usd": 5000,
    "min_volume_usd": 25000,
    "timeframes": ["7d"]
  }
}
```

## Notes

* Combine `min_realized_pnl_usd` and `max_realized_pnl_usd` to match a PnL band rather than a single bound.
* `timeframes` scopes the window over which per-market realized PnL is measured; `lifetime` uses the trader's full history in that market.
