Skip to main content

Track settlement

Status​

Each hedge returned by GET /api/v2/hedges carries a settlement object:

statusMeaningAction
pendingActive, or expired and not yet settledWait
settled_no_payoutSettled at or inside the strikeNone
settled_claimableSettled with a payoutClaim
claimedPaidNone

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:

EventWhen
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.