Errors
Every error the Hwal program can return. Use these names when handling reverts in client code; Anchor decodes them by index.
| Code | Meaning |
|---|---|
FeeBpsTooHigh | fee_bps exceeds the maximum of 500 (5%) |
KeeperRewardTooHigh | keeper_reward_bps exceeds the maximum of 200 (2%) |
NotAdmin | caller is not the configured admin |
NotPositionOwner | caller is not the position owner |
NotFeedAuthority | caller is not the price feed authority |
InvalidSide | side must be 0 (long) or 1 (short) |
CollateralTooSmall | collateral is below the minimum of 1_000_000 lamports |
PositionNotOpen | position is not in STATUS_OPEN |
PriceFeedStale | feed last_updated is older than 120 seconds |
PriceFeedZero | feed price is zero |
InvalidStopPrice | stop_price is on the wrong side of entry for this side |
InvalidTakeProfitPrice | take_profit_price is on the wrong side of entry for this side |
InvalidTrailingOffset | trailing_offset is greater than or equal to entry_price |
MathOverflow | u64 arithmetic overflow during settlement math |
TrailingUnderflow | trailing extreme underflow on long trail evaluation |
InsufficientVaultLamports | position vault does not have enough lamports to settle |
InvalidVault | position vault PDA does not match the expected derivation |
NoTriggerHit | tick succeeded but no trigger condition was met (informational) |
FeedMismatch | the feed account passed does not match position.feed |