pub struct PrivateConfig {
pub base_url: String,
pub api_key: SensitiveString,
pub api_secret: SensitiveString,
pub headers: Option<HeaderMap>,
}Expand description
Configuration for super::PrivateClient.
Margin has no public endpoints (everything under /sapi/v1/margin/*
requires an API key + signature). For unauthenticated market data and
connectivity, use crate::spot::http::PublicClient.
Fields§
§base_url: String§api_key: SensitiveString§api_secret: SensitiveString§headers: Option<HeaderMap>Implementations§
Source§impl PrivateConfig
impl PrivateConfig
pub fn new( base_url: impl Into<String>, api_key: SensitiveString, api_secret: SensitiveString, ) -> Self
pub fn headers(self, headers: Option<HeaderMap>) -> Self
Trait Implementations§
Source§impl Clone for PrivateConfig
impl Clone for PrivateConfig
Source§fn clone(&self) -> PrivateConfig
fn clone(&self) -> PrivateConfig
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 moreAuto Trait Implementations§
impl Freeze for PrivateConfig
impl RefUnwindSafe for PrivateConfig
impl Send for PrivateConfig
impl Sync for PrivateConfig
impl Unpin for PrivateConfig
impl UnsafeUnpin for PrivateConfig
impl UnwindSafe for PrivateConfig
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