pub struct OrderSearchRequest {
pub start_date_time: DateTime<Utc>,
pub end_date_time: DateTime<Utc>,
pub side: Option<i32>,
pub order_status: Option<Vec<i32>>,
pub order_types: Option<Vec<i32>>,
pub tickers: Option<Vec<String>>,
pub class_codes: Option<Vec<String>>,
}Expand description
Body of BcsHttpClient::search_orders.
The filters use the codes of the order list, which differ from the codes of order events. Status:
1 cancelled, 2 executed, 3 active. Side: 1 buy, 2 sell. Types: 1 market, 2 limit,
3 iceberg, 4 stop-limit, 5 take-profit (makes a limit order), 6 stop-loss, 7 take-profit and
stop-loss, 10 limit order for 30 days, 11 take-profit. Filters left as None are not sent.
§Examples
use brokapi_bcs_protocol::http::models::OrderSearchRequest;
use chrono::{TimeZone, Utc};
let req = OrderSearchRequest {
start_date_time: Utc.with_ymd_and_hms(2026, 10, 19, 0, 0, 0).unwrap(),
end_date_time: Utc.with_ymd_and_hms(2026, 10, 20, 0, 0, 0).unwrap(),
side: Some(1),
order_status: Some(vec![3]),
order_types: None,
tickers: Some(vec!["SBER".into()]),
class_codes: None,
};
let json = serde_json::to_value(&req)?;
assert_eq!(json["orderStatus"], serde_json::json!([3]));
assert!(json.get("orderTypes").is_none());Fields§
§start_date_time: DateTime<Utc>Start of the period (UTC).
end_date_time: DateTime<Utc>End of the period (UTC).
side: Option<i32>1 buy or 2 sell. Both if None.
order_status: Option<Vec<i32>>Statuses of the order list: 1 cancelled, 2 executed, 3 active. All if None.
order_types: Option<Vec<i32>>Types of the order list (see above). All if None.
tickers: Option<Vec<String>>Only these tickers.
class_codes: Option<Vec<String>>Only these class codes (boards).
Trait Implementations§
Source§impl Clone for OrderSearchRequest
impl Clone for OrderSearchRequest
Source§fn clone(&self) -> OrderSearchRequest
fn clone(&self) -> OrderSearchRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OrderSearchRequest
impl Debug for OrderSearchRequest
Auto Trait Implementations§
impl Freeze for OrderSearchRequest
impl RefUnwindSafe for OrderSearchRequest
impl Send for OrderSearchRequest
impl Sync for OrderSearchRequest
impl Unpin for OrderSearchRequest
impl UnsafeUnpin for OrderSearchRequest
impl UnwindSafe for OrderSearchRequest
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
Mutably borrows from an owned value. Read more