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

Initiate a withdrawal request.

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

Summary

Functions

Initiate a withdrawal request.

Functions

Link to this function

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

View Source

Initiate a withdrawal request.

Parameters

  • destination: Destination address
  • amount: Amount to withdraw (string or number, e.g. 1 = $1)
  • 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} - Withdrawal result
  • {:error, term()} - Error details

Examples

{:ok, result} = Withdraw3.request("0x...", "100.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).