Skip to main content
Before using any tool, call get_connection_status or get_wallet_addresses to confirm the wallet is authenticated.

Wallet operations

get_connection_status

Lightweight check of the local wallet connection status. Use this before any operation to confirm authentication without fetching full wallet details. No parameters.

get_wallet_addresses

Gets all blockchain addresses for the authenticated embedded wallet (Solana, Ethereum, Bitcoin, Sui).
ParameterTypeRequiredDescription
derivationIndexnumberNoDerivation index for the addresses (default: 0)
Example response:
{
  "walletId": "05307b6d-2d5a-43d6-8d11-08db650a169b",
  "addresses": [
    { "addressType": "Solana", "address": "H8FpYTgx4Uy9aF9Nk9fCTqKKFLYQ9KfC6UJhMkMDzCBh" },
    { "addressType": "Ethereum", "address": "0x8d8b06e017944f5951418b1182d119a376efb39d" },
    { "addressType": "BitcoinSegwit", "address": "bc1qkce5fvaxe759yu5xle5axlh8c7durjsx2wfhr9" },
    { "addressType": "Sui", "address": "0x039039cf69a336cb84e4c1dbcb3fa0c3f133d11b8146c6f7ed0d9f6817529a62" }
  ]
}

get_token_balances

Returns token holdings for the authenticated wallet with live USD pricing via the Phantom portfolio API.
ParameterTypeRequiredDescription
networksstring[]NoFilter by network names (e.g., ["solana", "ethereum", "base", "polygon", "arbitrum", "bitcoin", "sui", "monad"]). Omit to return balances across all supported networks.
derivationIndexnumberNoDerivation index for the account (default: 0)

send_solana_transaction

Signs and broadcasts a Solana transaction.
ParameterTypeRequiredDescription
transactionstringYesBase64-encoded transaction (standard base64 with A-Za-z0-9+/=)
networkIdstringNoSolana network identifier (e.g., solana:mainnet). Defaults to solana:mainnet.
derivationIndexnumberNoDerivation index for the account (default: 0)
walletIdstringNoWallet ID to use for signing (defaults to authenticated wallet)
Example request:
{
  "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQABAgMEBQYH...",
  "networkId": "solana:mainnet"
}

send_evm_transaction

Signs and broadcasts an EVM transaction with automatic gas estimation.
ParameterTypeRequiredDescription
chainIdnumberYesEVM chain ID (e.g., 1 for Ethereum, 8453 for Base, 137 for Polygon)
tostringYesDestination address (0x-prefixed)
valuestringNoValue in wei as a hex string (e.g., "0x0")
datastringNoCalldata as a hex string
gasLimitstringNoGas limit as a hex string. Auto-estimated if omitted.
derivationIndexnumberNoDerivation index for the account (default: 0)
Example request:
{
  "chainId": 8453,
  "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "value": "0x2386F26FC10000",
  "data": "0x"
}

sign_solana_message

Signs a UTF-8 message on Solana.
ParameterTypeRequiredDescription
messagestringYesThe UTF-8 message to sign
networkIdstringYesSolana network identifier (e.g., solana:mainnet)
derivationIndexnumberNoDerivation index for the account (default: 0)

sign_evm_personal_message

Signs a UTF-8 message using EIP-191 personal signing for EVM chains.
ParameterTypeRequiredDescription
messagestringYesThe UTF-8 message to sign
chainIdnumberYesEVM chain ID (e.g., 1 for Ethereum, 8453 for Base)
derivationIndexnumberNoDerivation index for the account (default: 0)

sign_evm_typed_data

Signs structured data using EIP-712 for EVM chains. Used for DeFi permits and other typed data flows.
ParameterTypeRequiredDescription
typedDataobjectYesEIP-712 typed data object
chainIdnumberYesEVM chain ID (e.g., 1 for Ethereum, 8453 for Base)
derivationIndexnumberNoDerivation index for the account (default: 0)

transfer_tokens

Transfers native tokens or SPL/ERC-20 tokens across Solana and EVM chains by building, signing, and sending the transaction.
ParameterTypeRequiredDescription
networkIdstringYesNetwork identifier (e.g., solana:mainnet, eip155:1)
tostringYesRecipient address
amountstringYesTransfer amount as a string (e.g., "0.5")
amountUnitstringNoui for token units, base for atomic units (default: ui)
tokenMintstringNoSPL token mint address. Solana only, omit for native SOL
tokenAddressstringNoERC-20 contract address. EVM only, omit for native ETH
derivationIndexnumberNoDerivation index for the account (default: 0)
Example (SOL transfer):
{
  "networkId": "solana:mainnet",
  "to": "H8FpYTgx4Uy9aF9Nk9fCTqKKFLYQ9KfC6UJhMkMDzCBh",
  "amount": "0.1"
}

