Skip to main content
WEBHOOK
trader-position-resolved
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "event": "<string>",
  "data": {
    "trader": "<string>",
    "position_id": "<string>",
    "condition_id": "<string>",
    "event_slug": "<string>",
    "category": "<string>",
    "outcome": "<string>",
    "outcome_index": 123,
    "total_buys": 123,
    "total_sells": 123,
    "total_merges": 123,
    "total_splits": 123,
    "winning_outcome_index": 123,
    "total_shares_bought": 123,
    "total_shares_sold": 123,
    "buy_usd": 123,
    "sell_usd": 123,
    "avg_entry_price": 123,
    "total_fees": 123,
    "realized_pnl_usd": 123,
    "total_pnl_usd": 123,
    "redemption_usd": 123,
    "open": true,
    "won": true,
    "first_trade_at": 123,
    "last_trade_at": 123,
    "dirty_kinds": [],
    "realized_pnl_pct": 123,
    "market_slug": "<string>",
    "title": "<string>",
    "question": "<string>",
    "image_url": "<string>",
    "converted_count": 1,
    "converted_shares_gained": 123,
    "converted_shares_lost": 123,
    "total_buy_usd": 123,
    "total_sell_usd": 123,
    "merge_usd": 123,
    "avg_exit_price": 123,
    "avg_price": 123,
    "current_price": 123,
    "current_shares_balance": 123,
    "current_value": 123,
    "last_traded_price": 123,
    "end_date": 123,
    "is_neg_risk": true,
    "redeemable": true,
    "mergeable": true
  },
  "timestamp": 123,
  "webhook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "attempt": 2
}

Headers

X-Webhook-ID
string<uuid>
required

UUID of the webhook subscription that fired

X-Delivery-ID
string<uuid>
required

UUID of this specific delivery attempt (matches envelope id field)

X-Event-Type
string
required

Event name string (e.g. trader_first_trade)

X-Attempt
integer
required

Delivery attempt number (1 = first attempt)

Required range: x >= 1
X-Webhook-Signature
string

HMAC-SHA256 of the raw request body: sha256=<hex>. Present only when the webhook has a secret configured. Verify with: HMAC-SHA256(secret, raw_body_bytes) == hex_part.

Pattern: ^sha256=[0-9a-f]{64}$

Body

application/json

Webhook delivery envelope. The data field contains the event-specific payload.

Outer envelope for every webhook HTTP POST delivery. The data field contains the event-specific payload. Delivery headers sent with every POST: X-Webhook-ID (subscription UUID), X-Delivery-ID (this attempt's UUID), X-Event-Type (event name string, e.g. trader_first_trade), X-Attempt (attempt number, 1-indexed). When the webhook has a secret configured, X-Webhook-Signature: sha256=<hmac-hex> is also included — compute HMAC-SHA256 over the raw request body using your secret to verify.

id
string<uuid>
required

UUID of this specific delivery attempt (matches X-Delivery-ID header)

event
string
required

Event name (e.g. trader_first_trade). On test deliveries the suffix _test is appended.

data
object
required

Event-specific payload — schema varies by event type; see the individual callback definitions

timestamp
integer<int64>
required

Unix timestamp in milliseconds when this delivery was created

webhook_id
string<uuid>
required

UUID of the webhook subscription that fired (matches X-Webhook-ID header)

attempt
integer
required

Delivery attempt number. 1 = first attempt; increments on each retry.

Required range: x >= 1

Response

Webhook delivery acknowledged

Last modified on June 13, 2026