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).
| Parameter | Type | Required | Description |
|---|
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
networks | string[] | No | Filter by network names (e.g., ["solana", "ethereum", "base", "polygon", "arbitrum", "bitcoin", "sui", "monad"]). Omit to return balances across all supported networks. |
derivationIndex | number | No | Derivation index for the account (default: 0) |
send_solana_transaction
Signs and broadcasts a Solana transaction.
| Parameter | Type | Required | Description |
|---|
transaction | string | Yes | Base64-encoded transaction (standard base64 with A-Za-z0-9+/=) |
networkId | string | No | Solana network identifier (e.g., solana:mainnet). Defaults to solana:mainnet. |
derivationIndex | number | No | Derivation index for the account (default: 0) |
walletId | string | No | Wallet 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.
| Parameter | Type | Required | Description |
|---|
chainId | number | Yes | EVM chain ID (e.g., 1 for Ethereum, 8453 for Base, 137 for Polygon) |
to | string | Yes | Destination address (0x-prefixed) |
value | string | No | Value in wei as a hex string (e.g., "0x0") |
data | string | No | Calldata as a hex string |
gasLimit | string | No | Gas limit as a hex string. Auto-estimated if omitted. |
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
message | string | Yes | The UTF-8 message to sign |
networkId | string | Yes | Solana network identifier (e.g., solana:mainnet) |
derivationIndex | number | No | Derivation index for the account (default: 0) |
sign_evm_personal_message
Signs a UTF-8 message using EIP-191 personal signing for EVM chains.
| Parameter | Type | Required | Description |
|---|
message | string | Yes | The UTF-8 message to sign |
chainId | number | Yes | EVM chain ID (e.g., 1 for Ethereum, 8453 for Base) |
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
typedData | object | Yes | EIP-712 typed data object |
chainId | number | Yes | EVM chain ID (e.g., 1 for Ethereum, 8453 for Base) |
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
networkId | string | Yes | Network identifier (e.g., solana:mainnet, eip155:1) |
to | string | Yes | Recipient address |
amount | string | Yes | Transfer amount as a string (e.g., "0.5") |
amountUnit | string | No | ui for token units, base for atomic units (default: ui) |
tokenMint | string | No | SPL token mint address. Solana only, omit for native SOL |
tokenAddress | string | No | ERC-20 contract address. EVM only, omit for native ETH |
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
preparedTx | string | Yes | Base64-encoded unsigned Solana transaction from the API_PAYMENT_REQUIRED error response |
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
amount | string | Yes | Sell amount (e.g., "0.5") |
sellChainId | string | No | CAIP-2 chain ID for the sell token (default: solana:mainnet) |
buyChainId | string | No | CAIP-2 chain ID for the buy token (defaults to sellChainId; set a different value for cross-chain swaps) |
buyTokenMint | string | No | Token to buy. Solana mint address or EVM 0x contract address (omit for native token) |
buyTokenIsNative | boolean | No | true to buy the native token of the destination chain |
sellTokenMint | string | No | Token to sell. Solana mint address or EVM 0x contract address (omit for native token) |
sellTokenIsNative | boolean | No | true to sell the native token (default when sellTokenMint is omitted) |
amountUnit | string | No | ui for token units, base for atomic units (default: base) |
sellTokenDecimals | number | No | Decimals for the sell token. Required for EVM tokens when amountUnit is ui |
buyTokenDecimals | number | No | Decimals for the buy token. Required for EVM tokens when amountUnit is ui and exactOut is true |
slippageTolerance | number | No | Slippage tolerance in percent (0–100) |
autoSlippage | boolean | No | Enable automatic slippage calculation |
exactOut | boolean | No | If true, treat amount as the buy amount rather than the sell amount |
execute | boolean | No | If true, sign and send the initiation transaction immediately |
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
phase | string | Yes | analyze to view current allocations, execute to rebalance |
targetAllocations | array | No | Required for execute phase. Array of {caip19, targetPercent, symbol?} objects. Percentages must sum to 100. |
dryRun | boolean | No | If true during execute phase, returns the swap plan without executing (default: false) |
slippageTolerance | number | No | Slippage tolerance in percent for each swap (default: 1) |
minTradeUsd | number | No | Minimum USD value for a trade to execute (default: 1.0) |
network | string | No | Network 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.
| Parameter | Type | Required | Description |
|---|
sourceChainId | string | Yes | Source chain CAIP-2 ID (e.g., solana:mainnet, eip155:42161 for Arbitrum, eip155:8453 for Base) |
amount | string | Yes | Amount in human-readable units (e.g., "100" for 100 USDC, "0.5" for 0.5 SOL) |
execute | boolean | No | If false (default), returns quote only. If true, signs and broadcasts immediately. |
sellTokenIsNative | boolean | No | Set true to sell the native token (SOL or ETH) |
sellTokenMint | string | No | Token contract/mint to sell. Defaults to USDC on the source chain. |
sellTokenDecimals | number | No | Decimals of the sell token. Required for EVM ERC-20 tokens. |
derivationIndex | number | No | Derivation index for the account (default: 0) |
transfer_spot_to_perps
Moves USDC from the Hyperliquid spot account into the perpetuals account.
| Parameter | Type | Required | Description |
|---|
amountUsdc | string | Yes | Amount of USDC to move (e.g., "100") |
derivationIndex | number | No | Derivation index for the account (default: 0) |
withdraw_from_perps
Transfers USDC from the perpetuals account back to the Hyperliquid spot account.
| Parameter | Type | Required | Description |
|---|
amountUsdc | string | Yes | Amount of USDC to withdraw (e.g., "50") |
derivationIndex | number | No | Derivation index for the account (default: 0) |
get_perp_account
Returns perps account balance including total account value, available balance, and withdrawable amount.
| Parameter | Type | Required | Description |
|---|
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
derivationIndex | number | No | Derivation index for the account (default: 0) |
get_perp_orders
Returns all open perpetual orders (limit, take-profit, stop-loss).
| Parameter | Type | Required | Description |
|---|
derivationIndex | number | No | Derivation 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.
| Parameter | Type | Required | Description |
|---|
derivationIndex | number | No | Derivation index for the account (default: 0) |
open_perp_position
Opens a perpetual position on Hyperliquid with market or limit order.
| Parameter | Type | Required | Description |
|---|
market | string | Yes | Market symbol (e.g., "BTC", "ETH", "SOL") |
direction | string | Yes | long or short |
sizeUsd | string | Yes | Position size in USD (e.g., "100") |
leverage | number | Yes | Leverage multiplier (e.g., 5 for 5x) |
orderType | string | Yes | market for immediate execution, limit to rest on the book |
limitPrice | string | No | Required for limit orders (e.g., "50000") |
marginType | string | No | isolated (default) or cross |
reduceOnly | boolean | No | If true, only reduces an existing position (default: false) |
derivationIndex | number | No | Derivation index for the account (default: 0) |
close_perp_position
Closes an open perpetual position. By default closes 100% of the position.
| Parameter | Type | Required | Description |
|---|
market | string | Yes | Market symbol of the position to close (e.g., "BTC") |
sizePercent | number | No | Percentage of position to close (1–100, default: 100) |
derivationIndex | number | No | Derivation index for the account (default: 0) |
cancel_perp_order
Cancels an open perpetual order. Use get_perp_orders to retrieve the order ID.
| Parameter | Type | Required | Description |
|---|
market | string | Yes | Market symbol (e.g., "BTC") |
orderId | number | Yes | Numeric order ID from get_perp_orders |
derivationIndex | number | No | Derivation index for the account (default: 0) |
update_perp_leverage
Updates the leverage and margin type for a perpetual market.
| Parameter | Type | Required | Description |
|---|
market | string | Yes | Market symbol (e.g., "BTC") |
leverage | number | Yes | Leverage multiplier (e.g., 10 for 10x) |
marginType | string | Yes | cross or isolated |
derivationIndex | number | No | Derivation index for the account (default: 0) |
Supported networks
Network identifiers follow the CAIP-2/CAIP-10 format.
Solana
| Network | Identifier |
|---|
| Mainnet | solana:mainnet |
| Devnet | solana:devnet |
| Testnet | solana:testnet |
Ethereum and EVM networks
| Network | Identifier |
|---|
| Ethereum Mainnet | eip155:1 |
| Ethereum Sepolia | eip155:11155111 |
| Polygon Mainnet | eip155:137 |
| Polygon Amoy | eip155:80002 |
| Base Mainnet | eip155:8453 |
| Base Sepolia | eip155:84532 |
| Arbitrum One | eip155:42161 |
| Arbitrum Sepolia | eip155:421614 |
| Monad | eip155:143 |
Bitcoin
| Network | Identifier |
|---|
| Mainnet | bip122:000000000019d6689c085ae165831e93 |
Sui
| Network | Identifier |
|---|
| Mainnet | sui:mainnet |
| Testnet | sui:testnet |