View Source Hyperliquid.Api.Info.OutcomeMeta (hyperliquid v0.3.1)
Prediction market (HIP-4) outcome metadata.
Returns every outcome and question known to the exchange, including the side specifications that define each outcome's YES/NO tokens.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/hip-4-deployer-actions
Usage
{:ok, meta} = OutcomeMeta.request()
{:ok, outcome} = OutcomeMeta.find_outcome(meta, 7)
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.
List outcomes deployed by a specific address.
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
Creates a changeset for outcome metadata.
Fetch data and persist to configured storage backends.
Fetch data and persist. Raises on error.
Find an outcome by its numeric identifier.
Find a question by its numeric identifier.
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).
Check whether a question has fully settled — every named outcome is settled.
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
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.OutcomeMeta.__endpoint_info__()
%{
endpoint: "outcomeMeta",
type: :info,
rate_limit_cost: 2,
params: [],
optional_params: [],
doc: "Retrieve prediction market outcome metadata",
returns: "Outcomes and questions for HIP-4 prediction markets"
}
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.
List outcomes deployed by a specific address.
Parameters
meta: The outcome meta structdeployer: Deployer address
Returns
- List of outcomes deployed by the address
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Creates a changeset for outcome metadata.
Parameters
meta: The outcome meta structattrs: Map with outcomes and questions keys
Returns
Ecto.Changeset.t()
Fetch data and persist to configured storage backends.
This calls request/0 and then stores the result using Storage.Writer.
@spec fetch!() :: t()
Fetch data and persist. Raises on error.
@spec find_outcome(t(), non_neg_integer()) :: {:ok, map()} | {:error, :not_found}
Find an outcome by its numeric identifier.
Parameters
meta: The outcome meta structoutcome: Outcome identifier
Returns
{:ok, outcome}if found{:error, :not_found}otherwise
@spec find_question(t(), non_neg_integer()) :: {:ok, map()} | {:error, :not_found}
Find a question by its numeric identifier.
Parameters
meta: The outcome meta structquestion: Question identifier
Returns
{:ok, question}if found{:error, :not_found}otherwise
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).
Check whether a question has fully settled — every named outcome is settled.
Parameters
question: A question from the metadata
Returns
boolean()
@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.