View Source Hyperliquid.Api.Info.GossipPriorityAuctionStatus (hyperliquid v0.3.1)

Status of the gossip priority slot auctions.

The response is a two-element array: the IPs currently holding each priority slot (nil for an unclaimed slot), and the auction status for each slot in the same shape as perpDeployAuctionStatus.

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/priority-fees

Usage

{:ok, status} = GossipPriorityAuctionStatus.request()
GossipPriorityAuctionStatus.slot_holders(status)

Summary

Functions

Returns metadata about this endpoint.

Returns postgres table configurations (multi-table support).

Returns storage configuration for this endpoint.

Auction status for a given slot.

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 auction status data.

Fetch data and persist to configured storage backends.

Fetch data and persist. Raises on error.

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.

Whether a given slot is currently unclaimed.

IPs currently holding a priority slot, indexed by slot id.

Returns true if any storage backend is enabled.

Types

@type t() :: %Hyperliquid.Api.Info.GossipPriorityAuctionStatus{
  auctions: [map()],
  slot_holders: [String.t() | nil]
}

Functions

Returns metadata about this endpoint.

Example

iex> Hyperliquid.Api.Info.GossipPriorityAuctionStatus.__endpoint_info__()
%{
  endpoint: "gossipPriorityAuctionStatus",
  type: :info,
  rate_limit_cost: 2,
  params: [],
  optional_params: [],
  doc: "Retrieve gossip priority slot auction status",
  returns: "Current slot holders and per-slot auction status"
}

Returns postgres table configurations (multi-table support).

Returns storage configuration for this endpoint.

Link to this function

auction_for(gossip_priority_auction_status, slot_id)

View Source
@spec auction_for(t(), non_neg_integer()) :: {:ok, map()} | {:error, :not_found}

Auction status for a given slot.

Parameters

  • status: The auction status struct
  • slot_id: Slot identifier

Returns

  • {:ok, auction} if present
  • {:error, :not_found} otherwise

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.

Link to this function

changeset(status \\ %__MODULE__{}, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for auction status data.

Parameters

  • status: The auction status struct
  • attrs: Map with slot_holders and auctions keys

Returns

  • Ecto.Changeset.t()
@spec fetch() :: {:ok, t()} | {:error, term()}

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 parse_response(map()) :: {:ok, t()} | {:error, term()}

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).

Link to this function

postgres_upsert_config()

View Source

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.

@spec request() :: {:ok, t()} | {:error, term()}

Make the API request and parse the response.

@spec request!() :: t()

Make the API request, raising on error.

@spec request_raw() :: {:ok, map()} | {:error, term()}

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.

Link to this function

slot_available?(status, slot_id)

View Source
@spec slot_available?(t(), non_neg_integer()) :: boolean()

Whether a given slot is currently unclaimed.

Parameters

  • status: The auction status struct
  • slot_id: Slot identifier

Returns

  • boolean()
Link to this function

slot_holders(gossip_priority_auction_status)

View Source
@spec slot_holders(t()) :: [String.t() | nil]

IPs currently holding a priority slot, indexed by slot id.

Parameters

  • status: The auction status struct

Returns

  • List where each element is an IP string or nil

Returns true if any storage backend is enabled.