View Source Hyperliquid.Api.Info.IsVip (hyperliquid v0.2.2)
VIP status check for a user.
Returns whether a user has VIP status and associated benefits.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint
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.
Creates a changeset for VIP status data.
Get fee rates if available.
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.
Get the VIP tier.
Check if user is a VIP.
Types
@type t() :: %Hyperliquid.Api.Info.IsVip{ is_vip: boolean(), maker_rate: String.t() | nil, taker_rate: String.t() | nil, vip_tier: non_neg_integer() | nil }
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.IsVip.__endpoint_info__()
%{
endpoint: "isVip",
type: :info,
rate_limit_cost: 1,
params: [:user],
optional_params: [],
doc: "Check VIP status for a user",
returns: "VIP status with tier and fee rates if applicable"
}
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() | boolean()) :: Ecto.Changeset.t()
Creates a changeset for VIP status data.
Parameters
vip: The VIP status structattrs: Map or boolean value from API response
Returns
Ecto.Changeset.t()
Get fee rates if available.
Parameters
vip: The VIP status struct
Returns
{:ok, %{maker: String.t(), taker: String.t()}}if available{:error, :not_available}if not available
Fetch is an alias for request when no storage is configured.
@spec parse_response(boolean() | nil | map()) :: {:ok, t()} | {:error, term()}
@spec parse_response(map()) :: {:ok, t()} | {:error, term()}
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.
@spec tier(t()) :: {:ok, non_neg_integer()} | {:error, :not_vip | :no_tier}
Get the VIP tier.
Parameters
vip: The VIP status struct
Returns
{:ok, non_neg_integer()}if VIP with tier{:error, :not_vip}if not VIP{:error, :no_tier}if VIP but no tier info
Check if user is a VIP.
Parameters
vip: The VIP status struct
Returns
boolean()