DeepBook v2
clob
- Move path
- 0x0000…dee9::clob
- Functions
- 2419 public, 0 entry
- Structs
- 9
- Friend modules
- None
Functions24
- public fun create_pool<T0, T1>(u64,u64,Coin<SUI>)
- public fun get_level2_book_status_ask_side<T0, T1>(&Pool<T0, T1>,u64,u64,&Clock): (vector<u64>, vector<u64>)
- public fun get_level2_book_status_bid_side<T0, T1>(&Pool<T0, T1>,u64,u64,&Clock): (vector<u64>, vector<u64>)
- public fun place_limit_order<T0, T1>(&mut Pool<T0, T1>,u64,u64,bool,u64,u8,&Clock,&custodian::AccountCap): (u64, u64, bool, u64)
- public fun place_market_order<T0, T1>(&mut Pool<T0, T1>,u64,bool,Coin<T0>,Coin<T1>,&Clock): (Coin<T0>, Coin<T1>)
- public fun swap_exact_base_for_quote<T0, T1>(&mut Pool<T0, T1>,u64,Coin<T0>,Coin<T1>,&Clock): (Coin<T0>, Coin<T1>, u64)
- public fun swap_exact_quote_for_base<T0, T1>(&mut Pool<T0, T1>,u64,&Clock,Coin<T1>): (Coin<T0>, Coin<T1>, u64)
Structs9
key is an object with an id. store can be kept inside other objects. copy can be duplicated. drop can be thrown away.
- Orderdropstore
order_id u64 price u64 quantity u64 is_bid bool owner ID expire_timestamp u64 - OrderCanceled<phantom T0, phantom T1>copydropstore
pool_id ID order_id u64 is_bid bool owner ID base_asset_quantity_canceled u64 price u64 - OrderFilled<phantom T0, phantom T1>copydropstore
pool_id ID order_id u64 is_bid bool owner ID total_quantity u64 base_asset_quantity_filled u64 base_asset_quantity_remaining u64 price u64 - OrderFilledV2<phantom T0, phantom T1>copydropstore
pool_id ID order_id u64 is_bid bool owner ID total_quantity u64 base_asset_quantity_filled u64 base_asset_quantity_remaining u64 price u64 taker_commission u64 maker_rebates u64 - OrderPlaced<phantom T0, phantom T1>copydropstore
pool_id ID order_id u64 is_bid bool owner ID base_asset_quantity_placed u64 price u64 - OrderPlacedV2<phantom T0, phantom T1>copydropstore
pool_id ID order_id u64 is_bid bool owner ID base_asset_quantity_placed u64 price u64 expire_timestamp u64 id UID bids critbit::CritbitTree<TickLevel> asks critbit::CritbitTree<TickLevel> next_bid_order_id u64 next_ask_order_id u64 usr_open_orders Table<ID, LinkedTable<u64, u64>> taker_fee_rate u64 maker_rebate_rate u64 tick_size u64 lot_size u64 base_custodian custodian::Custodian<T0> quote_custodian custodian::Custodian<T1> creation_fee Balance<SUI> base_asset_trading_fees Balance<T0> quote_asset_trading_fees Balance<T1> - PoolCreatedcopydropstore
pool_id ID base_asset TypeName quote_asset TypeName taker_fee_rate u64 maker_rebate_rate u64 tick_size u64 lot_size u64 - TickLevelstore
price u64 open_orders LinkedTable<u64, Order>
Constants8
Constants are shown the way the code loads them. Bytecode does not keep their names.
| Slot | Value | Type | Use | Used in |
|---|---|---|---|---|
| 0 | 0 | u64 | Abort code | create_accountcreate_pool |
| 1 | 3 | u64 | Abort code | cancel_orderremove_orderbatch_cancel_orderget_order_status |
| 2 | 4 | u64 | Abort code | remove_order |
| 3 | 6 | u64 | Abort code | withdraw_basewithdraw_quote |
| 4 | 11 | u64 | Abort code | batch_cancel_order |
| 5 | 12 | u64 | Abort code | cancel_ordercancel_all_ordersget_order_status |
| 6 | 9223372036854775808 | u64 | Value | order_is_bidget_order_status |
| 7 | 00 | vector<u64> | Value | get_level2_book_status_bid_sideget_level2_book_status_ask_side |