> ## 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 PnL Exits

> Fire a webhook each time a trader closes a position, with the realized PnL and exit reason.

<Note>
  **Event:** `trader_pnl_exits` \
  **Cost:** 0.025 credits per delivery
</Note>

Fires once each time a trader closes a position, carrying the realized PnL at exit and a reason describing how the position was closed. The full payload schema is in the auto-generated [Trader PnL Exits callback](/api-reference/webhook-callbacks/exit-markers-callback) reference; this page documents the filters and matching behavior.

## When to use this

* Overlay exit markers on a trader's PnL chart as positions are closed.
* Distinguish positions held to resolution from those sold early using the exit reason.
* Stream realized outcomes for a watchlist of traders, markets, or events as they happen.

## 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).          |

## Exit reasons

Each delivery carries a `reason` describing how the position was closed:

| Reason          | Meaning                                                   |
| --------------- | --------------------------------------------------------- |
| `resolved_win`  | Held to market resolution and won by the market verdict.  |
| `resolved_loss` | Held to market resolution and lost by the market verdict. |
| `sold_win`      | Closed before resolution with positive realized PnL.      |
| `sold_loss`     | Closed before resolution with negative realized PnL.      |

The `resolved_*` reasons reflect the settled market outcome, while the `sold_*` reasons reflect the sign of realized PnL on an early exit.

## Example

```json theme={null}
{
  "url": "https://your-server.com/webhooks",
  "event": "trader_pnl_exits",
  "filters": {
    "traders": ["0xabc1230000000000000000000000000000000000"],
    "event_slugs": ["us-presidential-election-2028"]
  }
}
```

## Notes

* One delivery is sent per position close, so a trader who exits several positions produces several events.
* The payload includes realized PnL in USD and as a percentage, the cost basis, and the exit reason.
