pub struct PredictExecutionClient {
pub api: PredictApiClient,
pub signer: PredictOrderSigner,
pub config: PredictExecConfig,
}Fields§
§api: PredictApiClient§signer: PredictOrderSigner§config: PredictExecConfigImplementations§
Source§impl PredictExecutionClient
impl PredictExecutionClient
pub async fn new(config: PredictExecConfig) -> Result<Self>
pub async fn from_env() -> Result<Self>
pub async fn authenticate_jwt( api: &PredictApiClient, signer: &PredictOrderSigner, ) -> Result<String>
pub async fn prepare_limit_order( &self, req: &PredictLimitOrderRequest, ) -> Result<PredictPreparedOrder>
Sourcepub async fn submit_prepared_order(
&self,
prepared: PredictPreparedOrder,
) -> Result<PredictSubmitResult>
pub async fn submit_prepared_order( &self, prepared: PredictPreparedOrder, ) -> Result<PredictSubmitResult>
Submit a signed order request.
- If
live_execution=false, this is a dry-run and does not POST. - If
live_execution=true, this sends POST /orders and returns response.
pub async fn place_limit_order( &self, req: &PredictLimitOrderRequest, ) -> Result<PredictSubmitResult>
Sourcepub async fn remove_order_ids(&self, ids: &[String]) -> Result<RawApiResponse>
pub async fn remove_order_ids(&self, ids: &[String]) -> Result<RawApiResponse>
Remove orders from orderbook via POST /orders/remove. Input must be order IDs (not hashes).
Trait Implementations§
Source§impl Clone for PredictExecutionClient
impl Clone for PredictExecutionClient
Source§fn clone(&self) -> PredictExecutionClient
fn clone(&self) -> PredictExecutionClient
Returns a duplicate of the value. Read more
1.0.0 · 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 PredictExecutionClient
impl !RefUnwindSafe for PredictExecutionClient
impl Send for PredictExecutionClient
impl Sync for PredictExecutionClient
impl Unpin for PredictExecutionClient
impl UnsafeUnpin for PredictExecutionClient
impl !UnwindSafe for PredictExecutionClient
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