Skip to main content

Module errors

Module errors 

Source

Enums§

MoveAbort

Constants§

ADLBadDebtPositionNotClosed
Raised when adl does not fully close the bad debt position
ADLCounterpartiesMismatch
Raised when adl counterparties vec lengths differ
ADLCounterpartyInsufficient
Raised when adl counterparty cannot reduce its assigned portion of base
ADLWeightsDoNotSumToOne
Raised when weights for adl do not sum to fixed point 1
BadDebtAboveThreshold
Bad debt amount is greater than max allowed threshold
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
IntegratorVaultAlreadyExists
Raised when trying to create an integrator vault for an address that already has one
IntegratorVaultDoesNotExist
Raised when trying to access an integrator vault that does not exist
InvalidAccountCap
User trying to access the account used the wrong account cap
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
InvalidExpirationTimestamp
Passed a timestamp older than current Clock’s one
InvalidForceCancelIds
Passed a vector of invalid order ids to perform force cancellation during liquidation
InvalidIntegratorTakerFee
Raised when passing an integrator taker fee that is greater than the max_integrator_taker_fee set by the user in its account
InvalidMapParameters
While creating ordered map with wrong parameters.
InvalidMarketParameters
While creating ordered map with invalid parameters, or changing them improperly for an existent map.
InvalidPositionForSLTP
Invalid position’ status for placing a SLTP order
InvalidPositionIMR
Raised when trying to set a position’s IMR lower than market’s IMR or higher than 1
InvalidPrice
Price is either 0 or greater than 0x8000_0000_0000_0000
InvalidProposalDelay
Margin ratio update proposal delay is outside the valid range
InvalidStopOrderType
Invalid stop order type
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
MarketIsClosed
Raised when Admin tries to resume a closed market
MarketIsNotClosed
Raised when trying to call close_position_at_settlement_prices while before close_market has been called by admin
MarketIsNotPaused
Raised when trying to call close_position_at_settlement_prices while the market is not paused
MarketIsNotRegistered
Market is not registered in the registry
MarketIsPaused
Raised when an operation is performed while the market is paused
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
NoOpenInterestToSocializeBadDebt
Open interest is 0 when trying to socialize bad debt
NoPriceFeedForMarket
Cannot create a market for which a price feed does not exist
NotEnoughCollateralToAllocateForSession
Raised processing a session that requires a collateral allocation, but not enough collateral is available in the account
NotEnoughGasForStopOrder
Stop order gas cost provided is not enough
NotEnoughLiquidity
Minimum size matched not reached
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
PriceNotMultipleOfTickSize
Raised when trying to place an order passing a price that is not a multiple of market’s tick size
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
SizeNotMultipleOfLotSize
Raised when trying to place an order passing a size that is not a multiple of market’s lot size
SizeOrPositionZero
Size to place is 0. Raised also when there is no open position and an order with reduce_only is passed.
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
TooManyAssistantsPerAccount
When trying to create another AccountCap<ASSISTANT> for an Account that already has constants::MAX_ASSISTANTS_PER_ACCOUNT active assistants.
UpdatingFundingTooEarly
Tried to call update_funding before enough time has passed since the last update.
WrongAccountIdForAllocation
Raised processing a session that requires a collateral allocation and a wrong account is being used to fund it
WrongOrderDetails
Index price is not at correct value to satisfy stop order conditions
WrongVersion
Raised when trying to call a function with the wrong package’s version