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

Convenience functions for Exchange API endpoints.

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

Usage

# Direct endpoint call (when available)
{:ok, result} = Hyperliquid.Api.Exchange.SomeEndpoint.request(...)

# Convenience wrapper (when DSL is used)
{:ok, result} = Hyperliquid.Api.Exchange.some_endpoint(...)

Note

Currently, Exchange endpoints use a different implementation pattern and are not yet migrated to the DSL. This module is a placeholder for future Exchange endpoint migrations.

For now, use the existing Exchange modules directly:

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

Summary

Functions

Send a no-op heartbeat to keep connection alive

Send a no-op heartbeat to keep connection alive (bang variant)

Set display name for user account

Set display name for user account (bang variant)

Functions

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

Send a no-op heartbeat to keep connection alive

Delegates to Hyperliquid.Api.Exchange.Noop.request/1.

Parameters

  • opts - Optional parameters: [:private_key, :vault_address]

Returns

Success/error response from exchange

@spec noop!(keyword()) :: struct()

Send a no-op heartbeat to keep connection alive (bang variant)

Delegates to Hyperliquid.Api.Exchange.Noop.request!/1.

Raises on error.

Link to this function

set_display_name(display_name, opts \\ [])

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

Set display name for user account

Delegates to Hyperliquid.Api.Exchange.SetDisplayName.request/2.

Parameters

  • display_name - Required parameter
  • opts - Optional parameters: [:private_key, :vault_address]

Returns

Success/error response from exchange

Link to this function

set_display_name!(display_name, opts \\ [])

View Source
@spec set_display_name!(
  term(),
  keyword()
) :: struct()

Set display name for user account (bang variant)

Delegates to Hyperliquid.Api.Exchange.SetDisplayName.request!/2.

Raises on error.