View Source Hyperliquid.Api.Explorer.TxDetails (hyperliquid v0.2.2)

Transaction details from the explorer.

Returns detailed information about a specific transaction.

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

Usage

{:ok, details} = TxDetails.request("0x1234...")
TxDetails.success?(details)

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 tx details 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.

Returns true if any storage backend is enabled.

Check if transaction succeeded.

Types

@type t() :: %Hyperliquid.Api.Explorer.TxDetails{
  block: non_neg_integer(),
  block_time: non_neg_integer(),
  error: String.t() | nil,
  hash: String.t(),
  tx: map()
}

Functions

Returns metadata about this endpoint.

Example

iex> Hyperliquid.Api.Explorer.TxDetails.__endpoint_info__()
%{
  endpoint: "txDetails",
  type: :explorer,
  rate_limit_cost: 2,
  params: [:hash],
  optional_params: [],
  doc: "Retrieve transaction details by hash",
  returns: "Transaction details with block info and status"
}

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(term()) :: map()

Build the request payload.

Returns true if cache storage is enabled.

Returns the cache TTL if configured.

Link to this function

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

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

Creates a changeset for tx details data.

Fetch data and persist to configured storage backends.

This calls request/N and then stores the result using Storage.Writer. Request params are merged into stored data for cache key generation.

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

Make the API request and parse the response.

@spec request!(term()) :: t()

Make the API request, raising on error.

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

Make the API request and return the raw response map (no key transformation).

@spec request_raw!(term()) :: map()

Make the API request returning raw map, raising on error.

Returns true if any storage backend is enabled.

@spec success?(t()) :: boolean()

Check if transaction succeeded.