pub struct LastTradesRequest {
pub ticker: String,
pub class_code: String,
pub start_date_time: Option<DateTime<Utc>>,
pub end_date_time: Option<DateTime<Utc>>,
pub side: Option<String>,
}Expand description
POST /api/v1/last-trades body (schema checked 2026-10-19): the instrument, an optional period of
the current session and an optional side. The API has no limit.
§Examples
use brokapi_bcs_protocol::http::models::LastTradesRequest;
let req = LastTradesRequest { ticker: "SBER".into(), class_code: "TQBR".into(), side: Some("1".into()), ..Default::default() };
let json = serde_json::to_value(&req)?;
assert_eq!(json["side"], "1");
assert!(json.get("startDateTime").is_none()); // unset period is not sentFields§
§ticker: StringTicker. Required.
class_code: StringClass code (board). Required.
start_date_time: Option<DateTime<Utc>>Start of the period inside the current session (UTC). Left out when None.
end_date_time: Option<DateTime<Utc>>End of the period (UTC). Left out when None.
side: Option<String>1 buy, 2 sell.
Trait Implementations§
Source§impl Clone for LastTradesRequest
impl Clone for LastTradesRequest
Source§fn clone(&self) -> LastTradesRequest
fn clone(&self) -> LastTradesRequest
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 LastTradesRequest
impl Debug for LastTradesRequest
Source§impl Default for LastTradesRequest
impl Default for LastTradesRequest
Source§fn default() -> LastTradesRequest
fn default() -> LastTradesRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LastTradesRequest
impl RefUnwindSafe for LastTradesRequest
impl Send for LastTradesRequest
impl Sync for LastTradesRequest
impl Unpin for LastTradesRequest
impl UnsafeUnpin for LastTradesRequest
impl UnwindSafe for LastTradesRequest
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