Skip to main content

Trading & Validation Errors (350–379)

These errors occur during trade execution, trigger validation, escrow checks, and final settlement validation.


Error Table

CodeNameMessageCauseSolution
350MissingAssetAccountMissing asset accountRequired asset account missingProvide required asset accounts
351EscrowAccountUnderwaterEscrow account underwaterEscrow balance negativeAdd funds to escrow
352TradingNotAllowedTrading not allowedTrading disabledVerify permissions
353InvalidPNLCalculationInvalid PNL calculationPNL computation errorReport calculation issue
354NothingToLiquidateNothing to liquidatePosition healthyCannot liquidate
355InvalidOrderIdInvalid order IDID format invalidUse valid u64 ID
356InvalidDirectionInvalid directionNot 0 (LONG) or 1 (SHORT)Use valid direction
357InvalidTriggerTypeInvalid trigger typeTrigger type unknownUse supported type
358InvalidTriggerPricesInvalid trigger pricesStop/take prices invalidSet valid trigger levels
359InvalidLimitPriceInvalid limit pricePrice zero or unreasonableUse positive limit price
360TriggerNotMetTrigger not metMarket not reached levelWait for trigger
361TradingPausedTrading pausedConfig.isPaused = trueWait for unpause
362TransactionExpiredTransaction expiredgoodTill passedIncrease expiry
363InsufficientRewardInsufficient rewardReward too lowIncrease reward gas
364InvalidUserAccountInvalid user accountAccount uninitializedInitialize user account

Characteristics

  • Triggered during final trade validation
  • Enforce trigger correctness
  • Validate direction and order identifiers
  • Protect escrow solvency
  • Enforce pause and expiry logic