pub struct Clob { /* private fields */ }Implementations§
Source§impl Clob
impl Clob
Sourcepub fn new(
private_key: impl Into<String>,
credentials: Credentials,
) -> Result<Clob, ClobError>
pub fn new( private_key: impl Into<String>, credentials: Credentials, ) -> Result<Clob, ClobError>
Create a new CLOB client with default configuration
Sourcepub fn builder(
private_key: impl Into<String>,
credentials: Credentials,
) -> Result<ClobBuilder, ClobError>
pub fn builder( private_key: impl Into<String>, credentials: Credentials, ) -> Result<ClobBuilder, ClobError>
Create a new CLOB client builder with required authentication
Sourcepub fn from_account(account: Account) -> Result<Clob, ClobError>
pub fn from_account(account: Account) -> Result<Clob, ClobError>
Create a new CLOB client from an Account
Sourcepub fn account_api(&self) -> AccountApi
pub fn account_api(&self) -> AccountApi
Get account API namespace
Sourcepub async fn create_order(
&self,
params: &CreateOrderParams,
) -> Result<Order, ClobError>
pub async fn create_order( &self, params: &CreateOrderParams, ) -> Result<Order, ClobError>
Create an unsigned order from parameters
Sourcepub async fn sign_order(&self, order: &Order) -> Result<SignedOrder, ClobError>
pub async fn sign_order(&self, order: &Order) -> Result<SignedOrder, ClobError>
Sign an order
Sourcepub async fn post_order(
&self,
signed_order: &SignedOrder,
) -> Result<OrderResponse, ClobError>
pub async fn post_order( &self, signed_order: &SignedOrder, ) -> Result<OrderResponse, ClobError>
Post a signed order
Sourcepub async fn place_order(
&self,
params: &CreateOrderParams,
) -> Result<OrderResponse, ClobError>
pub async fn place_order( &self, params: &CreateOrderParams, ) -> Result<OrderResponse, ClobError>
Create, sign, and post an order (convenience method)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clob
impl !RefUnwindSafe for Clob
impl Send for Clob
impl Sync for Clob
impl Unpin for Clob
impl !UnwindSafe for Clob
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more