Skip to main content

Module models

Module models 

Source

Structs§

AssetPosition
A single asset position in the clearinghouse state.
ClearinghouseState
Complete clearinghouse state response from POST /info with { "type": "clearinghouseState", "user": "address" }. This provides account positions, margin information, and balances.
Cloid
A 128-bit client order ID represented as a hex string with 0x prefix.
CrossMarginSummary
Cross margin summary information.
CumFundingInfo
Cumulative funding breakdown for a position.
EvmContract
EVM contract information for a spot token.
HyperliquidAssetInfo
Represents asset information from the meta endpoint.
HyperliquidCandle
Represents a single candle (OHLCV bar) from Hyperliquid.
HyperliquidExchangeActionRequest
Typed exchange action request envelope for the /exchange endpoint.
HyperliquidExchangeActionResponse
Typed exchange action response envelope from the /exchange endpoint.
HyperliquidExchangeBuilderFee
Builder code for order attribution in the exchange endpoint.
HyperliquidExchangeCancelByCloidRequest
Cancel specification for canceling orders by client order ID via exchange endpoint.
HyperliquidExchangeCancelOrderRequest
Cancel specification for canceling orders by order ID via exchange endpoint.
HyperliquidExchangeCancelResponseData
Cancel response data containing status for each cancellation from exchange endpoint.
HyperliquidExchangeFilledInfo
Information about a filled order via exchange endpoint.
HyperliquidExchangeLimitParams
Parameters for limit orders in exchange endpoint.
HyperliquidExchangeMergeOutcomeParams
Parameters for the HIP-4 mergeOutcome operation inside a userOutcome action.
HyperliquidExchangeMergeQuestionParams
Parameters for the HIP-4 mergeQuestion operation inside a userOutcome action.
HyperliquidExchangeModifyOrderRequest
Modify specification for modifying existing orders via exchange endpoint.
HyperliquidExchangeModifyResponseData
Modify response data containing status for each modification from exchange endpoint.
HyperliquidExchangeNegateOutcomeParams
Parameters for the HIP-4 negateOutcome operation inside a userOutcome action.
HyperliquidExchangeOrderResponseData
Order response data containing status for each order from exchange endpoint.
HyperliquidExchangePlaceOrderRequest
Order specification for placing orders via exchange endpoint.
HyperliquidExchangeRequest
Represents an exchange action request wrapper for POST /exchange.
HyperliquidExchangeRestingInfo
Information about a resting order via exchange endpoint.
HyperliquidExchangeSplitOutcomeParams
Parameters for the HIP-4 splitOutcome operation inside a userOutcome action.
HyperliquidExchangeTriggerParams
Parameters for trigger orders (stop/take profit) in exchange endpoint.
HyperliquidExchangeTwapRequest
TWAP (Time-Weighted Average Price) order specification for exchange endpoint.
HyperliquidFill
Represents an individual fill from user fills.
HyperliquidFundingHistoryEntry
Represents a single funding history entry from the fundingHistory info endpoint.
HyperliquidL2Book
Represents an L2 order book snapshot from POST /info.
HyperliquidLevel
Represents an order book level with price and size.
HyperliquidMeta
Represents metadata about available markets from POST /info.
HyperliquidOrderInfo
Represents order information within an order status entry.
HyperliquidOrderStatusEntry
Represents an individual order status entry.
HyperliquidRecentTrade
Represents a single trade from the recentTrades info endpoint.
HyperliquidSignature
ECC signature components for Hyperliquid exchange requests.
LeverageInfo
Leverage information for a position.
MarginTable
Margin table with leverage tiers.
MarginTier
Individual margin tier.
OutcomeMarket
A single outcome market from the outcome metadata response.
OutcomeMeta
Complete outcome metadata response from POST /info with { "type": "outcomeMeta" }.
OutcomeQuestion
A multi-outcome priceBucket question referenced by one or more outcomes.
OutcomeSideSpec
A single side specification for an outcome market.
PerpAsset
A single perpetual asset from the universe.
PerpAssetCtx
Runtime context for a perpetual asset (mark prices, funding, etc).
PerpDex
Descriptor for a builder-deployed perp dex from POST /info with { "type": "perpDexs" }.
PerpMeta
Complete perpetuals metadata response from POST /info with { "type": "meta" }.
PositionData
Detailed position data for an asset.
SpotAssetCtx
Runtime context for a spot pair (prices, volumes, etc).
SpotBalance
A single token balance entry from spotClearinghouseState.balances.
SpotClearinghouseState
Complete spot clearinghouse state response from POST /info with { "type": "spotClearinghouseState", "user": "address" }.
SpotMeta
Complete spot metadata response from POST /info with { "type": "spotMeta" }.
SpotPair
A single spot pair from the universe.
SpotToken
A single spot token from the tokens list.

Enums§

HyperliquidExchangeAction
All possible exchange actions for the Hyperliquid /exchange endpoint.
HyperliquidExchangeCancelStatus
Status of an individual order cancellation via exchange endpoint.
HyperliquidExchangeGrouping
Order grouping strategy for linked TP/SL orders in exchange endpoint.
HyperliquidExchangeModifyStatus
Status of an individual order modification via exchange endpoint.
HyperliquidExchangeModifyTarget
Target of a modify request.
HyperliquidExchangeOrderKind
Order kind specification for the t field in exchange endpoint order requests.
HyperliquidExchangeOrderStatus
Status of an individual order submission via exchange endpoint.
HyperliquidExchangeOrderStatusTag
Status tags Hyperliquid serializes as a bare JSON string.
HyperliquidExchangeResponse
Represents an exchange response wrapper from POST /exchange.
HyperliquidExchangeResponseData
Response data containing the actual response payload from exchange endpoint.
HyperliquidExchangeTif
Time-in-force for limit orders in exchange endpoint.
HyperliquidExchangeTpSl
Take profit or stop loss side for trigger orders in exchange endpoint.
HyperliquidExchangeUserOutcomeOp
Operations carried by the HyperliquidExchangeAction::UserOutcome action.
HyperliquidOrderStatus
Represents order status response from POST /info with type: "orderStatus".
PerpMetaAndCtxs
Optional perpetuals metadata with asset contexts from { "type": "metaAndAssetCtxs" }. Returns a tuple: [PerpMeta, Vec<PerpAssetCtx>]
SpotMetaAndCtxs
Optional spot metadata with asset contexts from { "type": "spotMetaAndAssetCtxs" }. Returns a tuple: [SpotMeta, Vec<SpotAssetCtx>]

Constants§

RESPONSE_STATUS_OK
The success status string returned by the Hyperliquid exchange API.

Type Aliases§

AssetId
Asset ID type for Hyperliquid.
HyperliquidCandleSnapshot
Response from candleSnapshot endpoint (returns array directly).
HyperliquidFills
Represents user fills response from POST /info.
OrderId
Order ID assigned by Hyperliquid.