Module errors

Source

Enums§

MoveAbort

Constants§

BadIndexPrice
Index price returned from oracle is 0 or invalid value
CollateralIsNotRegistered
Collateral is not registered in the registry
DeallocateTargetMrTooLow
Cannot compute deallocate amount for a target MR < IMR.
DepositOrWithdrawAmountZero
Cannot deposit/withdraw zero coins to/from the account’s collateral.
DestroyNotEmpty
When attempting to destroy a non-empty map
EmptySession
Raised when trying to have a session composed by only start_session and end_session
FlagRequirementsViolated
Orderbook flag requirements violated
InitialMarginRequirementViolated
An operation brought an account below initial margin requirements.
InsufficientFreeCollateral
Cannot withdraw more than the account’s free collateral.
InsufficientInsuranceSurplus
Tried to withdraw more insurance funds than the allowed amount
InvalidAccountForStopOrder
Invalid account trying to perform an action on a StopOrderTicket
InvalidBasePriceFeedStorage
Invalid base price feed storage for the clearing house
InvalidCancelOrderIds
Passed a vector of invalid order ids to cancel
InvalidCollateralPriceFeedStorage
Invalid collateral price feed storage for the clearing house
InvalidExecutorForStopOrder
Invalid executor trying to execute the StopOrderTicket
InvalidForceCancelIds
Passed a vector of invalid order ids to perform force cancellation during liquidation
InvalidMapParameters
While creating ordered map with wrong parameters.
InvalidMarketParameters
While creating ordered map with invalid parameters, or changing them improperly for an existent map.
InvalidProposalDelay
Margin ratio update proposal delay is outside the valid range
InvalidSizeOrPrice
Orderbook size or price are invalid values
InvalidSubAccountUser
User trying to access the subaccount is not the one specified by parent
InvalidUserForOrder
Invalid user tries to modify an order
KeyAlreadyExists
While inserting already existing key.
KeyNotExist
While searching for a key, but it doesn’t exist.
LiquidateNotFirstOperation
Liquidate must be the first operation of the session, if performed.
MapTooSmall
When trying to change a map configuration, but the map has length less than 4
MarketAlreadyRegistered
Market already registered in the registry
MarketIsNotRegistered
Market is not registered in the registry
MaxOpenInterestPositionPercentSurpassed
Raised when a position’s would get a base amount higher than the allowed percentage of open interest
MaxOpenInterestSurpassed
Raised when the market’s max open interest is surpassed as a result of the session’s actions
MaxPendingOrdersExceeded
Tried placing a new pending order when the position already has the maximum allowed number of pending orders.
NegativeFeesAccrued
Fees accrued are negative
NoFeesAccrued
Exchange has no available fees to withdraw
NoPriceFeedForMarket
Cannot create a market for which a price feed does not exist
NotEnoughCollateralToAllocateForStopOrder
Stop order collateral to allocate provided is not enough
NotEnoughGasForStopOrder
Stop order gas cost provided is not enough
NotEnoughLiquidity
Minimum size matched not reached
NotReduceOnlyStopOrder
Reduce only conditions are not respected for stop order execution
OrderUsdValueTooLow
Order value in USD is too low
PositionAboveMMR
Position is above MMR, so can’t be liquidated.
PositionAboveTolerance
When leaving liqee’s position with a margin ratio above tolerance, meaning that liqor has overbought position
PositionAlreadyExists
Cannot have more than 1 position in a market.
PositionBadDebt
Cannot realize bad debt via means other than calling ‘liquidate’.
PositionBelowIMR
Used for checking both liqee and liqor positions during liquidation
PrematureProposal
Margin ratio update proposal cannot be commited too early
ProposalAlreadyExists
Margin ratio update proposal already exists for market
ProposalAlreadyMatured
Cannot delete a proposal that already matured. It can only be committed.
ProposalDoesNotExist
Margin ratio update proposal does not exist for market
SelfLiquidation
Same liquidator and liqee account ids
SelfTrading
When taker matches its own order
StopOrderConditionsViolated
Index price is not at correct value to satisfy stop order conditions
StopOrderTicketExpired
Ticket has already passed expire_timestamp and can only be cancelled
SubAccountContainsCollateral
Raised when trying to delete a subaccount still containing collateral.
UpdatingFundingTooEarly
Tried to call update_funding before enough time has passed since the last update.
WrongOrderDetails
Index price is not at correct value to satisfy stop order conditions
WrongParentForSubAccount
The parent Account trying to delete the subaccount is not the correct one.
WrongVersion
Raised when trying to call a function with the wrong package’s version