Struct fxoanda::account::stream_pricing::StreamPricingRequest
source · pub struct StreamPricingRequest { /* private fields */ }
Expand description
Price Stream Get a stream of Account Prices starting from when the request is made. This pricing stream does not include every single price created for the Account, but instead will provide at most 4 prices per second (every 250 milliseconds) for each instrument being requested. If more than one price is created for an instrument during the 250 millisecond window, only the price in effect at the end of the window is sent. This means that during periods of rapid price movement, subscribers to this stream will not be sent every price. Pricing windows for different connections to the price stream are not all aligned in the same way (i.e. they are not all aligned to the top of the second). This means that during periods of rapid price movement, different subscribers may observe different prices depending on their alignment.
Implementations§
source§impl StreamPricingRequest
impl StreamPricingRequest
pub fn new() -> StreamPricingRequest
pub fn with_uri(self, x: String) -> Self
sourcepub fn with_account_id(self, x: String) -> Self
pub fn with_account_id(self, x: String) -> Self
Account Identifier format: “-”-delimited string with format “{siteID}-{divisionID}-{userID}-{accountNumber}”
- param String
- return StreamPricingRequest
The authorization bearer token previously obtained by the client format: The string ’Bearer ’ followed by the token.
- param String
- return StreamPricingRequest
sourcepub fn with_accept_datetime_format(self, x: String) -> Self
pub fn with_accept_datetime_format(self, x: String) -> Self
Format of DateTime fields in the request and response.
- param String
- return StreamPricingRequest
sourcepub fn with_instruments(self, x: Vec<String>) -> Self
pub fn with_instruments(self, x: Vec<String>) -> Self
List of Instruments to stream Prices for.
- param Vec
- return StreamPricingRequest
sourcepub fn with_snapshot(self, x: bool) -> Self
pub fn with_snapshot(self, x: bool) -> Self
Flag that enables/disables the sending of a pricing snapshot when initially connecting to the stream.
- param bool
- return StreamPricingRequest