Versions in this module Expand all Collapse all v0 v0.1.4 Mar 13, 2026 v0.1.3 Mar 13, 2026 Changes in this version + type OrderStatusValue string + const StatusCanceled + const StatusDelistedCanceled + const StatusFilled + const StatusLiquidatedCanceled + const StatusMarginCanceled + const StatusMinTradeNtlRejected + const StatusOpen + const StatusOpenInterestCapCanceled + const StatusReduceOnlyCanceled + const StatusRejected + const StatusScheduledCancel + const StatusSelfTradeCanceled + const StatusSiblingFilledCanceled + const StatusTickRejected + const StatusTriggered + const StatusVaultWithdrawalCanceled v0.1.2 Mar 13, 2026 v0.1.1 Mar 13, 2026 v0.1.0 Mar 13, 2026 Changes in this version + type AssetContext struct + DayBaseVlm string + DayNtlVlm string + Funding string + ImpactPxs []string + MarkPx string + MidPx string + OpenInterest string + OraclePx string + Premium string + PrevDayPx string + type CancelOrderRequest struct + AssetID int + OrderID int64 + type CancelOrderResponse struct + Statuses hyperliquid.MixedArray + type Candle struct + C string + H string + I string + L string + N int64 + O string + S string + T int64 + TClose int64 + V string + type CandleSnapshotRequest struct + Coin string + EndTime int64 + Interval string + StartTime int64 + type Client struct + func NewClient(base *hyperliquid.Client) *Client + func (c *Client) AllMids(ctx context.Context) (map[string]string, error) + func (c *Client) CancelOrder(ctx context.Context, req CancelOrderRequest) (*string, error) + func (c *Client) CandleSnapshot(ctx context.Context, coin string, interval string, startTime, endTime int64) ([]Candle, error) + func (c *Client) GetAllFundingRates(ctx context.Context) (map[string]string, error) + func (c *Client) GetBalance(ctx context.Context) (*PerpPosition, error) + func (c *Client) GetFundingRate(ctx context.Context, coin string) (*FundingRate, error) + func (c *Client) GetPerpPosition(ctx context.Context) (*PerpPosition, error) + func (c *Client) GetPrepMeta(ctx context.Context) (*PrepMeta, error) + func (c *Client) L2Book(ctx context.Context, coin string) (*L2BookResponse, error) + func (c *Client) ModifyOrder(ctx context.Context, req ModifyOrderRequest) (*OrderStatus, error) + func (c *Client) OrderStatus(ctx context.Context, user string, oid int64) (*OrderStatusInfo, error) + func (c *Client) PlaceOrder(ctx context.Context, req PlaceOrderRequest) (*OrderStatus, error) + func (c *Client) UpdateIsolatedMargin(ctx context.Context, req UpdateIsolatedMarginRequest) error + func (c *Client) UpdateLeverage(ctx context.Context, req UpdateLeverageRequest) error + func (c *Client) UserFills(ctx context.Context, user string) ([]UserFill, error) + func (c *Client) UserOpenOrders(ctx context.Context, user string) ([]Order, error) + type FundingRate struct + Coin string + FundingIntervalHours int64 + FundingRate string + FundingTime int64 + NextFundingTime int64 + type L2BookResponse struct + Coin string + Levels [][]L2Level + Time int64 + type L2Level struct + N int + Px string + Sz string + type MetaAndAssetCtxsResponse []AssetContext + type ModifyOrderRequest struct + Cloid *string + Oid *int64 + Order PlaceOrderRequest + type ModifyOrderResponse struct + Statuses []OrderStatus + type Order struct + Coin string + LimitPx string + Oid int64 + OrigSz string + Side string + Sz string + Timestamp int64 + type OrderFilled struct + AvgPx string + Oid int + TotalSz string + type OrderResting struct + ClientID *string + Oid int64 + Status string + type OrderStatus struct + Error *string + Filled *OrderFilled + Resting *OrderResting + type OrderStatusInfo struct + AvgPx string + CancelReason string + Coin string + FilledSz string + LimitPx string + Oid int64 + OrigSz string + Side string + Status string + Sz string + Timestamp int64 + type OrderStatusQueryResponse struct + OrderStatus OrderStatusInfo + type OrderType struct + Limit *OrderTypeLimit + Trigger *OrderTypeTrigger + type OrderTypeLimit struct + Tif hyperliquid.Tif + type OrderTypeTrigger struct + IsMarket bool + Tpsl hyperliquid.Tpsl + TriggerPx float64 + type PerpPosition struct + AssetPositions []struct{ ... } + CrossMaintenanceMarginUsed string + CrossMarginSummary struct{ ... } + MarginSummary struct{ ... } + Time int64 + Withdrawable string + type PlaceOrderRequest struct + AssetID int + ClientOrderID *string + IsBuy bool + OrderType OrderType + Price float64 + ReduceOnly bool + Size float64 + type PlaceOrderResponse struct + Statuses []OrderStatus + type PrepMeta struct + Universe []struct{ ... } + type UpdateIsolatedMarginRequest struct + Amount float64 + AssetID int + IsBuy bool + type UpdateIsolatedMarginResponse struct + Type string + type UpdateLeverageRequest struct + AssetID int + IsCross bool + Leverage int + type UpdateLeverageResponse struct + Type string + type UserFill struct + ClosedPnl string + Coin string + Crossed bool + Dir string + Fee string + FeeToken string + Hash string + Oid int64 + Px string + Side string + StartPosition string + Sz string + Tid int64 + Time int64 + type WebsocketClient struct + func NewWebsocketClient(base *hyperliquid.WebsocketClient) *WebsocketClient + func (c *WebsocketClient) CancelOrder(ctx context.Context, req CancelOrderRequest) (chan hyperliquid.PostResult, error) + func (c *WebsocketClient) ModifyOrder(ctx context.Context, req ModifyOrderRequest) (chan hyperliquid.PostResult, error) + func (c *WebsocketClient) PlaceOrder(ctx context.Context, req PlaceOrderRequest) (chan hyperliquid.PostResult, error) + func (c *WebsocketClient) SubscribeBbo(coin string, handler func(hyperliquid.WsBbo)) error + func (c *WebsocketClient) SubscribeL2Book(coin string, handler func(hyperliquid.WsL2Book)) error + func (c *WebsocketClient) SubscribeOrderUpdates(user string, handler func([]hyperliquid.WsOrderUpdate)) error + func (c *WebsocketClient) SubscribeTrades(coin string, handler func([]hyperliquid.WsTrade)) error + func (c *WebsocketClient) SubscribeUserEvents(user string, handler func(hyperliquid.WsUserEvent)) error + func (c *WebsocketClient) SubscribeUserFills(user string, handler func(hyperliquid.WsUserFills)) error + func (c *WebsocketClient) SubscribeWebData2(user string, handler func(PerpPosition)) error + func (c *WebsocketClient) UnsubscribeBbo(coin string) error + func (c *WebsocketClient) UnsubscribeL2Book(coin string) error + func (c *WebsocketClient) UnsubscribeTrades(coin string) error + func (c *WebsocketClient) WithCredentials(privateKey, accountAddr string) *WebsocketClient