pub struct GridOrder {Show 45 fields
pub order_id: String,
pub symbol: String,
pub stock_name: String,
pub market: String,
pub status: String,
pub grid_status: String,
pub submitted_base_price: Option<Decimal>,
pub current_base_price: Option<Decimal>,
pub pre_trigger_base_price: Option<Decimal>,
pub post_trigger_base_price: Option<Decimal>,
pub upper_limit_price: Option<Decimal>,
pub lower_limit_price: Option<Decimal>,
pub trigger_price_type: TriggerPriceType,
pub trigger_spread_up: Option<Decimal>,
pub trigger_spread_down: Option<Decimal>,
pub trigger_percent_up: Option<Decimal>,
pub trigger_percent_down: Option<Decimal>,
pub pullback_percent: Option<Decimal>,
pub pullback_spread: Option<Decimal>,
pub rebound_percent: Option<Decimal>,
pub rebound_spread: Option<Decimal>,
pub trigger_sell_order_type: String,
pub trigger_buy_order_type: String,
pub trigger_sell_depth: i32,
pub trigger_buy_depth: i32,
pub trigger_quantity: Option<Decimal>,
pub trigger_sell_quantity: Option<Decimal>,
pub trigger_buy_quantity: Option<Decimal>,
pub upper_limit_quantity: Option<Decimal>,
pub lower_limit_quantity: Option<Decimal>,
pub upper_limit_event: GridLimitEvent,
pub lower_limit_event: GridLimitEvent,
pub multiple_trigger: bool,
pub trigger_times: i32,
pub total_buy_quantity: Option<Decimal>,
pub total_sell_quantity: Option<Decimal>,
pub total_profit_balance: Option<Decimal>,
pub settlement_currency: String,
pub time_in_force: GridTimeInForce,
pub gtd: String,
pub created_at: Option<OffsetDateTime>,
pub rth: i32,
pub support_shortsell: bool,
pub grid_order_type_up: String,
pub grid_order_type_down: String,
}Expand description
A grid trading order (element of the list / by-ids responses).
Fields reflect the gateway JSON; the security is exposed via symbol
(700.HK). Numeric values are returned as strings; unknown fields are
ignored (#[serde(default)]).
Fields§
§order_id: StringGrid master order ID
symbol: StringSecurity symbol (e.g. 700.HK)
stock_name: StringStock name
market: StringMarket
status: StringOrder status
grid_status: StringGrid running status
submitted_base_price: Option<Decimal>Submitted base price
current_base_price: Option<Decimal>Current base price
pre_trigger_base_price: Option<Decimal>Base price before the last trigger
post_trigger_base_price: Option<Decimal>Base price after the last trigger
upper_limit_price: Option<Decimal>Upper price bound
lower_limit_price: Option<Decimal>Lower price bound
trigger_price_type: TriggerPriceTypeTrigger price type (1 = spread, 2 = percent)
trigger_spread_up: Option<Decimal>Upward trigger spread
trigger_spread_down: Option<Decimal>Downward trigger spread
trigger_percent_up: Option<Decimal>Upward trigger percent
trigger_percent_down: Option<Decimal>Downward trigger percent
pullback_percent: Option<Decimal>Pullback percent
pullback_spread: Option<Decimal>Pullback spread
rebound_percent: Option<Decimal>Rebound percent
rebound_spread: Option<Decimal>Rebound spread
trigger_sell_order_type: StringSell-side execution order type (e.g. MO)
trigger_buy_order_type: StringBuy-side execution order type (e.g. MO)
trigger_sell_depth: i32Sell-side order-book depth
trigger_buy_depth: i32Buy-side order-book depth
trigger_quantity: Option<Decimal>Quantity per trigger
trigger_sell_quantity: Option<Decimal>Quantity per sell trigger
trigger_buy_quantity: Option<Decimal>Quantity per buy trigger
upper_limit_quantity: Option<Decimal>Quantity handled at the upper bound
lower_limit_quantity: Option<Decimal>Quantity handled at the lower bound
upper_limit_event: GridLimitEventAction at the upper bound
lower_limit_event: GridLimitEventAction at the lower bound
multiple_trigger: boolWhether a single grid level may trigger multiple times
trigger_times: i32Number of times the grid has triggered
total_buy_quantity: Option<Decimal>Accumulated bought quantity
total_sell_quantity: Option<Decimal>Accumulated sold quantity
total_profit_balance: Option<Decimal>Accumulated profit balance
settlement_currency: StringSettlement currency
time_in_force: GridTimeInForceTime in force (0 = Day, 1 = GTC, 6 = GTD)
gtd: StringExpiry date (YYYY-MM-DD, GTD)
created_at: Option<OffsetDateTime>Created time (RFC3339)
rth: i32Regular trading hours flag
support_shortsell: boolWhether short selling is allowed
grid_order_type_up: StringSell-side grid order type (GMO / GLO / GTG)
grid_order_type_down: StringBuy-side grid order type (GMO / GLO / GTG)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GridOrder
impl<'de> Deserialize<'de> for GridOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GridOrder
impl RefUnwindSafe for GridOrder
impl Send for GridOrder
impl Sync for GridOrder
impl Unpin for GridOrder
impl UnsafeUnpin for GridOrder
impl UnwindSafe for GridOrder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more