pub struct OkxClientBuilder<T = DefaultTransport> { /* private fields */ }Expand description
Builder for OkxClient.
Created by OkxClient::builder or OkxClient::with_transport.
Implementations§
Source§impl<T> OkxClientBuilder<T>
impl<T> OkxClientBuilder<T>
Sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Set the API credentials used to sign authenticated requests.
Sourcepub fn region(self, region: OkxRegion) -> Self
pub fn region(self, region: OkxRegion) -> Self
Select the OKX REST API region.
The default is OkxRegion::Global. US and AU users registered on
app.okx.com should use OkxRegion::Us. EU users registered on
my.okx.com should use OkxRegion::Eea.
Sourcepub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn base_url(self, base_url: impl Into<String>) -> Self
Override the API base URL.
This overrides the default global domain and any region selected through
Self::region.
Sourcepub fn demo_trading(self, demo: bool) -> Self
pub fn demo_trading(self, demo: bool) -> Self
Toggle the x-simulated-trading header for OKX demo trading.
Sourcepub fn transport<U>(self, transport: U) -> OkxClientBuilder<U>
pub fn transport<U>(self, transport: U) -> OkxClientBuilder<U>
Replace the transport, changing the client’s transport type.
Auto Trait Implementations§
impl<T> Freeze for OkxClientBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for OkxClientBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for OkxClientBuilder<T>where
T: Send,
impl<T> Sync for OkxClientBuilder<T>where
T: Sync,
impl<T> Unpin for OkxClientBuilder<T>where
T: Unpin,
impl<T> UnsafeUnpin for OkxClientBuilder<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for OkxClientBuilder<T>where
T: UnwindSafe,
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