Documentation Index
Fetch the complete documentation index at: https://docs.hadron.fi/llms.txt
Use this file to discover all available pages before exploring further.
refetchStates
Re-fetches all on-chain accounts (config, oracle, curve metadata, prefabs) in parallel and updates the instance in-place. Best to run first to get the latest pool data.getMidprice
Current midprice decoded from the on-chain Q32 oracle value.number
getSpreadFactor
Current base-spread factor decoded from the on-chain Q32 oracle value. A factor of 0.9995 means 5 bps of spread.number
getActiveCurveSlots
Returns the slot index for each active curve.{ priceBid: number, priceAsk: number, riskBid: number, riskAsk: number }
getActiveCurves
Decodes and returns all four active curves from the appropriate prefab data.{ priceBid: CurveSide, priceAsk: CurveSide, riskBid: CurveSide, riskAsk: CurveSide }
EachCurveSidecontains:
| Field | Type | Description |
|---|---|---|
numPoints | number | Number of curve points |
defaultInterpolation | Interpolation | Default interpolation mode |
xMode | CurveXMode | X-axis mode (Native or Alternate) |
riskMode | RiskMode | Virtual or Integrated |
points | CurvePoint[] | The curve point array |
getCurveSlot
Decode a specific curve slot by type and index.CurveSide
| Param | Type | Description |
|---|---|---|
curveType | CurveType | One of PriceBid, PriceAsk, RiskBid, RiskAsk |
slot | number | Slot index |
.png?fit=max&auto=format&n=pH37fL0GL14scVCH&q=85&s=5749b485c8c5b2386a4cca404e97d6be)