View Source Hyperliquid.Api.Info.PredictedFundings (hyperliquid v0.2.2)
Predicted funding rates for perpetuals.
Returns funding rate predictions across different venues for each coin. The response is a nested array structure: [coin, [[venue, {fundingRate, nextFundingTime}]]]
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.
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 predicted fundings data.
Get all coins with predictions.
Fetch is an alias for request when no storage is configured.
Get funding predictions for a specific coin.
Get the funding rate for a specific coin and venue.
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.PredictedFundings{
predictions: [CoinPrediction.t()]
}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.PredictedFundings.__endpoint_info__()
%{
endpoint: "predictedFundings",
type: :info,
rate_limit_cost: 2,
params: [],
optional_params: [],
doc: "Retrieve predicted funding rates for perpetuals",
returns: "Funding rate predictions across different venues"
}
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 predicted fundings data.
Parameters
predictions: The predictions structattrs: Nested array from API response
Returns
Ecto.Changeset.t()
Get all coins with predictions.
Parameters
predicted_fundings: The predicted fundings struct
Returns
- List of coin symbols
Fetch is an alias for request when no storage is configured.
Get funding predictions for a specific coin.
Parameters
predicted_fundings: The predicted fundings structcoin: Coin symbol
Returns
{:ok, [VenuePrediction.t()]}if found{:error, :not_found}if not found
Get the funding rate for a specific coin and venue.
Parameters
predicted_fundings: The predicted fundings structcoin: Coin symbolvenue: Venue name
Returns
{:ok, String.t()}if found{:error, :not_found}if not found
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.