View Source Hyperliquid.Api.Info.UserFees (hyperliquid v0.2.2)
User's trading fee rates.
Returns maker and taker fee rates for a user.
Summary
Functions
Returns metadata about this endpoint.
Returns postgres table configurations (multi-table support).
Returns storage configuration for this endpoint.
Get add rate as float.
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.
Get cross rate as float.
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.UserFees{ active_referral_discount: String.t(), active_staking_discount: map(), daily_user_vlm: [map()], fee_schedule: map(), fee_trial_escrow: String.t(), next_trial_available_timestamp: term(), staking_link: map() | nil, trial: term(), user_add_rate: String.t(), user_cross_rate: String.t(), user_spot_add_rate: String.t(), user_spot_cross_rate: String.t() }
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.UserFees.__endpoint_info__()
%{
endpoint: "userFees",
type: :info,
rate_limit_cost: 1,
params: [:user],
optional_params: [],
doc: "Retrieve user's trading fee rates",
returns: "Maker and taker fee rates"
}
Returns postgres table configurations (multi-table support).
Returns storage configuration for this endpoint.
Get add rate as float.
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()
Get cross rate as float.
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.