View Source Hyperliquid.Api.Exchange.SubAccountSpotTransfer (hyperliquid v0.2.2)
Transfer spot tokens between main account and sub-account.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint
Summary
Functions
Transfer spot tokens between main account and sub-account.
Functions
Transfer spot tokens 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 withdrawaltoken: Token indexamount: Amount as stringopts: Optional parameters
Returns
{:ok, response}- Transfer result{:error, term()}- Error details
Examples
{:ok, result} = SubAccountSpotTransfer.request(private_key, "0x...", true, 1, "100.0")