View Source Hyperliquid.Api.Info.WebData2 (hyperliquid v0.4.1)
One-shot REST snapshot of comprehensive user and market data.
Returns a full snapshot equivalent to the webData2 WebSocket subscription,
including clearinghouse state, open orders, vault info, market metadata,
TWAP states, and spot state for the given user.
The subscription-based version lives at
Hyperliquid.Api.Subscription.WebData2. This module is the REST POST
equivalent — useful for an initial load without subscribing to a stream.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint
Usage
{:ok, snapshot} = WebData2.request("0x...")
Summary
Functions
Returns metadata about this endpoint.
Returns postgres table configurations (multi-table support).
Returns storage configuration for this endpoint.
Build a cache key from response data using the configured pattern.
Returns nil if cache is not enabled or no pattern configured.
Build the request payload.
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
Fetch is an alias for request when no storage is configured.
Parse and validate the API response.
Returns true if postgres storage is enabled.
Returns the postgres table name if configured (primary table for legacy support).
Returns the upsert config for postgres (primary table for legacy support).
Get the rate limit cost for this endpoint.
Make the API request and parse the response.
Make the API request, raising on error.
Make the API request and return the raw response map (no key transformation).
Make the API request returning raw map, raising on error.
Returns true if any storage backend is enabled.
Types
@type t() :: %Hyperliquid.Api.Info.WebData2{data: map()}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.WebData2.__endpoint_info__()
%{
endpoint: "webData2",
type: :info,
rate_limit_cost: 20,
params: [:user],
optional_params: [],
doc: "Retrieve one-shot snapshot of comprehensive user and market data",
returns: "Full webData2 snapshot including clearinghouse, orders, vaults, and market data"
}
Returns postgres table configurations (multi-table support).
Returns storage configuration for this endpoint.
Build a cache key from response data using the configured pattern.
Returns nil if cache is not enabled or no pattern configured.
Build the request payload.
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Fetch is an alias for request when no storage is configured.
Parse and validate the API response.
Returns true if postgres storage is enabled.
Returns the postgres table name if configured (primary table for legacy support).
Returns the upsert config for postgres (primary table for legacy support).
@spec rate_limit_cost() :: non_neg_integer()
Get the rate limit cost for this endpoint.
Make the API request and parse the response.
Make the API request, raising on error.
Make the API request and return the raw response map (no key transformation).
Make the API request returning raw map, raising on error.
Returns true if any storage backend is enabled.