View Source Hyperliquid.Api.Info.PerpsAtOpenInterestCap (hyperliquid v0.2.2)
List of perpetuals currently at their open interest cap.
Returns an array of coin symbols that have reached their maximum open interest.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals
Summary
Functions
Returns metadata about this endpoint.
Returns postgres table configurations (multi-table support).
Returns storage configuration for this endpoint.
Check if a specific coin is at its open interest cap.
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 perps at open interest cap data.
Get the count of perps at their open interest cap.
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.PerpsAtOpenInterestCap{coins: [String.t()]}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.PerpsAtOpenInterestCap.__endpoint_info__()
%{
endpoint: "perpsAtOpenInterestCap",
type: :info,
rate_limit_cost: 1,
params: [],
optional_params: [],
doc: "Retrieve perpetuals at open interest cap",
returns: "Array of coin symbols at their maximum open interest"
}
Returns postgres table configurations (multi-table support).
Returns storage configuration for this endpoint.
Check if a specific coin is at its open interest cap.
Parameters
perps: The perps at cap structcoin: Coin symbol to check
Returns
boolean()
Example
iex> at_cap?(%PerpsAtOpenInterestCap{coins: ["BTC", "ETH"]}, "BTC")
true
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 perps at open interest cap data.
Parameters
perps: The perps structattrs: Map with coins key
Returns
Ecto.Changeset.t()
Example
iex> changeset(%PerpsAtOpenInterestCap{}, %{coins: ["BTC", "ETH"]})
@spec count(t()) :: non_neg_integer()
Get the count of perps at their open interest cap.
Parameters
perps: The perps at cap struct
Returns
non_neg_integer()
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.