pub struct OkxClient<T = DefaultTransport> { /* private fields */ }Expand description
An OKX v5 REST API client, generic over the HTTP Transport.
Construct one with OkxClient::builder (uses the default
ReqwestTransport) or OkxClient::with_transport
for a custom transport. The client is cheap to share behind an Arc and all
request methods take &self.
API groups are reached through accessor methods: market,
public_data, status,
support, account,
funding, convert,
finance, and trade.
Implementations§
Source§impl OkxClient
impl OkxClient
Sourcepub fn builder() -> OkxClientBuilder<DefaultTransport>
pub fn builder() -> OkxClientBuilder<DefaultTransport>
Start building a client backed by the default
ReqwestTransport.
Source§impl<T> OkxClient<T>
impl<T> OkxClient<T>
Sourcepub fn with_transport(transport: T) -> OkxClientBuilder<T>
pub fn with_transport(transport: T) -> OkxClientBuilder<T>
Start building a client around a custom Transport.
Source§impl<T: Transport> OkxClient<T>
impl<T: Transport> OkxClient<T>
Sourcepub fn public_data(&self) -> PublicData<'_, T>
pub fn public_data(&self) -> PublicData<'_, T>
Access the public reference-data endpoints.
Sourcepub fn funding(&self) -> Funding<'_, T>
pub fn funding(&self) -> Funding<'_, T>
Access the (authenticated) funding-account and asset endpoints.
Sourcepub fn sub_account(&self) -> SubAccount<'_, T>
pub fn sub_account(&self) -> SubAccount<'_, T>
Access the (authenticated) sub-account management endpoints.
Auto Trait Implementations§
impl<T> Freeze for OkxClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for OkxClient<T>where
T: RefUnwindSafe,
impl<T> Send for OkxClient<T>where
T: Send,
impl<T> Sync for OkxClient<T>where
T: Sync,
impl<T> Unpin for OkxClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for OkxClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for OkxClient<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