pub struct ClientBuilder { /* private fields */ }Expand description
Validated client configuration.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn max_response_bytes(self, value: usize) -> Self
pub fn max_response_bytes(self, value: usize) -> Self
Set the maximum non-stream response body size in bytes.
Sourcepub fn exit_reserve(self, requests: u32) -> Self
pub fn exit_reserve(self, requests: u32) -> Self
Reserve requests in the shared local 120-request, rolling one-second REST window for exits.
A new private owner defaults to zero; an injected owner keeps its policy when
this method is omitted. Only cancel_order, close_trade, and close_position
can use the reserve. All requests still count toward the same aggregate limit
and provider cooldown. The value must be less than 120; build validates it.
Sourcepub fn admission(self, owner: Admission) -> Self
pub fn admission(self, owner: Admission) -> Self
Share admission with other clients using the same caller-selected egress scope.
This owner has no credentials. An explicitly requested exit_reserve must
agree with its current policy; construction never resets shared capacity.
Sourcepub fn datetime_format(self, value: AcceptDatetimeFormat) -> Self
pub fn datetime_format(self, value: AcceptDatetimeFormat) -> Self
Select the documented OANDA timestamp wire format for responses.