Module deepbook::clob_v2
- Struct
PoolCreated
- Struct
OrderPlaced
- Struct
OrderCanceled
- Struct
AllOrdersCanceledComponent
- Struct
AllOrdersCanceled
- Struct
OrderFilled
- Struct
DepositAsset
- Struct
WithdrawAsset
- Struct
MatchedOrderMetadata
- Struct
Order
- Struct
TickLevel
- Struct
Pool
- Struct
PoolOwnerCap
- Constants
- Function
usr_open_orders_exist
- Function
usr_open_orders_for_address
- Function
usr_open_orders
- Function
withdraw_fees
- Function
delete_pool_owner_cap
- Function
destroy_empty_level
- Function
create_account
- Function
create_pool
- Function
create_customized_pool
- Function
create_pool_with_return
- Function
create_customized_pool_with_return
- Function
create_customized_pool_v2
- Function
deposit_base
- Function
deposit_quote
- Function
withdraw_base
- Function
withdraw_quote
- Function
swap_exact_base_for_quote
- Function
swap_exact_base_for_quote_with_metadata
- Function
swap_exact_quote_for_base
- Function
swap_exact_quote_for_base_with_metadata
- Function
place_market_order
- Function
place_market_order_with_metadata
- Function
place_limit_order
- Function
place_limit_order_with_metadata
- Function
order_is_bid
- Function
emit_order_canceled
- Function
cancel_order
- Function
remove_order
- Function
cancel_all_orders
- Function
batch_cancel_order
- Function
clean_up_expired_orders
- Function
list_open_orders
- Function
account_balance
- Function
get_market_price
- Function
get_level2_book_status_bid_side
- Function
get_level2_book_status_ask_side
- Function
get_level2_book_status
- Function
get_order_status
- Function
matched_order_metadata_info
- Function
asks
- Function
bids
- Function
tick_size
- Function
maker_rebate_rate
- Function
taker_fee_rate
- Function
pool_size
- Function
open_orders
- Function
order_id
- Function
tick_level
- Function
original_quantity
- Function
quantity
- Function
is_bid
- Function
owner
- Function
expire_timestamp
- Function
quote_asset_trading_fees_value
- Function
clone_order
use deepbook::critbit;
use deepbook::custodian_v2;
use deepbook::math;
use std::address;
use std::ascii;
use std::bcs;
use std::option;
use std::string;
use std::type_name;
use std::vector;
use sui::address;
use sui::bag;
use sui::balance;
use sui::clock;
use sui::coin;
use sui::config;
use sui::deny_list;
use sui::dynamic_field;
use sui::dynamic_object_field;
use sui::event;
use sui::hex;
use sui::linked_table;
use sui::object;
use sui::sui;
use sui::table;
use sui::transfer;
use sui::tx_context;
use sui::types;
use sui::url;
use sui::vec_set;
Struct PoolCreated
Emitted when a new pool is created
public struct PoolCreated has copy, drop, store
Fields
Struct OrderPlaced
Emitted when a maker order is injected into the order book.
public struct OrderPlaced<phantom BaseAsset, phantom QuoteAsset> has copy, drop, store
Fields
Struct OrderCanceled
Emitted when a maker order is canceled.
public struct OrderCanceled<phantom BaseAsset, phantom QuoteAsset> has copy, drop, store
Fields
Struct AllOrdersCanceledComponent
A struct to make all orders canceled a more efficient struct
public struct AllOrdersCanceledComponent<phantom BaseAsset, phantom QuoteAsset> has copy, drop, store
Fields
Struct AllOrdersCanceled
Emitted when batch of orders are canceled.
public struct AllOrdersCanceled<phantom BaseAsset, phantom QuoteAsset> has copy, drop, store
Fields
Struct OrderFilled
Emitted only when a maker order is filled.
public struct OrderFilled<phantom BaseAsset, phantom QuoteAsset> has copy, drop, store
Fields
Struct DepositAsset
Emitted when user deposit asset to custodian
public struct DepositAsset<phantom Asset> has copy, drop, store
Fields
Struct WithdrawAsset
Emitted when user withdraw asset from custodian
public struct WithdrawAsset<phantom Asset> has copy, drop, store
Fields
Struct MatchedOrderMetadata
Returned as metadata only when a maker order is filled from place order functions.
public struct MatchedOrderMetadata<phantom BaseAsset, phantom QuoteAsset> has copy, drop, store
Fields
Struct Order
public struct Order has drop, store
Fields
Struct TickLevel
public struct TickLevel has store
Fields
Struct Pool
public struct Pool<phantom BaseAsset, phantom QuoteAsset> has key, store
Fields
Struct PoolOwnerCap
Capability granting permission to access an entry in Pool.quote_asset_trading_fees. The pool objects created for older pools do not have a PoolOwnerCap because they were created prior to the addition of this feature. Here is a list of 11 pools on mainnet that do not have this capability: 0x31d1790e617eef7f516555124155b28d663e5c600317c769a75ee6336a54c07f 0x6e417ee1c12ad5f2600a66bc80c7bd52ff3cb7c072d508700d17cf1325324527 0x17625f1a241d34d2da0dc113086f67a2b832e3e8cd8006887c195cd24d3598a3 0x276ff4d99ecb3175091ba4baffa9b07590f84e2344e3f16e95d30d2c1678b84c 0xd1f0a9baacc1864ab19534e2d4c5d6c14f2e071a1f075e8e7f9d51f2c17dc238 0x4405b50d791fd3346754e8171aaab6bc2ed26c2c46efdd033c14b30ae507ac33 0xf0f663cf87f1eb124da2fc9be813e0ce262146f3df60bc2052d738eb41a25899 0xd9e45ab5440d61cc52e3b2bd915cdd643146f7593d587c715bc7bfa48311d826 0x5deafda22b6b86127ea4299503362638bea0ca33bb212ea3a67b029356b8b955 0x7f526b1263c4b91b43c9e646419b5696f424de28dda3c1e6658cc0a54558baa7 0x18d871e3c3da99046dfc0d3de612c5d88859bc03b8f0568bd127d0e70dbc58be
public struct PoolOwnerCap has key, store
Fields
Constants
const EIncorrectPoolOwner: u64 = 1;
const EInvalidExpireTimestamp: u64 = 19;
const EInvalidOrderId: u64 = 3;
const EInvalidQuantity: u64 = 6;
const EInvalidTickPrice: u64 = 11;
const EInvalidUser: u64 = 12;
const ENotEqual: u64 = 13;
const EUnauthorizedCancel: u64 = 4;
const MIN_ASK_ORDER_ID: u64 = 9223372036854775808;
Function usr_open_orders_exist
Accessor functions
public fun usr_open_orders_exist<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, owner: address): bool
Implementation
Function usr_open_orders_for_address
public fun usr_open_orders_for_address<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, owner: address): &sui::linked_table::LinkedTable<u64, u64>
Implementation
Function usr_open_orders
public fun usr_open_orders<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): &sui::table::Table<address, sui::linked_table::LinkedTable<u64, u64>>
Implementation
Function withdraw_fees
Function to withdraw fees created from a pool
public fun withdraw_fees<BaseAsset, QuoteAsset>(pool_owner_cap: &deepbook::clob_v2::PoolOwnerCap, pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, ctx: &mut sui::tx_context::TxContext): sui::coin::Coin<QuoteAsset>
Implementation
Function delete_pool_owner_cap
Destroy the given pool_owner_cap object
public fun delete_pool_owner_cap(pool_owner_cap: deepbook::clob_v2::PoolOwnerCap)
Implementation
Function destroy_empty_level
fun destroy_empty_level(level: deepbook::clob_v2::TickLevel)
Implementation
Function create_account
public fun create_account(_ctx: &mut sui::tx_context::TxContext): deepbook::custodian_v2::AccountCap
Implementation
Function create_pool
public fun create_pool<BaseAsset, QuoteAsset>(_tick_size: u64, _lot_size: u64, _creation_fee: sui::coin::Coin<sui::sui::SUI>, _ctx: &mut sui::tx_context::TxContext)
Implementation
Function create_customized_pool
Function for creating pool with customized taker fee rate and maker rebate rate. The taker_fee_rate should be greater than or equal to the maker_rebate_rate, and both should have a scaling of 10^9. Taker_fee_rate of 0.25% should be 2_500_000 for example
public fun create_customized_pool<BaseAsset, QuoteAsset>(_tick_size: u64, _lot_size: u64, _taker_fee_rate: u64, _maker_rebate_rate: u64, _creation_fee: sui::coin::Coin<sui::sui::SUI>, _ctx: &mut sui::tx_context::TxContext)
Implementation
Function create_pool_with_return
Function for creating an external pool. This API can be used to wrap deepbook pools into other objects.
public fun create_pool_with_return<BaseAsset, QuoteAsset>(_tick_size: u64, _lot_size: u64, _creation_fee: sui::coin::Coin<sui::sui::SUI>, _ctx: &mut sui::tx_context::TxContext): deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>
Implementation
Function create_customized_pool_with_return
Function for creating pool with customized taker fee rate and maker rebate rate. The taker_fee_rate should be greater than or equal to the maker_rebate_rate, and both should have a scaling of 10^9. Taker_fee_rate of 0.25% should be 2_500_000 for example
public fun create_customized_pool_with_return<BaseAsset, QuoteAsset>(_tick_size: u64, _lot_size: u64, _taker_fee_rate: u64, _maker_rebate_rate: u64, _creation_fee: sui::coin::Coin<sui::sui::SUI>, _ctx: &mut sui::tx_context::TxContext): deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>
Implementation
Function create_customized_pool_v2
A V2 function for creating customized pools for better PTB friendliness/compostability. If a user wants to create a pool and then destroy/lock the pool_owner_cap one can do so with this function.
public fun create_customized_pool_v2<BaseAsset, QuoteAsset>(_tick_size: u64, _lot_size: u64, _taker_fee_rate: u64, _maker_rebate_rate: u64, _creation_fee: sui::coin::Coin<sui::sui::SUI>, _ctx: &mut sui::tx_context::TxContext): (deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, deepbook::clob_v2::PoolOwnerCap)
Implementation
Function deposit_base
public fun deposit_base<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _coin: sui::coin::Coin<BaseAsset>, _account_cap: &deepbook::custodian_v2::AccountCap)
Implementation
Function deposit_quote
public fun deposit_quote<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _coin: sui::coin::Coin<QuoteAsset>, _account_cap: &deepbook::custodian_v2::AccountCap)
Implementation
Function withdraw_base
public fun withdraw_base<BaseAsset, QuoteAsset>(pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, quantity: u64, account_cap: &deepbook::custodian_v2::AccountCap, ctx: &mut sui::tx_context::TxContext): sui::coin::Coin<BaseAsset>
Implementation
Function withdraw_quote
public fun withdraw_quote<BaseAsset, QuoteAsset>(pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, quantity: u64, account_cap: &deepbook::custodian_v2::AccountCap, ctx: &mut sui::tx_context::TxContext): sui::coin::Coin<QuoteAsset>
Implementation
Function swap_exact_base_for_quote
public fun swap_exact_base_for_quote<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _client_order_id: u64, _account_cap: &deepbook::custodian_v2::AccountCap, _quantity: u64, _base_coin: sui::coin::Coin<BaseAsset>, _quote_coin: sui::coin::Coin<QuoteAsset>, _clock: &sui::clock::Clock, _ctx: &mut sui::tx_context::TxContext): (sui::coin::Coin<BaseAsset>, sui::coin::Coin<QuoteAsset>, u64)
Implementation
Function swap_exact_base_for_quote_with_metadata
public fun swap_exact_base_for_quote_with_metadata<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _client_order_id: u64, _account_cap: &deepbook::custodian_v2::AccountCap, _quantity: u64, _base_coin: sui::coin::Coin<BaseAsset>, _quote_coin: sui::coin::Coin<QuoteAsset>, _clock: &sui::clock::Clock, _ctx: &mut sui::tx_context::TxContext): (sui::coin::Coin<BaseAsset>, sui::coin::Coin<QuoteAsset>, u64, vector<deepbook::clob_v2::MatchedOrderMetadata<BaseAsset, QuoteAsset>>)
Implementation
Function swap_exact_quote_for_base
public fun swap_exact_quote_for_base<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _client_order_id: u64, _account_cap: &deepbook::custodian_v2::AccountCap, _quantity: u64, _clock: &sui::clock::Clock, _quote_coin: sui::coin::Coin<QuoteAsset>, _ctx: &mut sui::tx_context::TxContext): (sui::coin::Coin<BaseAsset>, sui::coin::Coin<QuoteAsset>, u64)
Implementation
Function swap_exact_quote_for_base_with_metadata
public fun swap_exact_quote_for_base_with_metadata<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _client_order_id: u64, _account_cap: &deepbook::custodian_v2::AccountCap, _quantity: u64, _clock: &sui::clock::Clock, _quote_coin: sui::coin::Coin<QuoteAsset>, _ctx: &mut sui::tx_context::TxContext): (sui::coin::Coin<BaseAsset>, sui::coin::Coin<QuoteAsset>, u64, vector<deepbook::clob_v2::MatchedOrderMetadata<BaseAsset, QuoteAsset>>)
Implementation
Function place_market_order
Place a market order to the order book.
public fun place_market_order<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _account_cap: &deepbook::custodian_v2::AccountCap, _client_order_id: u64, _quantity: u64, _is_bid: bool, _base_coin: sui::coin::Coin<BaseAsset>, _quote_coin: sui::coin::Coin<QuoteAsset>, _clock: &sui::clock::Clock, _ctx: &mut sui::tx_context::TxContext): (sui::coin::Coin<BaseAsset>, sui::coin::Coin<QuoteAsset>)
Implementation
Function place_market_order_with_metadata
public fun place_market_order_with_metadata<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _account_cap: &deepbook::custodian_v2::AccountCap, _client_order_id: u64, _quantity: u64, _is_bid: bool, _base_coin: sui::coin::Coin<BaseAsset>, _quote_coin: sui::coin::Coin<QuoteAsset>, _clock: &sui::clock::Clock, _ctx: &mut sui::tx_context::TxContext): (sui::coin::Coin<BaseAsset>, sui::coin::Coin<QuoteAsset>, vector<deepbook::clob_v2::MatchedOrderMetadata<BaseAsset, QuoteAsset>>)
Implementation
Function place_limit_order
Place a limit order to the order book. Returns (base quantity filled, quote quantity filled, whether a maker order is being placed, order id of the maker order). When the limit order is not successfully placed, we return false to indicate that and also returns a meaningless order_id 0. When the limit order is successfully placed, we return true to indicate that and also the corresponding order_id. So please check that boolean value first before using the order id.
public fun place_limit_order<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _client_order_id: u64, _price: u64, _quantity: u64, _self_matching_prevention: u8, _is_bid: bool, _expire_timestamp: u64, _restriction: u8, _clock: &sui::clock::Clock, _account_cap: &deepbook::custodian_v2::AccountCap, _ctx: &mut sui::tx_context::TxContext): (u64, u64, bool, u64)
Implementation
Function place_limit_order_with_metadata
Place a limit order to the order book. Returns (base quantity filled, quote quantity filled, whether a maker order is being placed, order id of the maker order). When the limit order is not successfully placed, we return false to indicate that and also returns a meaningless order_id 0. When the limit order is successfully placed, we return true to indicate that and also the corresponding order_id. So please check that boolean value first before using the order id.
public fun place_limit_order_with_metadata<BaseAsset, QuoteAsset>(_pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, _client_order_id: u64, _price: u64, _quantity: u64, _self_matching_prevention: u8, _is_bid: bool, _expire_timestamp: u64, _restriction: u8, _clock: &sui::clock::Clock, _account_cap: &deepbook::custodian_v2::AccountCap, _ctx: &mut sui::tx_context::TxContext): (u64, u64, bool, u64, vector<deepbook::clob_v2::MatchedOrderMetadata<BaseAsset, QuoteAsset>>)
Implementation
Function order_is_bid
fun order_is_bid(order_id: u64): bool
Implementation
Function emit_order_canceled
fun emit_order_canceled<BaseAsset, QuoteAsset>(pool_id: sui::object::ID, order: &deepbook::clob_v2::Order)
Implementation
Function cancel_order
Cancel and opening order. Abort if order_id is invalid or if the order is not submitted by the transaction sender.
public fun cancel_order<BaseAsset, QuoteAsset>(pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, order_id: u64, account_cap: &deepbook::custodian_v2::AccountCap)
Implementation
Function remove_order
fun remove_order(open_orders: &mut deepbook::critbit::CritbitTree<deepbook::clob_v2::TickLevel>, usr_open_orders: &mut sui::linked_table::LinkedTable<u64, u64>, tick_index: u64, order_id: u64, owner: address): deepbook::clob_v2::Order
Implementation
Function cancel_all_orders
public fun cancel_all_orders<BaseAsset, QuoteAsset>(pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, account_cap: &deepbook::custodian_v2::AccountCap)
Implementation
Function batch_cancel_order
Batch cancel limit orders to save gas cost. Abort if any of the order_ids are not submitted by the sender. Skip any order_id that is invalid. Note that this function can reduce gas cost even further if caller has multiple orders at the same price level, and if orders with the same price are grouped together in the vector. For example, if we have the following order_id to price mapping, {0: 100., 1: 200., 2: 100., 3: 200.}. Grouping order_ids like [0, 2, 1, 3] would make it the most gas efficient.
public fun batch_cancel_order<BaseAsset, QuoteAsset>(pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, order_ids: vector<u64>, account_cap: &deepbook::custodian_v2::AccountCap)
Implementation
Function clean_up_expired_orders
Clean up expired orders Note that this function can reduce gas cost if orders with the same price are grouped together in the vector because we would not need the computation to find the tick_index. For example, if we have the following order_id to price mapping, {0: 100., 1: 200., 2: 100., 3: 200.}. Grouping order_ids like [0, 2, 1, 3] would make it the most gas efficient. Order owners should be the owner addresses from the account capacities which placed the orders, and they should correspond to the order IDs one by one.
public fun clean_up_expired_orders<BaseAsset, QuoteAsset>(pool: &mut deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, clock: &sui::clock::Clock, order_ids: vector<u64>, order_owners: vector<address>)
Implementation
Function list_open_orders
public fun list_open_orders<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, account_cap: &deepbook::custodian_v2::AccountCap): vector<deepbook::clob_v2::Order>
Implementation
Function account_balance
query user balance inside custodian
public fun account_balance<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, account_cap: &deepbook::custodian_v2::AccountCap): (u64, u64, u64, u64)
Implementation
Function get_market_price
Query the market price of order book returns (best_bid_price, best_ask_price) if there exists bid/ask order in the order book, otherwise returns None
public fun get_market_price<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): (std::option::Option<u64>, std::option::Option<u64>)
Implementation
Function get_level2_book_status_bid_side
Enter a price range and return the level2 order depth of all valid prices within this price range in bid side returns two vectors of u64 The previous is a list of all valid prices The latter is the corresponding depth list
public fun get_level2_book_status_bid_side<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, price_low: u64, price_high: u64, clock: &sui::clock::Clock): (vector<u64>, vector<u64>)
Implementation
Function get_level2_book_status_ask_side
Enter a price range and return the level2 order depth of all valid prices within this price range in ask side returns two vectors of u64 The previous is a list of all valid prices The latter is the corresponding depth list
public fun get_level2_book_status_ask_side<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, price_low: u64, price_high: u64, clock: &sui::clock::Clock): (vector<u64>, vector<u64>)
Implementation
Function get_level2_book_status
internal func to retrieve single depth of a tick price
fun get_level2_book_status(open_orders: &deepbook::critbit::CritbitTree<deepbook::clob_v2::TickLevel>, price: u64, time_stamp: u64): u64
Implementation
Function get_order_status
public fun get_order_status<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>, order_id: u64, account_cap: &deepbook::custodian_v2::AccountCap): &deepbook::clob_v2::Order
Implementation
Function matched_order_metadata_info
public fun matched_order_metadata_info<BaseAsset, QuoteAsset>(_matched_order_metadata: &deepbook::clob_v2::MatchedOrderMetadata<BaseAsset, QuoteAsset>): (sui::object::ID, u64, bool, address, address, u64, u64, u64, u64)
Implementation
Function asks
public fun asks<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): &deepbook::critbit::CritbitTree<deepbook::clob_v2::TickLevel>
Implementation
Function bids
public fun bids<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): &deepbook::critbit::CritbitTree<deepbook::clob_v2::TickLevel>
Implementation
Function tick_size
public fun tick_size<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): u64
Implementation
Function maker_rebate_rate
public fun maker_rebate_rate<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): u64
Implementation
Function taker_fee_rate
public fun taker_fee_rate<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): u64
Implementation
Function pool_size
public fun pool_size<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): u64
Implementation
Function open_orders
public fun open_orders(tick_level: &deepbook::clob_v2::TickLevel): &sui::linked_table::LinkedTable<u64, deepbook::clob_v2::Order>
Implementation
Function order_id
public fun order_id(order: &deepbook::clob_v2::Order): u64
Implementation
Function tick_level
public fun tick_level(order: &deepbook::clob_v2::Order): u64
Implementation
Function original_quantity
public fun original_quantity(order: &deepbook::clob_v2::Order): u64
Implementation
Function quantity
public fun quantity(order: &deepbook::clob_v2::Order): u64
Implementation
Function is_bid
public fun is_bid(order: &deepbook::clob_v2::Order): bool
Implementation
Function owner
public fun owner(order: &deepbook::clob_v2::Order): address
Implementation
Function expire_timestamp
public fun expire_timestamp(order: &deepbook::clob_v2::Order): u64
Implementation
Function quote_asset_trading_fees_value
public fun quote_asset_trading_fees_value<BaseAsset, QuoteAsset>(pool: &deepbook::clob_v2::Pool<BaseAsset, QuoteAsset>): u64
Implementation
Function clone_order
public(package) fun clone_order(order: &deepbook::clob_v2::Order): deepbook::clob_v2::Order