pub struct OrderRecord {Show 30 fields
pub order_id: String,
pub order_num: Option<i64>,
pub client_code: Option<String>,
pub executed_value: Option<Decimal>,
pub trade_date: Option<String>,
pub order_date_time: Option<DateTime<Utc>>,
pub update_date_time: Option<DateTime<Utc>>,
pub ticker: Option<String>,
pub class_code: Option<String>,
pub side: Option<i32>,
pub order_type: Option<i32>,
pub order_status: Option<i32>,
pub order_quantity: Option<Decimal>,
pub executed_quantity: Option<Decimal>,
pub price: Option<Decimal>,
pub average_price: Option<Decimal>,
pub remained_quantity: Option<Decimal>,
pub order_quantity_lots: Option<Decimal>,
pub remained_quantity_lots: Option<Decimal>,
pub executed_quantity_lots: Option<Decimal>,
pub settlement_currency: Option<String>,
pub reject_reason: Option<String>,
pub take_price: Option<Decimal>,
pub stop_price: Option<Decimal>,
pub linked_order: Option<String>,
pub stop_order: Option<String>,
pub market_take_profit: Option<i32>,
pub market_stop_loss: Option<i32>,
pub position_price_stop: Option<Decimal>,
pub position_price_limit: Option<Decimal>,
}Expand description
One order in the order list (POST .../orders/search).
This record is not the same as the order state of OrderExecutionData. It uses numbers for side,
type and status, with the meaning of the list: status 1 cancelled, 2 executed, 3 active.
It carries the broker’s order id and no clientOrderId. Quantities come in pieces and in lots.
§Examples
use brokapi_bcs_protocol::http::models::OrderRecord;
let r: OrderRecord = serde_json::from_str(
r#"{"orderId":"20261019-TQBR-79000001","orderNum":79000001,"ticker":"SBER","classCode":"TQBR",
"side":1,"orderType":2,"orderStatus":3,"price":300.0,"orderQuantity":1,"remainedQuantity":1,
"orderDateTime":"2026-10-19T07:05:00.000Z"}"#,
)?;
assert_eq!(r.order_status, Some(3)); // 3 = active in the list
assert!(r.order_date_time.is_some());Fields§
§order_id: StringId of the order at the exchange, in the form YYYYMMDD-ClassCode-OrderNumber. The only field the code requires.
order_num: Option<i64>Order number.
client_code: Option<String>Client code.
executed_value: Option<Decimal>Executed volume in the currency.
trade_date: Option<String>Trading date, kept as text.
order_date_time: Option<DateTime<Utc>>Time the order was placed (UTC). None if absent or the epoch.
update_date_time: Option<DateTime<Utc>>Time of the last update (UTC). None if absent or the epoch.
ticker: Option<String>Ticker.
class_code: Option<String>Class code (board).
side: Option<i32>1 buy, 2 sell.
order_type: Option<i32>Type of the order, the codes of the order list (see OrderSearchRequest).
order_status: Option<i32>Status of the order, the codes of the order list: 1 cancelled, 2 executed, 3 active. These are not the codes of order events.
order_quantity: Option<Decimal>Quantity of the order, in pieces.
executed_quantity: Option<Decimal>Executed quantity, in pieces.
price: Option<Decimal>Price of the order.
average_price: Option<Decimal>Average execution price.
remained_quantity: Option<Decimal>Remaining quantity, in pieces.
order_quantity_lots: Option<Decimal>Quantity of the order, in lots.
remained_quantity_lots: Option<Decimal>Remaining quantity, in lots.
executed_quantity_lots: Option<Decimal>Executed quantity, in lots.
settlement_currency: Option<String>Settlement currency.
reject_reason: Option<String>Why the order was rejected, if it was.
take_price: Option<Decimal>Conditional orders: take-profit and stop-loss trigger prices.
stop_price: Option<Decimal>Stop-loss trigger price of a conditional order.
linked_order: Option<String>Number of the linked order (the other leg of a TP+SL pair, or the order a stop produced).
stop_order: Option<String>Number of the stop order.
market_take_profit: Option<i32>1 market, 2 limit.
market_stop_loss: Option<i32>Stop-loss execution: 1 market order, 2 limit order.
position_price_stop: Option<Decimal>Stop price by position.
position_price_limit: Option<Decimal>Limit price by position.
Trait Implementations§
Source§impl Clone for OrderRecord
impl Clone for OrderRecord
Source§fn clone(&self) -> OrderRecord
fn clone(&self) -> OrderRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more