Type Alias StopOrderTicket

Source
pub type StopOrderTicket = StopOrderTicket<Otw>;

Aliased Type§

struct StopOrderTicket {
    pub id: UID,
    pub user_address: Address,
    pub expire_timestamp: u64,
    pub encrypted_details: MoveVec<u8>,
    /* private fields */
}

Fields§

§id: UID§user_address: Address

Save user address. This allow only the user to cancel the ticket eventually.

§expire_timestamp: u64

Timestamp after which the order cannot be placed anymore

§encrypted_details: MoveVec<u8>

Vector containing the blake2b hash obtained by the offchain application of blake2b on the following parameters:

  • clearing_house_id: ID
  • account_id: u64
  • is_limit_order: true if limit order, false if market order
  • stop_index_price: u256
  • ge_stop_index_price: true means the order can be placed when oracle index price is >= than chosen stop_index_price
  • side: bool
  • size: u64
  • price: u64 (can be set at random value if is_limit_order is false)
  • order_type: u64 (can be set at random value if is_limit_order is false)
  • salt: vector