View Source Hyperliquid.Api.Info.LeadingVaults (hyperliquid v0.2.2)
Leading vaults information.
Returns top performing vaults with their details.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint
Usage
{:ok, vaults} = LeadingVaults.request("0xdfc24b077bc1425ad1dea75bcb6f8158e10df303")
{:ok, vault} = LeadingVaults.find_by_address(vaults, "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.
Creates a changeset for leading vaults data.
Get vault count.
Fetch is an alias for request when no storage is configured.
Find vault by address.
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.LeadingVaults{vaults: [Vault.t()]}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.LeadingVaults.__endpoint_info__()
%{
endpoint: "leadingVaults",
type: :info,
rate_limit_cost: 1,
params: [:user],
optional_params: [],
doc: "Retrieve leading vaults information",
returns: "Top performing vaults with their details"
}
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()
Creates a changeset for leading vaults data.
@spec count(t()) :: non_neg_integer()
Get vault count.
Fetch is an alias for request when no storage is configured.
Find vault by address.
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.