Enums§
Constants§
- ADLBad
Debt Position NotClosed - Raised when adl does not fully close the bad debt position
- ADLCounterparties
Mismatch - Raised when adl counterparties vec lengths differ
- ADLCounterparty
Insufficient - Raised when adl counterparty cannot reduce its assigned portion of base
- ADLWeights
DoNot SumTo One - Raised when weights for adl do not sum to fixed point 1
- BadDebt
Above Threshold - Bad debt amount is greater than max allowed threshold
- BadIndex
Price - Index price returned from oracle is 0 or invalid value
- Collateral
IsNot Registered - Collateral is not registered in the registry
- Deallocate
Target MrToo Low - Cannot compute deallocate amount for a target MR < IMR.
- Deposit
OrWithdraw Amount Zero - Cannot deposit/withdraw zero coins to/from the account’s collateral.
- Destroy
NotEmpty - When attempting to destroy a non-empty map
- Empty
Session - Raised when trying to have a session composed by only
start_sessionandend_session - Flag
Requirements Violated - Orderbook flag requirements violated
- Initial
Margin Requirement Violated - An operation brought an account below initial margin requirements.
- Insufficient
Free Collateral - Cannot withdraw more than the account’s free collateral.
- Insufficient
Insurance Surplus - Tried to withdraw more insurance funds than the allowed amount
- Integrator
Vault Already Exists - Raised when trying to create an integrator vault for an address that already has one
- Integrator
Vault Does NotExist - Raised when trying to access an integrator vault that does not exist
- Invalid
Account Cap - User trying to access the account used the wrong account cap
- Invalid
Account ForStop Order - Invalid account trying to perform an action on a StopOrderTicket
- Invalid
Base Price Feed Storage - Invalid base price feed storage for the clearing house
- Invalid
Cancel Order Ids - Passed a vector of invalid order ids to cancel
- Invalid
Collateral Price Feed Storage - Invalid collateral price feed storage for the clearing house
- Invalid
Executor ForStop Order - Invalid executor trying to execute the StopOrderTicket
- Invalid
Expiration Timestamp - Passed a timestamp older than current Clock’s one
- Invalid
Force Cancel Ids - Passed a vector of invalid order ids to perform force cancellation during liquidation
- Invalid
Integrator Taker Fee - Raised when passing an integrator taker fee that is greater than
the
max_integrator_taker_feeset by the user in its account - Invalid
MapParameters - While creating ordered map with wrong parameters.
- Invalid
Market Parameters - While creating ordered map with invalid parameters, or changing them improperly for an existent map.
- Invalid
Position ForSLTP - Invalid position’ status for placing a SLTP order
- Invalid
PositionIMR - Raised when trying to set a position’s IMR lower than market’s IMR or higher than 1
- Invalid
Price - Price is either 0 or greater than 0x8000_0000_0000_0000
- Invalid
Proposal Delay - Margin ratio update proposal delay is outside the valid range
- Invalid
Stop Order Type - Invalid stop order type
- Invalid
User ForOrder - Invalid user tries to modify an order
- KeyAlready
Exists - While inserting already existing key.
- KeyNot
Exist - While searching for a key, but it doesn’t exist.
- Liquidate
NotFirst Operation - Liquidate must be the first operation of the session, if performed.
- MapToo
Small - When trying to change a map configuration, but the map has length less than 4
- Market
Already Registered - Market already registered in the registry
- Market
IsClosed - Raised when Admin tries to resume a closed market
- Market
IsNot Closed - Raised when trying to call
close_position_at_settlement_priceswhile beforeclose_markethas been called by admin - Market
IsNot Paused - Raised when trying to call
close_position_at_settlement_priceswhile the market is not paused - Market
IsNot Registered - Market is not registered in the registry
- Market
IsPaused - Raised when an operation is performed while the market is paused
- MaxOpen
Interest Position Percent Surpassed - Raised when a position’s would get a base amount higher than the allowed percentage of open interest
- MaxOpen
Interest Surpassed - Raised when the market’s max open interest is surpassed as a result of the session’s actions
- MaxPending
Orders Exceeded - Tried placing a new pending order when the position already has the maximum allowed number of pending orders.
- Negative
Fees Accrued - Fees accrued are negative
- NoFees
Accrued - Exchange has no available fees to withdraw
- NoOpen
Interest ToSocialize BadDebt - Open interest is 0 when trying to socialize bad debt
- NoPrice
Feed ForMarket - Cannot create a market for which a price feed does not exist
- NotEnough
Collateral ToAllocate ForSession - Raised processing a session that requires a collateral allocation, but not enough collateral is available in the account
- NotEnough
GasFor Stop Order - Stop order gas cost provided is not enough
- NotEnough
Liquidity - Minimum size matched not reached
- Order
UsdValue TooLow - Order value in USD is too low
- Position
AboveMMR - Position is above MMR, so can’t be liquidated.
- Position
Above Tolerance - When leaving liqee’s position with a margin ratio above tolerance, meaning that liqor has overbought position
- Position
Already Exists - Cannot have more than 1 position in a market.
- Position
BadDebt - Cannot realize bad debt via means other than calling ‘liquidate’.
- Position
BelowIMR - Used for checking both liqee and liqor positions during liquidation
- Premature
Proposal - Margin ratio update proposal cannot be commited too early
- Price
NotMultiple OfTick Size - Raised when trying to place an order passing a
pricethat is not a multiple of market’s tick size - Proposal
Already Exists - Margin ratio update proposal already exists for market
- Proposal
Already Matured - Cannot delete a proposal that already matured. It can only be committed.
- Proposal
Does NotExist - Margin ratio update proposal does not exist for market
- Self
Liquidation - Same liquidator and liqee account ids
- Size
NotMultiple OfLot Size - Raised when trying to place an order passing a
sizethat is not a multiple of market’s lot size - Size
OrPosition Zero - Size to place is 0. Raised also when there is no open position and
an order with
reduce_onlyis passed. - Stop
Order Conditions Violated - Index price is not at correct value to satisfy stop order conditions
- Stop
Order Ticket Expired - Ticket has already passed
expire_timestampand can only be cancelled - TooMany
Assistants PerAccount - When trying to create another
AccountCap<ASSISTANT>for anAccountthat already hasconstants::MAX_ASSISTANTS_PER_ACCOUNTactive assistants. - Updating
Funding TooEarly - Tried to call
update_fundingbefore enough time has passed since the last update. - Wrong
Account IdFor Allocation - Raised processing a session that requires a collateral allocation and a wrong account is being used to fund it
- Wrong
Order Details - Index price is not at correct value to satisfy stop order conditions
- Wrong
Version - Raised when trying to call a function with the wrong package’s version