pub type StopOrderTicket = StopOrderTicket<Otw>;Aliased Type§
pub struct StopOrderTicket {
pub id: UID,
pub executor: Address,
pub gas: Balance<SUI>,
pub collateral_to_allocate: Balance<Otw>,
pub obj_id: ID,
pub account_id: u64,
pub encrypted_details: MoveVec<u8>,
/* private fields */
}Fields§
§id: UID§executor: AddressAddress that is allowed to execute the order on behalf of the user.
gas: Balance<SUI>Gas coin that must be provided by the user to cover for one stop order cost. This amount of gas is going to be sent to the executor of the order.
collateral_to_allocate: Balance<Otw>Amount of collateral the user can decide to allocate to place this order. It can be 0.
obj_id: IDUser account or subaccount object id that created this stop order.
This is used to know where to transfer collateral to if a margin_ratio
is set in encrypted_details and placing the order requires
de-allocating collateral to maintain that target margin_ratio.
account_id: u64User account id
encrypted_details: MoveVec<u8>Vector containing the blake2b hash obtained by the offchain application of blake2b on the following parameters:
- clearing_house_id: ID
- expire_timestamp: u64
- is_limit_order:
trueif limit order,falseif market order - stop_index_price: u256
- ge_stop_index_price:
truemeans the order can be placed when oracle index price is >= than chosenstop_index_price - side: bool
- size: u64
- price: u64 (can be set at random value if
is_limit_orderis false) - order_type: u64 (can be set at random value if
is_limit_orderis false) - reduce_only: bool
- margin_ratio: Option
- salt: vector