pub struct Subscription {
pub symbols: Symbols,
pub schema: Schema,
pub stype_in: SType,
pub start: Option<OffsetDateTime>,
pub id: Option<u32>,
/* private fields */
}
live
only.Expand description
A subscription for real-time or intraday historical data.
Fields§
§symbols: Symbols
The symbols of the instruments to subscribe to.
schema: Schema
The data record schema of data to subscribe to.
stype_in: SType
The symbology type of the symbols in symbols
.
start: Option<OffsetDateTime>
If specified, requests available data since that time (inclusive), based on
ts_event
. When None
, only real-time data is sent.
Setting this field is not supported once the session has been started with
LiveClient::start
.
id: Option<u32>
The optional numerical identifier associated with this subscription.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn builder() -> SubscriptionBuilder<((), (), (), (), (), ())>
pub fn builder() -> SubscriptionBuilder<((), (), (), (), (), ())>
Create a builder for building Subscription
.
On the builder, call .symbols(...)
, .schema(...)
, .stype_in(...)
(optional), .start(...)
(optional), .use_snapshot(...)
(optional), .id(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of Subscription
.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more