Track settlement
Status
Each hedge returned by GET /api/v2/hedges carries a settlement object:
status | Meaning | Action |
|---|---|---|
pending | Active, or expired and not yet settled | Wait |
settled_no_payout | Settled at or inside the strike | None |
settled_claimable | Settled with a payout | Claim |
claimed | Paid | None |
grossPayout, fee and netPayout show what the claim will pay.
Timing
Positions settle after the oracle agrees a rate for them, normally within about 10 minutes after expiry. Poll every minute or two after expiry; there is no webhook yet.
Claim
curl -X POST "$BFX/api/v2/hedges/$POSITION/claim/prepare" \
-H "Authorization: Bearer $TOKEN"
Sign and relay the transaction. NOTHING_TO_CLAIM means the position settled without a payout or is already claimed.
On chain
Watch the currency pool's events:
| Event | When |
|---|---|
PositionSettled { pool_id, position_id, settlement_price, payout } | Settlement |
PayoutClaimed { position_id, hedger, gross_amount, fee, net_amount } | Claim |
And the oracle's RateSubmitted, ConsensusDisagreed and ConsensusReached to follow agreement.