View Source Hyperliquid.Api.Info.SpotMetaAndAssetCtxs (hyperliquid v0.2.2)
Metadata and context for spot assets.
This endpoint returns a tuple of [SpotMeta, SpotAssetCtxs[]] in the TypeScript SDK,
represented here as a schema with two fields: meta and asset_ctxs.
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 spot meta and asset contexts data.
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.SpotMetaAndAssetCtxs{
asset_ctxs: [AssetCtx.t()],
meta: Meta.t()
}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.SpotMetaAndAssetCtxs.__endpoint_info__()
%{
endpoint: "spotMetaAndAssetCtxs",
type: :info,
rate_limit_cost: 2,
params: [],
optional_params: [],
doc: "Retrieve spot metadata and asset contexts",
returns: "Metadata and context for all spot assets"
}
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.
@spec build_request() :: map()
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 spot meta and asset contexts data.
Parameters
spot_meta_and_asset_ctxs: The spot meta and asset contexts structattrs: Map of attributes to validate
Returns
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.
@spec request!() :: t()
Make the API request, raising on error.
Make the API request and return the raw response map (no key transformation).
@spec request_raw!() :: map()
Make the API request returning raw map, raising on error.
Returns true if any storage backend is enabled.