pub enum HyperliquidExecAction {
Order {
orders: Vec<HyperliquidExecPlaceOrderRequest>,
grouping: HyperliquidExecGrouping,
builder: Option<HyperliquidExecBuilderFee>,
},
Cancel {
cancels: Vec<HyperliquidExecCancelOrderRequest>,
},
CancelByCloid {
cancels: Vec<HyperliquidExecCancelByCloidRequest>,
},
Modify {
modify: HyperliquidExecModifyOrderRequest,
},
BatchModify {
modifies: Vec<HyperliquidExecModifyOrderRequest>,
},
ScheduleCancel {
time: Option<u64>,
},
UpdateLeverage {
asset: AssetId,
is_cross: bool,
leverage: u32,
},
UpdateIsolatedMargin {
asset: AssetId,
delta: Decimal,
},
UsdClassTransfer {
from: String,
to: String,
amount: Decimal,
},
TwapPlace {
twap: HyperliquidExecTwapRequest,
},
TwapCancel {
asset: AssetId,
twap_id: u64,
},
Noop,
}Expand description
All possible exchange actions for the Hyperliquid /exchange endpoint.
Each variant corresponds to a specific action type that can be performed through the exchange API. The serialization uses the exact action type names expected by Hyperliquid.
Variants§
Order
Place one or more orders.
Fields
orders: Vec<HyperliquidExecPlaceOrderRequest>List of orders to place.
grouping: HyperliquidExecGroupingGrouping strategy for TP/SL orders.
builder: Option<HyperliquidExecBuilderFee>Optional builder code for attribution.
Cancel
Cancel orders by order ID.
Fields
cancels: Vec<HyperliquidExecCancelOrderRequest>Orders to cancel.
CancelByCloid
Cancel orders by client order ID.
Fields
cancels: Vec<HyperliquidExecCancelByCloidRequest>Orders to cancel by CLOID.
Modify
Modify a single order.
Fields
modify: HyperliquidExecModifyOrderRequestOrder modification specification.
BatchModify
Modify multiple orders atomically.
Fields
modifies: Vec<HyperliquidExecModifyOrderRequest>Multiple order modifications.
ScheduleCancel
Schedule automatic order cancellation (dead man’s switch).
Fields
UpdateLeverage
Update leverage for a position.
Fields
UpdateIsolatedMargin
Update isolated margin for a position.
UsdClassTransfer
Transfer USD between spot and perp accounts.
Fields
TwapPlace
Place a TWAP order.
Fields
twap: HyperliquidExecTwapRequestTWAP order specification.
TwapCancel
Cancel a TWAP order.
Noop
No-operation to invalidate pending nonces.
Trait Implementations§
Source§impl Clone for HyperliquidExecAction
impl Clone for HyperliquidExecAction
Source§fn clone(&self) -> HyperliquidExecAction
fn clone(&self) -> HyperliquidExecAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HyperliquidExecAction
impl Debug for HyperliquidExecAction
Source§impl<'de> Deserialize<'de> for HyperliquidExecAction
impl<'de> Deserialize<'de> for HyperliquidExecAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for HyperliquidExecAction
impl PartialEq for HyperliquidExecAction
Source§impl Serialize for HyperliquidExecAction
impl Serialize for HyperliquidExecAction
impl StructuralPartialEq for HyperliquidExecAction
Auto Trait Implementations§
impl Freeze for HyperliquidExecAction
impl RefUnwindSafe for HyperliquidExecAction
impl Send for HyperliquidExecAction
impl Sync for HyperliquidExecAction
impl Unpin for HyperliquidExecAction
impl UnsafeUnpin for HyperliquidExecAction
impl UnwindSafe for HyperliquidExecAction
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
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>
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>
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