phantom_login

Re-authenticates with Phantom. Use this to log in for the first time, switch accounts, or refresh an expired session. Opens the Phantom Connect browser flow. No parameters.

pay_api_access

Pays for daily API access by signing and broadcasting a CASH token transfer transaction. Call this when any tool returns an API_PAYMENT_REQUIRED error, passing the preparedTx from that error response. After payment succeeds, retry the original tool call.
ParameterTypeRequiredDescription
preparedTxstringYesBase64-encoded unsigned Solana transaction from the API_PAYMENT_REQUIRED error response
derivationIndexnumberNoDerivation index for the account (default: 0)

Swaps and portfolio

buy_token

Fetches a swap quote from the Phantom routing engine for Solana, EVM, and cross-chain swaps. Optionally signs and sends the initiation transaction when execute: true.
Cross-chain swaps from Solana to EVM are supported. EVM to Solana cross-chain swaps are not yet available in production.
ParameterTypeRequiredDescription
amountstringYesSell amount (e.g., "0.5")
sellChainIdstringNoCAIP-2 chain ID for the sell token (default: solana:mainnet)
buyChainIdstringNoCAIP-2 chain ID for the buy token (defaults to sellChainId; set a different value for cross-chain swaps)
buyTokenMintstringNoToken to buy. Solana mint address or EVM 0x contract address (omit for native token)
buyTokenIsNativebooleanNotrue to buy the native token of the destination chain
sellTokenMintstringNoToken to sell. Solana mint address or EVM 0x contract address (omit for native token)
sellTokenIsNativebooleanNotrue to sell the native token (default when sellTokenMint is omitted)
amountUnitstringNoui for token units, base for atomic units (default: base)
sellTokenDecimalsnumberNoDecimals for the sell token. Required for EVM tokens when amountUnit is ui
buyTokenDecimalsnumberNoDecimals for the buy token. Required for EVM tokens when amountUnit is ui and exactOut is true
slippageTolerancenumberNoSlippage tolerance in percent (0–100)
autoSlippagebooleanNoEnable automatic slippage calculation
exactOutbooleanNoIf true, treat amount as the buy amount rather than the sell amount
executebooleanNoIf true, sign and send the initiation transaction immediately
derivationIndexnumberNoDerivation index for the taker address (default: 0)
Example (Solana swap: sell SOL for USDC):
{
  "amount": "0.1",
  "sellChainId": "solana:mainnet",
  "sellTokenIsNative": true,
  "buyTokenMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "amountUnit": "ui",
  "execute": true
}
Example (cross-chain swap: sell SOL for ETH on Base):
{
  "amount": "0.5",
  "sellChainId": "solana:mainnet",
  "sellTokenIsNative": true,
  "buyChainId": "eip155:8453",
  "buyTokenIsNative": true,
  "amountUnit": "ui",
  "execute": true
}

portfolio_rebalance

Analyzes portfolio allocation and rebalances to target percentages via token swaps. Currently supports Solana only. Uses a two-phase flow: call with phase: "analyze" to inspect current allocations, then phase: "execute" with targetAllocations to rebalance. Use dryRun: true to preview without executing.
ParameterTypeRequiredDescription
phasestringYesanalyze to view current allocations, execute to rebalance
targetAllocationsarrayNoRequired for execute phase. Array of {caip19, targetPercent, symbol?} objects. Percentages must sum to 100.
dryRunbooleanNoIf true during execute phase, returns the swap plan without executing (default: false)
slippageTolerancenumberNoSlippage tolerance in percent for each swap (default: 1)
minTradeUsdnumberNoMinimum USD value for a trade to execute (default: 1.0)
networkstringNoNetwork to rebalance on. Currently only solana is supported (default: solana).

Hyperliquid perpetual trading

Use deposit_to_hyperliquid to fund your account, then transfer_spot_to_perps to move funds into the perps account before trading.

deposit_to_hyperliquid

