pub struct ExchangeAction {
pub action_type: ExchangeActionType,
pub params: ExchangeActionParams,
}Expand description
Represents an exchange action wrapper for POST /exchange.
Fields§
§action_type: ExchangeActionType§params: ExchangeActionParamsImplementations§
Source§impl ExchangeAction
impl ExchangeAction
Sourcepub fn order(
orders: Vec<HyperliquidExecPlaceOrderRequest>,
builder: Option<HyperliquidExecBuilderFee>,
) -> Self
pub fn order( orders: Vec<HyperliquidExecPlaceOrderRequest>, builder: Option<HyperliquidExecBuilderFee>, ) -> Self
Creates an action to place orders with builder attribution.
Sourcepub fn cancel(cancels: Vec<HyperliquidExecCancelByCloidRequest>) -> Self
pub fn cancel(cancels: Vec<HyperliquidExecCancelByCloidRequest>) -> Self
Creates an action to cancel orders.
Sourcepub fn cancel_by_cloid(
cancels: Vec<HyperliquidExecCancelByCloidRequest>,
) -> Self
pub fn cancel_by_cloid( cancels: Vec<HyperliquidExecCancelByCloidRequest>, ) -> Self
Creates an action to cancel orders by client order ID.
Sourcepub fn modify(request: HyperliquidExecModifyOrderRequest) -> Self
pub fn modify(request: HyperliquidExecModifyOrderRequest) -> Self
Creates an action to modify an order.
Sourcepub fn update_leverage(asset: u32, is_cross: bool, leverage: u32) -> Self
pub fn update_leverage(asset: u32, is_cross: bool, leverage: u32) -> Self
Creates an action to update leverage for an asset.
Sourcepub fn update_isolated_margin(asset: u32, is_buy: bool, ntli: i64) -> Self
pub fn update_isolated_margin(asset: u32, is_buy: bool, ntli: i64) -> Self
Creates an action to update isolated margin for an asset.
Trait Implementations§
Source§impl Clone for ExchangeAction
impl Clone for ExchangeAction
Source§fn clone(&self) -> ExchangeAction
fn clone(&self) -> ExchangeAction
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 moreSource§impl Debug for ExchangeAction
impl Debug for ExchangeAction
Auto Trait Implementations§
impl Freeze for ExchangeAction
impl RefUnwindSafe for ExchangeAction
impl Send for ExchangeAction
impl Sync for ExchangeAction
impl Unpin for ExchangeAction
impl UnsafeUnpin for ExchangeAction
impl UnwindSafe for ExchangeAction
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