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

Convenience functions for Explorer API endpoints.

This module provides snake_case wrapper functions that delegate to the underlying endpoint modules, improving developer ergonomics.

Usage

# Direct endpoint call (still supported)
{:ok, result} = Hyperliquid.Api.Explorer.BlockDetails.request(height: 12345)

# Convenience wrapper
{:ok, result} = Hyperliquid.Api.Explorer.block_details(12345)

See Hyperliquid.Api.Registry.list_by_type(:explorer) for all available endpoints.

Summary

Functions

Retrieve block details by height

Retrieve block details by height (bang variant)

Retrieve block details by height

Retrieve block details by height (fetch bang variant)

Retrieve transaction details by hash

Retrieve transaction details by hash (fetch bang variant)

Retrieve transaction details by hash

Retrieve transaction details by hash (bang variant)

Retrieve user transaction history

Retrieve user transaction history (bang variant)

Functions

@spec block_details(term()) :: {:ok, struct()} | {:error, term()}

Retrieve block details by height

Delegates to Hyperliquid.Api.Explorer.BlockDetails.request/1.

Parameters

  • height - Required parameter

Returns

Block with transactions, hash, and metadata

@spec block_details!(term()) :: struct()

Retrieve block details by height (bang variant)

Delegates to Hyperliquid.Api.Explorer.BlockDetails.request!/1.

Raises on error.

Link to this function

fetch_block_details(height)

View Source
@spec fetch_block_details(term()) :: {:ok, struct()} | {:error, term()}

Retrieve block details by height

Fetches data and persists to configured storage backends.

Delegates to Hyperliquid.Api.Explorer.BlockDetails.fetch/1.

Link to this function

fetch_block_details!(height)

View Source
@spec fetch_block_details!(term()) :: struct()

Retrieve block details by height (fetch bang variant)

Delegates to Hyperliquid.Api.Explorer.BlockDetails.fetch!/1.

@spec fetch_tx_details(term()) :: {:ok, struct()} | {:error, term()}

Retrieve transaction details by hash

Fetches data and persists to configured storage backends.

Delegates to Hyperliquid.Api.Explorer.TxDetails.fetch/1.

@spec fetch_tx_details!(term()) :: struct()

Retrieve transaction details by hash (fetch bang variant)

Delegates to Hyperliquid.Api.Explorer.TxDetails.fetch!/1.

@spec tx_details(term()) :: {:ok, struct()} | {:error, term()}

Retrieve transaction details by hash

Delegates to Hyperliquid.Api.Explorer.TxDetails.request/1.

Parameters

  • hash - Required parameter

Returns

Transaction details with block info and status

@spec tx_details!(term()) :: struct()

Retrieve transaction details by hash (bang variant)

Delegates to Hyperliquid.Api.Explorer.TxDetails.request!/1.

Raises on error.

@spec user_details(term()) :: {:ok, struct()} | {:error, term()}

Retrieve user transaction history

Delegates to Hyperliquid.Api.Explorer.UserDetails.request/1.

Parameters

  • user - Required parameter

Returns

List of recent transactions for the user

@spec user_details!(term()) :: struct()

Retrieve user transaction history (bang variant)

Delegates to Hyperliquid.Api.Explorer.UserDetails.request!/1.

Raises on error.