HwalDOCS

Errors

Every error the Hwal program can return. Use these names when handling reverts in client code; Anchor decodes them by index.

CodeMeaning
FeeBpsTooHighfee_bps exceeds the maximum of 500 (5%)
KeeperRewardTooHighkeeper_reward_bps exceeds the maximum of 200 (2%)
NotAdmincaller is not the configured admin
NotPositionOwnercaller is not the position owner
NotFeedAuthoritycaller is not the price feed authority
InvalidSideside must be 0 (long) or 1 (short)
CollateralTooSmallcollateral is below the minimum of 1_000_000 lamports
PositionNotOpenposition is not in STATUS_OPEN
PriceFeedStalefeed last_updated is older than 120 seconds
PriceFeedZerofeed price is zero
InvalidStopPricestop_price is on the wrong side of entry for this side
InvalidTakeProfitPricetake_profit_price is on the wrong side of entry for this side
InvalidTrailingOffsettrailing_offset is greater than or equal to entry_price
MathOverflowu64 arithmetic overflow during settlement math
TrailingUnderflowtrailing extreme underflow on long trail evaluation
InsufficientVaultLamportsposition vault does not have enough lamports to settle
InvalidVaultposition vault PDA does not match the expected derivation
NoTriggerHittick succeeded but no trigger condition was met (informational)
FeedMismatchthe feed account passed does not match position.feed