Skip to main content
Run phantom --help or phantom <command> --help for inline documentation.

Authentication

Authenticate with Phantom via browser (Google, Apple, or Phantom extension). Use this to log in for the first time, switch accounts, or refresh an expired session.

Wallet

Sui support has been deprecated.

Tokens & Swaps

phantom buy

Swap tokens on Solana, across supported EVM networks, or between chains (including Hyperliquid):
Omit --execute to get a quote preview only.

Solana


EVM

Arbitrum (eip155:42161) is rejected by phantom evm send, phantom transfer, and phantom buy; it remains valid for perps withdrawals. BNB Smart Chain (eip155:56; chain ID 56) is unsupported. See the supported networks.

Bitcoin

Starting with @phantom/cli@3.0.3, the default Bitcoin address is the BIP84 Native SegWit receiving address that Phantom Wallet uses (m/84'/0'/0'/0/<address_index>). Earlier SDK versions derived a different Native SegWit address (m/84'/0'/<account_index>'/0). Funds sent to that earlier address do not move automatically. Use the BIP84 address for new deposits. phantom wallet balances reports BTC at the earlier address separately, in legacySdkBitcoinBalance.

phantom bitcoin recover

Move all spendable BTC from the earlier SDK address to the same wallet’s BIP84 address. Use it only for this recovery, not for ordinary sends. “Legacy” in the output refers to the earlier SDK derivation path, not a legacy Bitcoin address format.
Review the sender, recipient, amount, fee, notices, and simulation warnings before you confirm. Repeat the same command and options with --confirmed --quote-id. Quotes expire after five minutes. If the quote expires or the transaction changes, request a new preview. submitted means the broadcast was acknowledged, not that the transfer has confirmed on-chain. If broadcast cannot be verified or acknowledged, check the transaction ID in the error before retrying. The command refuses to sweep an address that holds protected outputs, such as inscriptions. Uneconomical outputs may remain. You can leave BTC at the earlier address, but it does not appear in the synced Phantom wallet. Pass --derivation-index to recover a different index (default: 0). See bitcoin_recover for the full response shape.

Perpetuals (Hyperliquid)

Full perpetuals documentation: PERPS guide.

Perps workflow

Fund and trade:
Exit and withdraw:

Global flags

--wallet-id and --derivation-index belong to the commands whose schemas include them. phantom wallet status and phantom login do not take those flags. phantom wallet balances takes --derivation-index starting with @phantom/cli@3.0.3, but not --wallet-id. phantom login takes --display-mode browser or --display-mode text. Chain reads use the SDK endpoint for the selected network. There is no rpcUrl flag.