pub struct PlaceOrder { /* private fields */ }Expand description
Provider-native request, response, order, position, trade, and market-data models. Provider-native request, response, order, position, trade, and market-data models. Provider-native request, response, order, position, trade, and market-data models. Order placement parameters.
Construct this request with PlaceOrder::builder, which prevents an
invalid non-positive quantity or trailing stop without a starting price
from reaching the transport.
Implementations§
Source§impl PlaceOrder
impl PlaceOrder
Sourcepub fn builder(
account_id: AccountId,
contract_id: ContractId,
order_type: OrderType,
side: Side,
quantity: i32,
) -> PlaceOrderBuilder
pub fn builder( account_id: AccountId, contract_id: ContractId, order_type: OrderType, side: Side, quantity: i32, ) -> PlaceOrderBuilder
Starts a validated order-placement request.
Sourcepub const fn account_id(&self) -> AccountId
pub const fn account_id(&self) -> AccountId
Returns the provider account.
Sourcepub const fn contract_id(&self) -> &ContractId
pub const fn contract_id(&self) -> &ContractId
Borrows the provider contract.
Sourcepub const fn order_type(&self) -> OrderType
pub const fn order_type(&self) -> OrderType
Returns the order type.
Sourcepub const fn limit_price(&self) -> Option<Decimal>
pub const fn limit_price(&self) -> Option<Decimal>
Returns the optional limit price.
Sourcepub const fn stop_price(&self) -> Option<Decimal>
pub const fn stop_price(&self) -> Option<Decimal>
Returns the optional stop price.
Sourcepub const fn trail_price(&self) -> Option<Decimal>
pub const fn trail_price(&self) -> Option<Decimal>
Returns the absolute starting price level for a trailing-stop order.
This input differs from the distance returned in Order::trail_price.
Sourcepub fn custom_tag(&self) -> Option<&str>
pub fn custom_tag(&self) -> Option<&str>
Borrows the optional caller tag.
Sourcepub const fn stop_loss_bracket(&self) -> Option<&Bracket>
pub const fn stop_loss_bracket(&self) -> Option<&Bracket>
Borrows the optional stop-loss bracket.
Sourcepub const fn take_profit_bracket(&self) -> Option<&Bracket>
pub const fn take_profit_bracket(&self) -> Option<&Bracket>
Borrows the optional take-profit bracket.