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

Send spot tokens to another address.

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

Summary

Functions

Send spot tokens to another address.

Functions

Link to this function

request(destination, token, amount, opts \\ [])

View Source

Send spot tokens to another address.

Parameters

  • destination: Destination address
  • token: Token identifier (e.g., "USDC:0xeb62eee3685fc4c43992febcd9e75443")
  • amount: Amount to send (string or number)
  • opts: Optional parameters

Options

  • :private_key - Private key for signing (falls back to config)
  • :expected_address - When provided, validates the private key derives to this address

Returns

  • {:ok, response} - Transfer result
  • {:error, term()} - Error details

Examples

{:ok, result} = SpotSend.request("0x...", "HYPE:0x...", "10.0")

Breaking Change (v0.2.0)

private_key was previously the first positional argument. It is now an option in the opts keyword list (:private_key).