View Source Hyperliquid.Api.Exchange.SubAccountModify (hyperliquid v0.2.2)
Create or modify a sub-account.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint
Summary
Functions
Create or modify a sub-account.
Functions
Create or modify a sub-account.
Parameters
private_key: Private key for signing (hex string)name: Sub-account nameopts: Optional parameters
Options
:sub_account_user- Sub-account address (for modifying existing)
Returns
{:ok, response}- Result with sub-account address{:error, term()}- Error details
Examples
# Create new sub-account
{:ok, result} = SubAccountModify.request(private_key, "Trading Bot")
# Rename existing sub-account
{:ok, result} = SubAccountModify.request(private_key, "New Name", sub_account_user: "0x...")