View Source Hyperliquid.Api.Subscription.UserHistoricalOrders (hyperliquid v0.2.2)

WebSocket subscription for historical order updates.

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions

Summary

Functions

Returns postgres table configurations (multi-table support).

Returns storage configuration for this subscription.

Returns metadata about this subscription endpoint.

Build a cache key from event data using the configured pattern.

Build and validate a subscription request.

Returns true if cache storage is enabled.

Returns the configured cache fields for partial storage, or nil for all fields.

Returns the cache TTL if configured.

Generate a unique subscription key for this parameter set.

Returns true if postgres storage is enabled.

Returns the configured postgres fields for partial storage, or nil for all fields.

Returns the postgres table name if configured (primary table for legacy support).

Returns true if any storage backend is enabled.

Types

@type request_params() :: %{user: term()}
@type t() :: %Hyperliquid.Api.Subscription.UserHistoricalOrders{orders: term()}

Functions

Returns postgres table configurations (multi-table support).

Returns storage configuration for this subscription.

Returns metadata about this subscription endpoint.

Link to this function

build_cache_key(event_data)

View Source

Build a cache key from event data using the configured pattern.

Returns nil if cache is not enabled or no pattern is configured.

@spec build_request(map()) :: {:ok, map()} | {:error, Ecto.Changeset.t()}
@spec build_request(map()) :: {:ok, map()} | {:error, Ecto.Changeset.t()}

Build and validate a subscription request.

Parameters

  • params - Map with keys: [:user]

Returns

  • {:ok, request_map} - Valid subscription request
  • {:error, changeset} - Validation errors

Returns true if cache storage is enabled.

Returns the configured cache fields for partial storage, or nil for all fields.

Returns the cache TTL if configured.

Link to this function

changeset(event \\ %__MODULE__{}, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Link to this function

generate_subscription_key(params)

View Source
@spec generate_subscription_key(map()) :: String.t()

Generate a unique subscription key for this parameter set.

Parameters

  • params - Map of subscription parameters

Returns

String key that uniquely identifies this subscription variant.

Returns true if postgres storage is enabled.

Returns the configured postgres fields for partial storage, or nil for all fields.

Returns the postgres table name if configured (primary table for legacy support).

Returns true if any storage backend is enabled.