#[non_exhaustive]pub struct RithmicAdvancedBracketOrder {Show 31 fields
pub action: TransactionType,
pub duration: Duration,
pub exchange: String,
pub localid: String,
pub price_type: PriceType,
pub price: Option<f64>,
pub trigger_price: Option<f64>,
pub quantity: i32,
pub symbol: String,
pub bracket_type: BracketType,
pub target_quantity: Vec<i32>,
pub target_ticks: Vec<i32>,
pub stop_quantity: Vec<i32>,
pub stop_ticks: Vec<i32>,
pub if_touched: Option<RithmicIfTouchedTrigger>,
pub break_even_ticks: Option<i32>,
pub break_even_trigger_ticks: Option<i32>,
pub trailing_stop_trigger_ticks: Option<i32>,
pub trailing_stop_by_last_trade_price: Option<bool>,
pub target_market_order_if_touched: Option<bool>,
pub stop_market_on_reject: Option<bool>,
pub target_market_at_ssboe: Option<i32>,
pub target_market_at_usecs: Option<i32>,
pub stop_market_at_ssboe: Option<i32>,
pub stop_market_at_usecs: Option<i32>,
pub target_market_order_after_secs: Option<i32>,
pub release_at_ssboe: Option<i32>,
pub release_at_usecs: Option<i32>,
pub cancel_at_ssboe: Option<i32>,
pub cancel_at_usecs: Option<i32>,
pub cancel_after_secs: Option<i32>,
}Expand description
Richer bracket order request that maps directly to RequestBracketOrder.
This type exposes the full raw venue-native request surface currently available through the protobuf schema, including triggered entry, break-even, trailing-stop, timed release/cancel fields, and if-touched entry conditions.
Callers are responsible for providing a coherent combination of
bracket_type, target_*, and stop_* fields for the shape they want
Rithmic to create.
§Example
use rithmic_rs::{
BracketCondition, BracketDuration, BracketPriceField, BracketPriceType,
BracketTransactionType, BracketType, RithmicAdvancedBracketOrder,
RithmicIfTouchedTrigger,
};
let order = RithmicAdvancedBracketOrder {
action: BracketTransactionType::Buy,
duration: BracketDuration::Gtc,
exchange: "CME".to_string(),
localid: "advanced-bracket-1".to_string(),
price_type: BracketPriceType::StopLimit,
price: Some(5000.25),
trigger_price: Some(4999.75),
quantity: 3,
symbol: "ESM6".to_string(),
bracket_type: BracketType::TargetAndStop,
target_quantity: vec![2, 1],
target_ticks: vec![16, 24],
stop_quantity: vec![3],
stop_ticks: vec![8],
if_touched: Some(RithmicIfTouchedTrigger {
symbol: "NQM6".to_string(),
exchange: "CME".to_string(),
condition: BracketCondition::GreaterThanEqualTo,
price_field: BracketPriceField::TradePrice,
price: 18250.5,
}),
break_even_ticks: Some(2),
break_even_trigger_ticks: Some(10),
trailing_stop_trigger_ticks: Some(12),
target_market_order_if_touched: Some(true),
stop_market_on_reject: Some(true),
release_at_ssboe: Some(35900),
cancel_after_secs: Some(120),
..Default::default()
};Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.action: TransactionTypeBuy or Sell.
duration: DurationOrder duration.
exchange: StringExchange code (e.g., “CME”).
localid: StringYour identifier for tracking this order.
price_type: PriceTypeOrder type.
price: Option<f64>Entry price when required by the price type.
trigger_price: Option<f64>Trigger price for stop and if-touched entry types.
quantity: i32Entry order size (number of contracts).
For a coherent bracket, this should equal the sum of
target_quantity across all target legs. The crate does not validate
this invariant; Rithmic rejects inconsistent combinations.
symbol: StringTrading symbol (e.g., “ESH6”).
bracket_type: BracketTypeRithmic bracket shape.
target_quantity: Vec<i32>Exit target quantities, one value per target leg.
target_ticks: Vec<i32>Exit target distances in ticks.
stop_quantity: Vec<i32>Exit stop quantities.
stop_ticks: Vec<i32>Exit stop distances in ticks.
if_touched: Option<RithmicIfTouchedTrigger>Optional if-touched trigger settings.
break_even_ticks: Option<i32>Move stop to break-even by this many ticks.
break_even_trigger_ticks: Option<i32>Trigger break-even once the position reaches this many ticks.
trailing_stop_trigger_ticks: Option<i32>Enable a trailing stop after this many ticks.
trailing_stop_by_last_trade_price: Option<bool>Use last trade instead of bid/offer for trailing stop tracking.
target_market_order_if_touched: Option<bool>Convert target to MIT once touched.
stop_market_on_reject: Option<bool>Convert stop to market if the current stop order is rejected.
target_market_at_ssboe: Option<i32>Convert target to market at this second-since-beginning-of-epoch value.
target_market_at_usecs: Option<i32>Microsecond component for target_market_at_ssboe.
stop_market_at_ssboe: Option<i32>Convert stop to market at this second-since-beginning-of-epoch value.
stop_market_at_usecs: Option<i32>Microsecond component for stop_market_at_ssboe.
target_market_order_after_secs: Option<i32>Convert target to market after this many seconds.
release_at_ssboe: Option<i32>Release order at this second-since-beginning-of-epoch value.
release_at_usecs: Option<i32>Microsecond component for release_at_ssboe.
cancel_at_ssboe: Option<i32>Cancel order at this second-since-beginning-of-epoch value.
cancel_at_usecs: Option<i32>Microsecond component for cancel_at_ssboe.
cancel_after_secs: Option<i32>Cancel order after this many seconds.
Trait Implementations§
Source§impl Clone for RithmicAdvancedBracketOrder
impl Clone for RithmicAdvancedBracketOrder
Source§fn clone(&self) -> RithmicAdvancedBracketOrder
fn clone(&self) -> RithmicAdvancedBracketOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more