subscan
Runtime Modules / OrderBook
Spec Version:
Events
Name
Lookup
Attributes
OrderCreated6c00["OrderIdNonce","AccountId","AssetCurrencyId","AssetCurrencyId","Balance","Balance","SellRatio"]
OrderCancelled6c01["AccountId","OrderIdNonce"]
OrderUpdated6c02["OrderIdNonce","AccountId","Balance","SellRatio","Balance"]
OrderFulfillment6c03["OrderIdNonce","AccountId","AccountId","bool","Balance","AssetCurrencyId","AssetCurrencyId","SellRatio"]
TradingPairAdded6c04["AssetCurrencyId","AssetCurrencyId","Balance"]
TradingPairRemoved6c05["AssetCurrencyId","AssetCurrencyId"]
MinOrderUpdated6c06["AssetCurrencyId","AssetCurrencyId","Balance"]
Storage Functions
Name
Type
Orders{"origin":"Map","n_map_type":{"hashers":["Twox64Concat"],"key_vec":["U64"],"value":"pallet_order_book:pallet:Order","keys_id":10,"value_id":676}}
UserOrders{"origin":"Map","n_map_type":{"hashers":["Twox64Concat","Twox64Concat"],"key_vec":["AccountId","U64"],"value":"pallet_order_book:pallet:Order","keys_id":677,"value_id":676}}
OrderIdNonceStore{"origin":"PlainType","plain_type":"U64","PlainTypeValue":10}
AssetPairOrders{"origin":"Map","n_map_type":{"hashers":["Twox64Concat","Twox64Concat"],"key_vec":["cfg_types:tokens:CurrencyId","cfg_types:tokens:CurrencyId"],"value":"Vec<U64>","keys_id":678,"value_id":679}}
TradingPair{"origin":"Map","n_map_type":{"hashers":["Twox64Concat","Twox64Concat"],"key_vec":["cfg_types:tokens:CurrencyId","cfg_types:tokens:CurrencyId"],"value":"U128","keys_id":678,"value_id":6}}
Constants
Name
Type
Value
OrderPairVecSizeU32e8030000
MinFulfillmentAmountNativeU1280000e8890423c78a0000000000000000
Error Types
Name
Docs
AssetPairOrdersOverflowError when the number of orders for a trading pair has exceeded theBoundedVec size for the order pair for the currency pair inquestion.
ConflictingAssetIdsError when order is placed attempting to exchange assets of the sametype.
InvalidBuyAmountError when an account cannot reserve or transfer the amountcurrently `0`.
InvalidMinimumFulfillmentError when min order amount is invalid, currently `0`
InsufficientAssetFundsError when an account specifies an invalid buy price -- currentlyspecified for trade, or amount to be fulfilled.
InvalidMaxPriceError when Max price ratio is invalid
InsufficientOrderSizeError when an order amount is too small
InvalidAssetIdError when an order is placed with a currency that is not in theasset registry.
InvalidTradingPairError when a trade is using an invalid trading pair.Currently can happen when there is not a minimum order sizedefined for the trading pair.
OrderNotFoundError when an operation is attempted on an order id that is not instorage.
UnauthorisedError when a user attempts an action on an order they are notauthorised to perform, such as cancelling another accounts order.
BalanceConversionErrError when unable to convert fee balance to asset balance when assetout matches fee currency
BuyAmountTooLargeError when the provided partial buy amount is too large.