Skip to main content

Module types

Module types 

Source
Expand description

Core types for the Hyperliquid SDK.

These types mirror the Hyperliquid API exactly for byte-identical serialization.

Modules§

const_hex_b128
B128 hex serialization
decimal_normalized
Normalized decimal serialization (removes trailing zeros)
oid_or_cloid
Serde module for OidOrCloid

Structs§

ActionRequest
Signed action request
AgentSetAbstraction
Agent set abstraction
ApproveAgent
Approve agent (API key)
ApproveBuilderFee
Approve builder fee
BatchCancel
Batch cancel
BatchCancelCloid
Batch cancel by client order ID
BatchModify
Batch modification
BatchOrder
Batch of orders
Builder
Builder fee information
CDeposit
Stake (cDeposit)
CWithdraw
Unstake (cWithdraw)
Cancel
Cancel request
CancelByCloid
Cancel by client order ID
ClosePosition
Close position
Modify
Order modification
Noop
No-op (consume nonce)
OrderRequest
Order request for the API
ReserveRequestWeight
Reserve request weight (purchase rate limit capacity)
ScheduleCancel
Schedule cancel (dead-man’s switch)
SendAsset
Send asset
Signature
ECDSA signature (r, s, v format)
SpotSend
Spot token transfer
TokenDelegate
Delegate tokens
TopUpIsolatedOnlyMargin
Top up isolated only margin
TwapCancel
TWAP cancel
TwapOrder
TWAP order
TwapSpec
TWAP order specification
UpdateIsolatedMargin
Update isolated margin
UpdateLeverage
Update leverage
UsdClassTransfer
USD class transfer (perp <-> spot)
UsdSend
USD transfer
UserSetAbstraction
User set abstraction
ValidatorL1Stream
Validator L1 stream (vote on risk-free rate)
VaultTransfer
Vault transfer (deposit/withdraw)
Withdraw3
Withdraw to Arbitrum

Enums§

Action
All possible actions that can be sent to the exchange
Chain
Hyperliquid chain (Mainnet or Testnet)
OrderGrouping
Order grouping for TP/SL attachment
OrderTypePlacement
Order type for placement (limit or trigger)
Side
Order side
TIF
Time in force for orders
TimeInForce
Time in force for the wire format (PascalCase)
TpSl
Take profit or stop loss trigger type

Constants§

CORE_MAINNET_EIP712_DOMAIN
EIP-712 domain for Hyperliquid signing

Type Aliases§

Cloid
Client Order ID - 128-bit unique identifier
OidOrCloid
Either an order ID (u64) or a client order ID (Cloid)