Bridges tokens from an external chain into Hyperliquid as USDC via a cross-chain swap.
ParameterTypeRequiredDescription
sourceChainIdstringYesSource chain CAIP-2 ID (e.g., solana:mainnet, eip155:42161 for Arbitrum, eip155:8453 for Base)
amountstringYesAmount in human-readable units (e.g., "100" for 100 USDC, "0.5" for 0.5 SOL)
executebooleanNoIf false (default), returns quote only. If true, signs and broadcasts immediately.
sellTokenIsNativebooleanNoSet true to sell the native token (SOL or ETH)
sellTokenMintstringNoToken contract/mint to sell. Defaults to USDC on the source chain.
sellTokenDecimalsnumberNoDecimals of the sell token. Required for EVM ERC-20 tokens.
derivationIndexnumberNoDerivation index for the account (default: 0)

transfer_spot_to_perps

Moves USDC from the Hyperliquid spot account into the perpetuals account.
ParameterTypeRequiredDescription
amountUsdcstringYesAmount of USDC to move (e.g., "100")
derivationIndexnumberNoDerivation index for the account (default: 0)

withdraw_from_perps

Transfers USDC from the perpetuals account back to the Hyperliquid spot account.
ParameterTypeRequiredDescription
amountUsdcstringYesAmount of USDC to withdraw (e.g., "50")
derivationIndexnumberNoDerivation index for the account (default: 0)

get_perp_account

Returns perps account balance including total account value, available balance, and withdrawable amount.
ParameterTypeRequiredDescription
derivationIndexnumberNoDerivation index for the account (default: 0)

get_perp_markets

Returns all available perpetual markets with current prices, funding rates, open interest, 24h volume, max leverage, and asset IDs. No parameters required.

get_perp_positions

Returns all open perpetual positions including coin, direction, size, margin, entry price, leverage, unrealized PnL, and liquidation price.
ParameterTypeRequiredDescription
derivationIndexnumberNoDerivation index for the account (default: 0)

get_perp_orders

Returns all open perpetual orders (limit, take-profit, stop-loss).
ParameterTypeRequiredDescription
derivationIndexnumberNoDerivation index for the account (default: 0)

get_perp_trade_history

Returns historical perpetual trades including trade ID, coin, type, timestamp, price, size, fee, and closed PnL.
ParameterTypeRequiredDescription
derivationIndexnumberNoDerivation index for the account (default: 0)

open_perp_position

Opens a perpetual position on Hyperliquid with market or limit order.
ParameterTypeRequiredDescription
marketstringYesMarket symbol (e.g., "BTC", "ETH", "SOL")
directionstringYeslong or short
sizeUsdstringYesPosition size in USD (e.g., "100")
leveragenumberYesLeverage multiplier (e.g., 5 for 5x)
orderTypestringYesmarket for immediate execution, limit to rest on the book
limitPricestringNoRequired for limit orders (e.g., "50000")
marginTypestringNoisolated (default) or cross
reduceOnlybooleanNoIf true, only reduces an existing position (default: false)
derivationIndexnumberNoDerivation index for the account (default: 0)

close_perp_position

Closes an open perpetual position. By default closes 100% of the position.
ParameterTypeRequiredDescription
marketstringYesMarket symbol of the position to close (e.g., "BTC")
sizePercentnumberNoPercentage of position to close (1–100, default: 100)
derivationIndexnumberNoDerivation index for the account (default: 0)

cancel_perp_order

Cancels an open perpetual order. Use get_perp_orders to retrieve the order ID.
ParameterTypeRequiredDescription
marketstringYesMarket symbol (e.g., "BTC")
orderIdnumberYesNumeric order ID from get_perp_orders
derivationIndexnumberNoDerivation index for the account (default: 0)

update_perp_leverage

Updates the leverage and margin type for a perpetual market.
ParameterTypeRequiredDescription
marketstringYesMarket symbol (e.g., "BTC")
leveragenumberYesLeverage multiplier (e.g., 10 for 10x)
marginTypestringYescross or isolated
derivationIndexnumberNoDerivation index for the account (default: 0)

Supported networks

Network identifiers follow the CAIP-2/CAIP-10 format.

Solana

NetworkIdentifier
Mainnetsolana:mainnet
Devnetsolana:devnet
Testnetsolana:testnet

Ethereum and EVM networks

NetworkIdentifier
Ethereum Mainneteip155:1
Ethereum Sepoliaeip155:11155111
Polygon Mainneteip155:137
Polygon Amoyeip155:80002
Base Mainneteip155:8453
Base Sepoliaeip155:84532
Arbitrum Oneeip155:42161
Arbitrum Sepoliaeip155:421614
Monadeip155:143

Bitcoin

NetworkIdentifier
Mainnetbip122:000000000019d6689c085ae165831e93

Sui

NetworkIdentifier
Mainnetsui:mainnet
Testnetsui:testnet