pub struct UserDataConfig {
pub api: FinamApiConfig,
pub account_id: String,
pub source: Arc<str>,
pub order_state_buffer: usize,
pub executions_limit: i32,
pub subscribe_ack_timeout: Duration,
pub price_grid: PriceGrid,
}Expand description
User data connector config: one connector = one account.
Used with UserDataConnector::start.
Fields§
§api: FinamApiConfigCredentials and endpoint.
account_id: StringAccount all orders, executions and portfolio belong to.
source: Arc<str>Envelope source label, e.g. "finam-ud-A12345".
order_state_buffer: usizeLossless buffer capacity for order-state and execution subscriptions. Default 1024.
When it fills up, the subscription reports an overflow and the connector turns Degraded:
trading commands are refused until reconcile succeeds. Events are never dropped silently.
executions_limit: i32limit sent with the Trades history request. Default 1000.
executions(range) returns at most this many trades.
subscribe_ack_timeout: DurationHow long subscribe_* waits for the stream to open (default 3 seconds). Same meaning as in
MarketDataConfig.
price_grid: PriceGridPrice steps the connector checks order prices against (default: empty, nothing is checked).
Fill it with [PriceGrid::learn] from the trading parameters of the instruments you trade. A
price off the step is then refused with Rejected (price_off_step) before anything is sent.
Implementations§
Source§impl UserDataConfig
impl UserDataConfig
Sourcepub fn new(
api: FinamApiConfig,
account_id: impl Into<String>,
source: impl Into<Arc<str>>,
) -> Self
pub fn new( api: FinamApiConfig, account_id: impl Into<String>, source: impl Into<Arc<str>>, ) -> Self
Config for one account_id with default settings. source labels every envelope.
The account is checked when the connector starts: it must not be empty and, when the token lists its accounts, it must be one of them.
Trait Implementations§
Source§impl Clone for UserDataConfig
impl Clone for UserDataConfig
Source§fn clone(&self) -> UserDataConfig
fn clone(&self) -> UserDataConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for UserDataConfig
impl !UnwindSafe for UserDataConfig
impl Freeze for UserDataConfig
impl Send for UserDataConfig
impl Sync for UserDataConfig
impl Unpin for UserDataConfig
impl UnsafeUnpin for UserDataConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].