Skip to main content

Hedge reads

Every read on the HedgeFacet. Backed by live ethers reads — no DB cache; the response reflects on-chain state at the time of the request.

All endpoints below are GET and unauthenticated.

Events

/v1/hedge/events/:chainId/:id

Event core state.

{
"data": {
"chainId": 8453,
"id": 12,
"creator": "0xCAB3...",
"name": "USD/GHS · Q2 wide",
"underlying": "USD/GHS",
"strike": "11400000",
"premiumRate": "23000",
"expiryDate": 1782182400,
"status": 1,
"poolOpen": true,
"allowExternalLp": true,
"initialRate": "11070000",
"strikeAbove": true
}
}

status values: 0 = Pending, 1 = Active, 2 = Settled, 3 = Cancelled.

Returns 404 not_found if the event ID doesn't exist on that chain.

/v1/hedge/events/:chainId/:id/stats

Aggregate state + settlement.

{
"data": {
"chainId": 8453, "id": 12,
"settlementPrice": "11700000",
"triggered": true,
"settledAt": 1782182433,
"lpCount": 4,
"hedgerCount": 12,
"totalLiquidity": "100000000",
"totalExposure": "850000000",
"totalPremiums": "9750000",
"totalMaxPayout": "42500000"
}
}

/v1/hedge/events/:chainId/:id/range

Range parameters.

{ "data": { "strike": "11400000", "payoutCap": "12000000", "initialRate": "11070000", "strikeAbove": true } }

/v1/hedge/events/:chainId/:id/utilization

Capacity + utilization.

{
"data": {
"totalLiquidity": "100000000",
"totalExposure": "850000000",
"availableCapacity": "7050000",
"utilizationRate": "29942780"
}
}

utilizationRate is 1e8-scaled (so 29942780 ≈ 29.9 %).

/v1/hedge/events/:chainId/:id/positions

Position IDs in the event.

{ "data": { "chainId": 8453, "eventId": 12, "positionIds": ["7", "8", "9"] } }

/v1/hedge/events/:chainId/:id/deposits

Deposit IDs in the event.

{ "data": { "chainId": 8453, "eventId": 12, "depositIds": ["3"] } }

/v1/hedge/events/:chainId/:id/payment-token

Payment token the event was created against.

/v1/hedge/events/:chainId/:id/quote-signer

Address of the pricing-engine signer the event was attested with (or zero address if self-priced).

/v1/hedge/events/:chainId/total

Total event count on the chain.

{ "data": { "chainId": 8453, "total": 47 } }

Positions

/v1/hedge/positions/:chainId/:id

{
"data": {
"id": 7,
"eventId": 12,
"hedger": "0xdead...",
"notional": "100000000",
"premiumPaid": "2300000",
"platformFeePaid": "500000",
"payoutAmount": "5420000",
"status": 2,
"claimed": false
}
}

/v1/hedge/positions/:chainId/wallet/:addr

Every position ID a wallet owns.

{ "data": { "chainId": 8453, "wallet": "0xdead...", "positionIds": ["7", "8"] } }

Deposits

/v1/hedge/deposits/:chainId/:id

{
"data": {
"id": 3, "eventId": 12,
"lp": "0xdead...",
"amount": "10000000",
"shares": "10000000",
"premiumsEarned": "950000",
"premiumsClaimed": "0",
"withdrawn": false
}
}

/v1/hedge/deposits/:chainId/:id/pending

Unclaimed premiums on a deposit. Useful for an LP-facing UI "claim X USDC" CTA.

/v1/hedge/deposits/:chainId/wallet/:addr

Every deposit ID a wallet owns.

Creators

/v1/hedge/creators/:chainId/wallet/:addr

Every event ID created by a wallet.

{ "data": { "chainId": 8453, "wallet": "0xcre...", "eventIds": ["12", "13"] } }

Quote payout (hypothetical)

/v1/hedge/quote-payout/:chainId/:id?hypoSettlement=&notional=

Asks the contract "if settlement landed at X and the hedger's notional was N, what would the payout be?" Useful for showing payout previews in a UI.

curl "https://api.blockfinax.com/v1/hedge/quote-payout/8453/12?hypoSettlement=11700000&notional=100000000"
{
"data": {
"chainId": 8453,
"eventId": 12,
"hypoSettlement": "11700000",
"notional": "100000000",
"payout": "2710000"
}
}

Protocol-level views

EndpointReturns
/v1/hedge/paused/:chainId{ paused: bool } — is the protocol paused?
/v1/hedge/fees-initialized/:chainId{ initialized: bool }
/v1/hedge/platform-fees/:chainIdaccumulated USDC platform fees
/v1/hedge/platform-fees/:chainId/by-token/:tokenaccumulated fees in a specific token
/v1/hedge/payment-tokens/:chainId/:token{ allowed: bool }
/v1/hedge/pricing-engine-signer/:chainIdactive pricing-engine signer address
/v1/hedge/quote-nonce-used/:chainId/:nonce{ used: bool } — has a nonce been consumed?

All wrap a single contract view 1-to-1. See the OpenAPI schema for the exact response shapes.