View Source Hyperliquid.Api.Exchange.SpotUser (hyperliquid v0.3.1)

User-level spot configuration actions.

Currently supports one action:

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

Usage

# Opt out of spot dusting
{:ok, result} = SpotUser.toggle_spot_dusting(true)

# Opt back in
{:ok, result} = SpotUser.toggle_spot_dusting(false)

Summary

Functions

Opt in or out of automatic spot dusting.

Functions

Link to this function

toggle_spot_dusting(opt_out, opts \\ [])

View Source

Opt in or out of automatic spot dusting.

Spot dusting is the automatic conversion of small spot balances (dust) to USDC.

Parameters

  • opt_out: true to opt out of dusting, false to opt back in
  • opts: Optional parameters

Options

  • :private_key — Private key for signing (falls back to config)

Returns

  • {:ok, response} — Result
  • {:error, term()} — Error details