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

Authorize the signing account for an AQAV2 role on a token.

Two roles exist: :technical and :treasury.

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

Usage

{:ok, result} = AuthorizeAqav2Role.request(42, :technical)

Summary

Functions

Authorize an AQAV2 role on a token.

Valid role names.

Types

@type role() :: :technical | :treasury

Functions

Link to this function

request(token, role, opts \\ [])

View Source
@spec request(non_neg_integer(), role() | String.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Authorize an AQAV2 role on a token.

Parameters

  • token: Token identifier
  • role: :technical or :treasury (the strings are also accepted)
  • opts: Optional parameters

Options

  • :private_key - Private key for signing (falls back to config)
  • :vault_address - Act on behalf of a vault

Returns

  • {:ok, response} - Authorization result
  • {:error, term()} - Error details

Examples

{:ok, result} = AuthorizeAqav2Role.request(42, :treasury)
@spec roles() :: [String.t()]

Valid role names.

Returns

  • List of role strings