View Source Hyperliquid.Api.Exchange.SubAccountTransfer (hyperliquid v0.2.2)
Transfer funds between main account and sub-account.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint
Summary
Functions
Transfer funds between main account and sub-account.
Functions
Transfer funds between main account and sub-account.
Parameters
private_key: Private key for signing (hex string)sub_account_user: Sub-account addressis_deposit: true for deposit to sub-account, false for withdrawalusd: Amount in USD as integer (raw value)opts: Optional parameters
Returns
{:ok, response}- Transfer result{:error, term()}- Error details
Examples
{:ok, result} = SubAccountTransfer.request(private_key, "0x...", true, 1000000)