View Source Hyperliquid.Api.Subscription.UserTwapHistory (hyperliquid v0.2.2)
WebSocket subscription for user TWAP history.
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
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.
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.
@spec changeset(t(), map()) :: Ecto.Changeset.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.