SORA
subscan
Runtime Modules / OrderBook
Spec Version:
Events
Name
Lookup
Attributes
OrderBookCreated3900["OrderBookId<AssetIdOf, DEXId>","Option<AccountId>"]
OrderBookDeleted3901["OrderBookId<AssetIdOf, DEXId>"]
OrderBookStatusChanged3902["OrderBookId<AssetIdOf, DEXId>","OrderBookStatus"]
OrderBookUpdated3903["OrderBookId<AssetIdOf, DEXId>"]
LimitOrderPlaced3904["OrderBookId<AssetIdOf, DEXId>","OrderId","AccountId","PriceVariant","OrderPrice","OrderVolume","MomentOf"]
LimitOrderConvertedToMarketOrder3905["OrderBookId<AssetIdOf, DEXId>","AccountId","PriceVariant","OrderAmount","OrderPrice"]
LimitOrderIsSplitIntoMarketOrderAndLimitOrder3906["OrderBookId<AssetIdOf, DEXId>","AccountId","PriceVariant","OrderAmount","OrderPrice","OrderId"]
LimitOrderCanceled3907["OrderBookId<AssetIdOf, DEXId>","OrderId","AccountId","CancelReason"]
LimitOrderExecuted3908["OrderBookId<AssetIdOf, DEXId>","OrderId","AccountId","PriceVariant","OrderPrice","OrderAmount"]
LimitOrderFilled3909["OrderBookId<AssetIdOf, DEXId>","OrderId","AccountId"]
LimitOrderUpdated390a["OrderBookId<AssetIdOf, DEXId>","OrderId","AccountId","OrderVolume"]
MarketOrderExecuted390b["OrderBookId<AssetIdOf, DEXId>","AccountId","PriceVariant","OrderAmount","OrderPrice","Option<AccountId>"]
ExpirationFailure390c["OrderBookId<AssetIdOf, DEXId>","OrderId","DispatchError"]
AlignmentFailure390d["OrderBookId<AssetIdOf, DEXId>","DispatchError"]
Storage Functions
Name
Type
OrderBooks{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId"],"value":"order_book:order_book:OrderBook","keys_id":152,"value_id":787}}
LimitOrders{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId","U128"],"value":"order_book:limit_order:LimitOrder","keys_id":789,"value_id":790}}
Bids{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId","common:balance_unit:BalanceUnit"],"value":"Vec<U128>","keys_id":791,"value_id":792}}
Asks{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId","common:balance_unit:BalanceUnit"],"value":"Vec<U128>","keys_id":791,"value_id":792}}
AggregatedBids{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId"],"value":"Vec<Tuple:common:balance_unit:BalanceUnitcommon:balance_unit:BalanceUnit>","keys_id":152,"value_id":793}}
AggregatedAsks{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId"],"value":"Vec<Tuple:common:balance_unit:BalanceUnitcommon:balance_unit:BalanceUnit>","keys_id":152,"value_id":793}}
UserLimitOrders{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["AccountId","order_book:types:OrderBookId"],"value":"Vec<U128>","keys_id":797,"value_id":792}}
ExpirationsAgenda{"origin":"Map","n_map_type":{"hashers":["Identity"],"key_vec":["U32"],"value":"Vec<Tuple:order_book:types:OrderBookIdU128>","keys_id":4,"value_id":798}}
AlignmentCursor{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["order_book:types:OrderBookId"],"value":"U128","keys_id":152,"value_id":6}}
IncompleteExpirationsSince{"origin":"PlainType","plain_type":"U32","PlainTypeValue":4}
Error Types
Name
Docs
UnknownOrderBookOrder book does not exist for this trading pair
InvalidOrderBookIdInvalid order book id
OrderBookAlreadyExistsOrder book already exists for this trading pair
UnknownLimitOrderLimit order does not exist for this trading pair and order id
LimitOrderAlreadyExistsLimit order already exists for this trading pair and order id
LimitOrderStorageOverflowIt is impossible to insert the limit order because the bounds have been reached
UpdateLimitOrderErrorIt is impossible to update the limit order
DeleteLimitOrderErrorIt is impossible to delete the limit order
BlockScheduleFullExpiration schedule for expiration block is full
ExpirationNotFoundCould not find expiration in given block schedule
NoDataForPriceThere are no bids/asks for the price
NoAggregatedDataThere are no aggregated bids/asks for the order book
NotEnoughLiquidityInOrderBookThere is not enough liquidity in the order book to cover the deal
ForbiddenToCreateOrderBookWithSameAssetsCannot create order book with equal base and target assets
NotAllowedQuoteAssetThe asset is not allowed to be quote. Only the dex base asset can be a quote asset for order book
NotAllowedDEXIdOrderbooks cannot be created with given dex id.
SyntheticAssetIsForbiddenSynthetic assets are forbidden for order book.
UserHasNoNftUser cannot create an order book with NFT if they don't have NFT
InvalidLifespanLifespan exceeds defined limits
InvalidOrderAmountThe order amount (limit or market) does not meet the requirements
InvalidLimitOrderPriceThe limit order price does not meet the requirements
LimitOrderPriceIsTooFarFromSpreadUser cannot set the price of limit order too far from actual market price
TradingIsForbiddenAt the moment, Trading is forbidden in the current order book
PlacementOfLimitOrdersIsForbiddenAt the moment, Users cannot place new limit orders in the current order book
CancellationOfLimitOrdersIsForbiddenAt the moment, Users cannot cancel their limit orders in the current order book
UserHasMaxCountOfOpenedOrdersUser has the max available count of open limit orders in the current order book
PriceReachedMaxCountOfLimitOrdersIt is impossible to place the limit order because bounds of the max count of orders at the current price have been reached
OrderBookReachedMaxCountOfPricesForSideIt is impossible to place the limit order because bounds of the max count of prices for the side have been reached
AmountCalculationFailedAn error occurred while calculating the amount
PriceCalculationFailedAn error occurred while calculating the price
UnauthorizedUnauthorized action
InvalidAssetInvalid asset
InvalidTickSizeInvalid tick size
InvalidStepLotSizeInvalid step lot size
InvalidMinLotSizeInvalid min lot size
InvalidMaxLotSizeInvalid max lot size
TickSizeAndStepLotSizeAreTooBigTick size & step lot size are too big and their multiplication overflows Balance
TickSizeAndStepLotSizeLosePrecisionProduct of tick and step lot sizes goes out of precision. It must be accurately represented by fixed-precision float to prevent rounding errors. I.e. the product should not have more than 18 digits after the comma.
MaxLotSizeIsMoreThanTotalSupplyMax lot size cannot be more that total supply of base asset
SlippageLimitExceededIndicated limit for slippage has not been met during transaction execution.
MarketOrdersAllowedOnlyForIndivisibleAssetsMarket orders are allowed only for indivisible assets
ForbiddenStatusToDeleteOrderBookIt is possible to delete an order-book only with the statuses: OnlyCancel or Stop
OrderBookIsNotEmptyIt is possible to delete only empty order-book
ForbiddenStatusToUpdateOrderBookIt is possible to update an order-book only with the statuses: OnlyCancel or Stop
OrderBookIsLockedOrder Book is locked for technical maintenance. Try again later.