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

Create a new sub-account.

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

Summary

Functions

Create a new sub-account.

Functions

Link to this function

request(name, opts \\ [])

View Source

Create a new sub-account.

Parameters

  • private_key: Private key for signing (hex string)
  • name: Sub-account name
  • opts: Optional parameters

Returns

  • {:ok, response} - Result with sub-account address
  • {:error, term()} - Error details

Examples

{:ok, result} = CreateSubAccount.request(private_key, "Trading Bot")