View Source Hyperliquid.Api.Exchange.AuthorizeAqav2Role (hyperliquid v0.3.0)
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
Types
@type role() :: :technical | :treasury
Functions
Authorize an AQAV2 role on a token.
Parameters
token: Token identifierrole::technicalor: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