{"modulePath":"github.com/QuantProcessing/exchanges","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package hyperliquid\n\n## Constants\n\n```go\nconst (\n\tMainnetAPIURL = \"https://api.hyperliquid.xyz\"\n)\n```\n\n## Variables\n\n```go\nvar ErrCredentialsRequired = fmt.Errorf(\"credentials required\")\n```\n\n## Functions\n\n```go\nfunc FloatToString(x float64) (string, error)\n```\n\n```go\nfunc FloatToUsdInt(value float64) int\n```\nFloatToUsdInt converts float to USD integer representation\n\n```go\nfunc GetTimestampMs() int64\n```\nGetTimestampMs returns current timestamp in milliseconds\n\n```go\nfunc IsWalletDoesNotExistError(err error) bool\n```\nIsWalletDoesNotExistError checks if the error is a \"wallet does not exist\" error from the API\n\n## Types\n\n```go\ntype APIError struct {\n\tCode    int    `json:\"code\"`\n\tMessage string `json:\"msg\"`\n\tData    any    `json:\"data,omitempty\"`\n}\n```\n\n```go\nfunc (e APIError) Error() string\n```\n\n```go\ntype APIResponse[T any] struct {\n\tStatus   string `json:\"status\"`\n\tResponse *struct {\n\t\tType string `json:\"type\"`\n\t\tData T      `json:\"data\"`\n\t} `json:\"response\"`\n}\n```\n\n```go\ntype ActiveStakingDiscount struct {\n\tBpsOfMaxSupply string `json:\"bpsOfMaxSupply\"`\n\tDiscount       string `json:\"discount\"`\n}\n```\n\n```go\ntype BatchModifyAction struct {\n\tType     string              `json:\"type\"     msgpack:\"type\"`\n\tModifies []ModifyOrderAction `json:\"modifies\" msgpack:\"modifies\"`\n}\n```\n\n```go\ntype Builder struct {\n\tBuilder string `json:\"b\" msgpack:\"b\"`\n\tFee     int    `json:\"f\" msgpack:\"f\"`\n}\n```\n\n```go\ntype CancelOrderAction struct {\n\tType    string            `json:\"type\" msgpack:\"type\"`\n\tCancels []CancelOrderWire `json:\"cancels\" msgpack:\"cancels\"`\n}\n```\ncancel order\n\n```go\ntype CancelOrderWire struct {\n\tAsset   int   `json:\"a\" msgpack:\"a\"`\n\tOrderId int64 `json:\"o\" msgpack:\"o\"`\n}\n```\n\n```go\ntype Client struct {\n\tLogger  *zap.SugaredLogger\n\tDebug   bool\n\tBaseURL string\n\tHttp    *http.Client\n\n\tPrivateKey  *ecdsa.PrivateKey\n\tVault       string\n\tAccountAddr string\n\n\tLastNonce    atomic.Int64\n\tExpiresAfter *int64\n}\n```\n\n```go\nfunc NewClient() *Client\n```\n\n```go\nfunc (c *Client) GetNextNonce() int64\n```\n\n```go\nfunc (c *Client) GetUserFees(ctx context.Context) (*UserFees, error)\n```\n\n```go\nfunc (c *Client) Post(ctx context.Context, path string, payload any) ([]byte, error)\n```\n\n```go\nfunc (c *Client) PostAction(ctx context.Context, action any, sig SignatureResult, nonce int64) ([]byte, error)\n```\n\n```go\nfunc (c *Client) WithAccount(accountAddr string) *Client\n```\n\n```go\nfunc (c *Client) WithCredentials(privateKey string, vault *string) *Client\n```\n\n```go\ntype CreateOrderAction struct {\n\tType     string      `json:\"type\" msgpack:\"type\"`\n\tOrders   []OrderWire `json:\"orders\" msgpack:\"orders\"`\n\tGrouping string      `json:\"grouping,omitempty\" msgpack:\"grouping,omitempty\"`\n\tBuilder  *Builder    `json:\"builder,omitempty\" msgpack:\"builder,omitempty\"`\n}\n```\n\n```go\ntype DailyUserVlm struct {\n\tDate      string `json:\"date\"`\n\tUserCross string `json:\"userCross\"`\n\tUserAdd   string `json:\"userAdd\"`\n\tExchange  string `json:\"exchange\"`\n}\n```\n\n```go\ntype FeeSchedule struct {\n\tCross                  string                `json:\"cross\"`\n\tAdd                    string                `json:\"add\"`\n\tSpotCross              string                `json:\"spotCross\"`\n\tSpotAdd                string                `json:\"spotAdd\"`\n\tTiers                  Tiers                 `json:\"tiers\"`\n\tReferralDiscount       string                `json:\"referralDiscount\"`\n\tStakingDiscountTiers   []StakingDiscountTier `json:\"stakingDiscountTiers\"`\n\tUserCrossRate          string                `json:\"userCrossRate\"`\n\tUserAddRate            string                `json:\"userAddRate\"`\n\tUserSpotCrossRate      string                `json:\"userSpotCrossRate\"`\n\tUserSpotAddRate        string                `json:\"userSpotAddRate\"`\n\tActiveReferralDiscount string                `json:\"activeReferralDiscount\"`\n\tFeeTrialReward         string                `json:\"feeTrialReward\"`\n\tStakingLink            StakingLink           `json:\"stakingLink\"`\n\tActiveStakingDiscount  ActiveStakingDiscount `json:\"activeStakingDiscount\"`\n}\n```\n\n```go\ntype Grouping string\n```\n\n```go\nconst (\n\tGroupingNA           Grouping = \"na\"\n\tGroupingNormalTpsl   Grouping = \"normalTpsl\"\n\tGroupingPositionTpls Grouping = \"positionTpsl\"\n)\n```\n\n```go\ntype MM struct {\n\tMakerFractionCutoff string `json:\"makerFractionCutoff\"`\n\tAdd                 string `json:\"add\"`\n}\n```\n\n```go\ntype MixedArray []MixedValue\n```\n\n```go\nfunc (ma MixedArray) FirstError() error\n```\n\n```go\nfunc (ma *MixedArray) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MixedValue json.RawMessage\n```\n\n```go\nfunc (mv *MixedValue) Array() ([]json.RawMessage, bool)\n```\n\n```go\nfunc (mv MixedValue) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (mv *MixedValue) Object() (map[string]any, bool)\n```\n\n```go\nfunc (mv *MixedValue) Parse(v any) error\n```\n\n```go\nfunc (mv *MixedValue) String() (string, bool)\n```\n\n```go\nfunc (mv *MixedValue) Type() string\n```\n\n```go\nfunc (mv *MixedValue) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ModifyOrderAction struct {\n\tType  string    `json:\"type,omitempty\" msgpack:\"type,omitempty\"`\n\tOid   any       `json:\"oid\"            msgpack:\"oid\"`\n\tOrder OrderWire `json:\"order\"          msgpack:\"order\"`\n}\n```\nmodify order\n\n```go\ntype OrderStatusValue string\n```\nOrderStatusValue represents the status string returned by the Hyperliquid API. Used in both REST and WS order responses for perp and spot markets. See: [https://hyperliquid.gitbook.io/hyperliquid-docs](https://hyperliquid.gitbook.io/hyperliquid-docs)\n\n```go\nconst (\n\tStatusOpen                    OrderStatusValue = \"open\"\n\tStatusFilled                  OrderStatusValue = \"filled\"\n\tStatusCanceled                OrderStatusValue = \"canceled\"\n\tStatusTriggered               OrderStatusValue = \"triggered\"\n\tStatusRejected                OrderStatusValue = \"rejected\"\n\tStatusMarginCanceled          OrderStatusValue = \"marginCanceled\"\n\tStatusVaultWithdrawalCanceled OrderStatusValue = \"vaultWithdrawalCanceled\"\n\tStatusOpenInterestCapCanceled OrderStatusValue = \"openInterestCapCanceled\"\n\tStatusSelfTradeCanceled       OrderStatusValue = \"selfTradeCanceled\"\n\tStatusReduceOnlyCanceled      OrderStatusValue = \"reduceOnlyCanceled\"\n\tStatusSiblingFilledCanceled   OrderStatusValue = \"siblingFilledCanceled\"\n\tStatusDelistedCanceled        OrderStatusValue = \"delistedCanceled\"\n\tStatusLiquidatedCanceled      OrderStatusValue = \"liquidatedCanceled\"\n\tStatusScheduledCancel         OrderStatusValue = \"scheduledCancel\"\n\tStatusTickRejected            OrderStatusValue = \"tickRejected\"\n\tStatusMinTradeNtlRejected     OrderStatusValue = \"minTradeNtlRejected\"\n)\n```\n\n```go\ntype OrderTypeWire struct {\n\tLimit   *OrderTypeWireLimit   `json:\"limit,omitempty\"   msgpack:\"limit,omitempty\"`\n\tTrigger *OrderTypeWireTrigger `json:\"trigger,omitempty\" msgpack:\"trigger,omitempty\"`\n}\n```\n\n```go\ntype OrderTypeWireLimit struct {\n\tTif Tif `json:\"tif\" msgpack:\"tif\"`\n}\n```\n\n```go\ntype OrderTypeWireTrigger struct {\n\tIsMarket  bool   `json:\"isMarket\"  msgpack:\"isMarket\"`  // 1st\n\tTriggerPx string `json:\"triggerPx\" msgpack:\"triggerPx\"` // 2nd - Must be string for msgpack serialization\n\tTpsl      Tpsl   `json:\"tpsl\"      msgpack:\"tpsl\"`      // 3rd - \"tp\" or \"sl\"\n}\n```\n\n```go\ntype OrderWire struct {\n\tAsset      int           `json:\"a\"           msgpack:\"a\"`           // 1st\n\tIsBuy      bool          `json:\"b\"           msgpack:\"b\"`           // 2nd\n\tLimitPx    string        `json:\"p\"           msgpack:\"p\"`           // 3rd\n\tSize       string        `json:\"s\"           msgpack:\"s\"`           // 4th\n\tReduceOnly bool          `json:\"r\"           msgpack:\"r\"`           // 5th\n\tOrderType  OrderTypeWire `json:\"t\"           msgpack:\"t\"`           // 6th\n\tCloid      *string       `json:\"c,omitempty\" msgpack:\"c,omitempty\"` // 7th (optional)\n}\n```\ncreate order\n\n```go\ntype PostResult struct {\n\tResponse WsPostResponsePayload\n\tError    error\n}\n```\n\n```go\ntype Side string\n```\n\n```go\nconst (\n\tSideAsk Side = \"A\"\n\tSideBid Side = \"B\"\n)\n```\n\n```go\ntype SignatureResult struct {\n\tR string `json:\"r\"`\n\tS string `json:\"s\"`\n\tV int    `json:\"v\"`\n}\n```\nSignatureResult represents the structured signature result\n\n```go\nfunc SignAgent(\n\tprivateKey *ecdsa.PrivateKey,\n\tagentAddress, agentName string,\n\tnonce int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignAgent signs agent approval action using EIP-712 direct signing\n\n```go\nfunc SignApproveBuilderFee(\n\tprivateKey *ecdsa.PrivateKey,\n\tbuilderAddress string,\n\tmaxFeeRate float64,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignApproveBuilderFee signs approve builder fee action\n\n```go\nfunc SignConvertToMultiSigUserAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tsigners []string,\n\tthreshold int,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignConvertToMultiSigUserAction signs convert to multi-sig user action\n\n```go\nfunc SignL1Action(\n\tprivateKey *ecdsa.PrivateKey,\n\taction any,\n\tvaultAddress string,\n\ttimestamp int64,\n\texpiresAfter *int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\n\n```go\nfunc SignMultiSigAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tinnerAction map[string]any,\n\tsigners []string,\n\tsignatures []string,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignMultiSigAction signs multi-signature action\n\n```go\nfunc SignPerpDexClassTransferAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tdex, token string,\n\tamount float64,\n\ttoPerp bool,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignPerpDexClassTransferAction signs perp dex class transfer action\n\n```go\nfunc SignSpotTransferAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tamount float64,\n\tdestination, token string,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignSpotTransferAction signs spot transfer action\n\n```go\nfunc SignTokenDelegateAction(\n\tprivateKey *ecdsa.PrivateKey,\n\ttoken string,\n\tamount float64,\n\tvalidatorAddress string,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignTokenDelegateAction signs token delegate action\n\n```go\nfunc SignUsdClassTransferAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tamount float64,\n\ttoPerp bool,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignUsdClassTransferAction signs USD class transfer action\n\n```go\nfunc SignUsdTransferAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tamount float64,\n\tdestination string,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignUsdTransferAction signs USD transfer action\n\n```go\nfunc SignUserSignedAction(\n\tprivateKey *ecdsa.PrivateKey,\n\taction map[string]any,\n\tpayloadTypes []apitypes.Type,\n\tprimaryType string,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignUserSignedAction signs actions that require direct EIP-712 signing (e.g., approveAgent, approveBuilderFee, convertToMultiSigUser)\n\nIMPORTANT: The message will contain MORE fields than declared in payloadTypes to avoid the error \"422 Failed to deserialize the JSON body\" and \"User or API Wallet 0x123... does not exist\". This matches Python SDK behavior where the field order doesn't matter and extra fields (type, signatureChainId) are present in the message but ignored during EIP-712 hashing via hashStructLenient.\n\n```go\nfunc SignWithdrawFromBridgeAction(\n\tprivateKey *ecdsa.PrivateKey,\n\tdestination string,\n\tamount, fee float64,\n\ttimestamp int64,\n\tisMainnet bool,\n) (SignatureResult, error)\n```\nSignWithdrawFromBridgeAction signs withdraw from bridge action\n\n```go\ntype StakingDiscountTier struct {\n\tBpsOfMaxSupply string `json:\"bpsOfMaxSupply\"`\n\tDiscount       string `json:\"discount\"`\n}\n```\n\n```go\ntype StakingLink struct {\n\tType        string `json:\"type\"`\n\tStakingUser string `json:\"stakingUser\"`\n}\n```\n\n```go\ntype Tiers struct {\n\tVip []Vip `json:\"vip\"`\n\tMM  []MM  `json:\"mm\"`\n}\n```\n\n```go\ntype Tif string\n```\n\n```go\nconst (\n\tTifGtc Tif = \"Gtc\"\n\tTifIoc Tif = \"Ioc\"\n\tTifFok Tif = \"Fok\"\n)\n```\n\n```go\ntype Tpsl string\n```\n\n```go\nconst (\n\tTakeProfit Tpsl = \"tp\"\n\tStopLoss   Tpsl = \"sl\"\n)\n```\n\n```go\ntype UpdateIsolatedMarginAction struct {\n\tType  string `json:\"type\"  msgpack:\"type\"`\n\tAsset int    `json:\"asset\" msgpack:\"asset\"`\n\tIsBuy bool   `json:\"isBuy\" msgpack:\"isBuy\"`\n\tNtli  int    `json:\"ntli\"  msgpack:\"ntli\"`\n}\n```\nupdate isolated margin\n\n```go\ntype UpdateLeverageAction struct {\n\tType     string `json:\"type\"     msgpack:\"type\"`\n\tAsset    int    `json:\"asset\"    msgpack:\"asset\"`\n\tIsCross  bool   `json:\"isCross\"  msgpack:\"isCross\"`\n\tLeverage int    `json:\"leverage\" msgpack:\"leverage\"`\n}\n```\nupdate leverage\n\n```go\ntype UsdClassTransferAction struct {\n\tType   string  `json:\"type\"   msgpack:\"type\"`\n\tAmount float64 `json:\"amount\" msgpack:\"amount\"`\n\tToPerp bool    `json:\"toPerp\" msgpack:\"toPerp\"`\n}\n```\n\n```go\ntype UserFees struct {\n\tDailyUserVlm []DailyUserVlm `json:\"dailyUserVlm\"`\n\tFeeSchedule  FeeSchedule    `json:\"feeSchedule\"`\n}\n```\n\n```go\ntype ValidationError struct {\n\tField   string\n\tMessage string\n}\n```\n\n```go\nfunc (e ValidationError) Error() string\n```\n\n```go\ntype Vip struct {\n\tNtlCutoff string `json:\"ntlCutoff\"`\n\tCross     string `json:\"cross\"`\n\tAdd       string `json:\"add\"`\n\tSpotCross string `json:\"spotCross\"`\n\tSpotAdd   string `json:\"spotAdd\"`\n}\n```\n\n```go\ntype WebsocketClient struct {\n\tURL     string\n\tConn    *websocket.Conn\n\tMu      sync.RWMutex\n\tWriteMu sync.Mutex\n\n\tReconnectWait time.Duration\n\tDebug         bool\n\tLogger        *zap.SugaredLogger\n\n\tPrivateKey  *ecdsa.PrivateKey\n\tVault       string\n\tAccountAddr string\n\n\tLastNonce    atomic.Int64\n\tNextPostID   atomic.Int64\n\tPostChannels map[int64]chan PostResult\n\n\tPingInterval time.Duration\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewWebsocketClient(ctx context.Context) *WebsocketClient\n```\n\n```go\nfunc (c *WebsocketClient) Close()\n```\n\n```go\nfunc (c *WebsocketClient) Connect() error\n```\n\n```go\nfunc (c *WebsocketClient) GetNextNonce() int64\n```\n\n```go\nfunc (c *WebsocketClient) PostAction(action any, sig SignatureResult, nonce int64) (chan PostResult, error)\n```\n\n```go\nfunc (c *WebsocketClient) PostRequest(payload WsPostRequestPayload) (chan PostResult, error)\n```\n\n```go\nfunc (c *WebsocketClient) SendCommand(cmd any) error\n```\nSendCommand sends a raw JSON command\n\n```go\nfunc (c *WebsocketClient) Subscribe(channel string, subscription any, handler func(WsMessage)) error\n```\nSubscribe registers a handler for a specific channel name and optionally sends a subscription request.\n\n```go\nfunc (c *WebsocketClient) Unsubscribe(channel string, subscription any) error\n```\nUnsubscribe removes a handler and optionally sends unsubscribe command\n\n```go\nfunc (c *WebsocketClient) WithCredentials(privateKey string, vault *string) *WebsocketClient\n```\n\n```go\nfunc (c *WebsocketClient) WithURL(u string) *WebsocketClient\n```\n\n```go\ntype WsAllMids struct {\n\tMids map[string]string `json:\"mids\"`\n}\n```\n\n```go\ntype WsBbo struct {\n\tCoin string    `json:\"coin\"`\n\tTime int64     `json:\"time\"`\n\tBbo  []WsLevel `json:\"bbo\"`\n}\n```\n\n```go\ntype WsCandle struct {\n\tT      int64  `json:\"t\"` // Open time\n\tTClose int64  `json:\"T\"` // Close time\n\tS      string `json:\"s\"` // Symbol/Coin\n\tI      string `json:\"i\"` // Interval\n\tO      string `json:\"o\"` // Open\n\tC      string `json:\"c\"` // Close\n\tH      string `json:\"h\"` // High\n\tL      string `json:\"l\"` // Low\n\tV      string `json:\"v\"` // Volume\n\tN      int64  `json:\"n\"` // Number of trades\n}\n```\n\n```go\ntype WsL2Book struct {\n\tCoin   string      `json:\"coin\"`\n\tLevels [][]WsLevel `json:\"levels\"`\n\tTime   int64       `json:\"time\"`\n}\n```\n\n```go\ntype WsLevel struct {\n\tPx string `json:\"px\"`\n\tSz string `json:\"sz\"`\n\tN  int    `json:\"n\"`\n}\n```\n\n```go\ntype WsLiquidation struct {\n\tLid                    int64  `json:\"lid\"`\n\tLiquidator             string `json:\"liquidator\"`\n\tLiquidatedUser         string `json:\"liquidated_user\"`\n\tLiquidatedNtlPos       string `json:\"liquidated_ntl_pos\"`\n\tLiquidatedAccountValue string `json:\"liquidated_account_value\"`\n}\n```\n\n```go\ntype WsMessage struct {\n\tChannel string          `json:\"channel\"`\n\tData    json.RawMessage `json:\"data\"`\n}\n```\n\n```go\ntype WsNonUserCancel struct {\n\tCoin string `json:\"coin\"`\n\tOid  int64  `json:\"oid\"`\n}\n```\n\n```go\ntype WsOrder struct {\n\tCoin      string `json:\"coin\"`\n\tSide      string `json:\"side\"`\n\tLimitPx   string `json:\"limitPx\"`\n\tSz        string `json:\"sz\"`\n\tOid       int64  `json:\"oid\"`\n\tTimestamp int64  `json:\"timestamp\"`\n\tOrigSz    string `json:\"origSz\"`\n\tCliod     string `json:\"cloid\"`\n}\n```\n\n```go\ntype WsOrderUpdate struct {\n\tOrder           WsOrder          `json:\"order\"`\n\tStatus          OrderStatusValue `json:\"status\"`\n\tStatusTimestamp int64            `json:\"statusTimestamp\"`\n}\n```\n\n```go\ntype WsPostRequest struct {\n\tMethod  string               `json:\"method\"`\n\tID      int64                `json:\"id\"`\n\tRequest WsPostRequestPayload `json:\"request\"`\n}\n```\n\n```go\ntype WsPostRequestPayload struct {\n\tType    string `json:\"type\"`\n\tPayload any    `json:\"payload\"`\n}\n```\n\n```go\ntype WsPostResponse struct {\n\tID       int64                 `json:\"id\"`\n\tResponse WsPostResponsePayload `json:\"response\"`\n}\n```\n\n```go\ntype WsPostResponsePayload struct {\n\tType    string          `json:\"type\"` // \"info\", \"action\", \"error\"\n\tPayload json.RawMessage `json:\"payload\"`\n}\n```\n\n```go\ntype WsSubscribeRequest struct {\n\tMethod       string `json:\"method\"`\n\tSubscription any    `json:\"subscription\"`\n}\n```\n\n```go\ntype WsSubscriptionResponse struct {\n\tMethod       string          `json:\"method\"`\n\tSubscription json.RawMessage `json:\"subscription\"`\n}\n```\n\n```go\ntype WsTrade struct {\n\tCoin  string   `json:\"coin\"`\n\tSide  string   `json:\"side\"`\n\tPx    string   `json:\"px\"`\n\tSz    string   `json:\"sz\"`\n\tHash  string   `json:\"hash\"`\n\tTime  int64    `json:\"time\"`\n\tTid   int64    `json:\"tid\"` // Trade ID\n\tUsers []string `json:\"users\"`\n}\n```\n\n```go\ntype WsUserEvent struct {\n\tFills         []WsUserFill      `json:\"fills,omitempty\"`\n\tFunding       *WsUserFunding    `json:\"funding,omitempty\"`\n\tLiquidation   *WsLiquidation    `json:\"liquidation,omitempty\"`\n\tNonUserCancel []WsNonUserCancel `json:\"nonUserCancel,omitempty\"`\n}\n```\n\n```go\ntype WsUserFill struct {\n\tCoin          string         `json:\"coin\"`\n\tPx            string         `json:\"px\"`\n\tSz            string         `json:\"sz\"`\n\tSide          string         `json:\"side\"`\n\tTime          int64          `json:\"time\"`\n\tStartPosition string         `json:\"startPosition\"`\n\tDir           string         `json:\"dir\"`\n\tClosedPnl     string         `json:\"closedPnl\"`\n\tHash          string         `json:\"hash\"`\n\tOid           int64          `json:\"oid\"`\n\tCrossed       bool           `json:\"crossed\"`\n\tFee           string         `json:\"fee\"`\n\tFeeToken      string         `json:\"feeToken\"`\n\tTid           int64          `json:\"tid\"`\n\tBuilderFee    string         `json:\"builderFee,omitempty\"`\n\tLiquidation   *WsLiquidation `json:\"liquidation,omitempty\"`\n}\n```\n\n```go\ntype WsUserFills struct {\n\tIsSnapshot bool         `json:\"isSnapshot,omitempty\"`\n\tUser       string       `json:\"user\"`\n\tFills      []WsUserFill `json:\"fills\"`\n}\n```\n\n```go\ntype WsUserFunding struct {\n\tTime        int64  `json:\"time\"`\n\tCoin        string `json:\"coin\"`\n\tUsdc        string `json:\"usdc\"`\n\tSzi         string `json:\"szi\"`\n\tFundingRate string `json:\"fundingRate\"`\n}\n```\n\n```go\ntype WsUserLiquidations struct {\n\tTid  int64  `json:\"tid\"`\n\tCoin string `json:\"coin\"`\n\tUsdc string `json:\"usdc\"`\n\tSz   string `json:\"sz\"`\n\tPx   string `json:\"px\"`\n\tTime int64  `json:\"time\"`\n}\n```\n\n```go\ntype WsUserNonFundingLedgerUpdates struct {\n\tTime int64  `json:\"time\"`\n\tCoin string `json:\"coin\"`\n\tUsdc string `json:\"usdc\"`\n\tType string `json:\"type\"` // e.g. \"deposit\", \"withdraw\", \"transfer\", \"internal_transfer\", \"subaccount_transfer\"\n}\n```\n\n","path":"github.com/QuantProcessing/exchanges/sdk/hyperliquid","name":"hyperliquid","synopsis":"","isRedistributable":true}
