Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.
Run phantom --help or phantom <command> --help for inline documentation.
Authentication
phantom login
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
phantom wallet status # Check session status (no API call)phantom wallet addresses # Get all wallet addresses (Solana, EVM, Bitcoin, Sui)phantom wallet balances # Get token balances with USD prices across all chainsphantom wallet rebalance # Rebalance portfolio to a target allocation
Sui support has been deprecated.
Tokens & Swaps
phantom buy # Swap tokens on Solana, supported EVM networks, or cross-chainphantom transfer # Transfer native tokens or SPL/ERC-20 tokensphantom simulate # Simulate a transaction and preview asset changesphantom pay # Pay for API access using tokens
phantom buy
Swap tokens on Solana, across supported EVM networks, or between chains (including Hyperliquid):
# Swap SOL to USDC on Solanaphantom buy --sellTokenIsNative --buyTokenMint EPjFWdd5... --amount 0.1 --amountUnit ui --execute# Bridge USDC from Solana to Basephantom buy --sellTokenMint EPjFWdd5... --buyChainId eip155:8453 --buyTokenIsNative \ --amount 10 --amountUnit ui --execute# Deposit to Hyperliquid (bridge SOL into HL spot)phantom buy --sellTokenIsNative --buyChainId hypercore:mainnet \ --buyTokenMint 0x00000000000000000000000000000000 --amount 0.05 --amountUnit ui --execute
Omit --execute to get a quote preview only.
Solana
phantom solana send # Sign and broadcast a base64-encoded Solana transactionphantom solana sign # Sign a UTF-8 message (returns base58 signature)
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.
phantom evm send # Sign and broadcast an EVM transactionphantom evm sign # Sign an EVM personal message (EIP-191)phantom evm sign-typed # Sign EVM typed data (EIP-712)phantom evm allowance # Get ERC-20 token allowance for a spender address
Bitcoin
phantom bitcoin recover # Preview or confirm a recovery transfer to your BIP84 address
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.
# 1. Preview the transferphantom bitcoin recover# 2. Review the preview, then paste its exact quoteId valueQUOTE_ID="<quoteId from the preview>"# 3. Confirm the reviewed transferphantom bitcoin recover --confirmed --quote-id "$QUOTE_ID"
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.
phantom perps markets # List available perpetual markets with pricesphantom perps account # Get account balance, available margin, and withdrawable amountphantom perps positions # Get all open positionsphantom perps orders # Get all open ordersphantom perps history # Get recent trade historyphantom perps open # Open a long or short position (market or limit)phantom perps close # Close an open positionphantom perps cancel # Cancel an open orderphantom perps leverage # Update leverage for a marketphantom perps deposit # Bridge tokens from external chain into Hyperliquid spotphantom perps transfer # Move USDC from Hyperliquid spot into perps accountphantom perps withdraw # Bridge USDC from perps account to an external chainphantom perps withdraw-hl-spot # Bridge USDC from Hyperliquid spot to an external chain
Perps workflow
Fund and trade:
# 1. Bridge SOL into Hyperliquid spotphantom perps deposit --sourceChainId solana:mainnet --amount 0.1 --sellTokenIsNative --execute# 2. Move USDC from spot into perps accountphantom perps transfer --amountUsdc 8# 3. Open a leveraged long positionphantom perps open --market BTC --direction long --sizeUsd 50 --leverage 5 --orderType market
Exit and withdraw:
# 1. Close the positionphantom perps close --market BTC# 2. Bridge USDC from perps back to Solanaphantom perps withdraw --amountUsdc 8 --destinationChainId solana:mainnet# Or bridge USDC from Hyperliquid spot to Solana (if funds are already in spot)phantom perps withdraw-hl-spot --amountUsdc 8 --destinationChainId solana:mainnet
Global flags
Flag
Description
--help
Show help for the current command
--version
Show CLI version
--mcp
Start the CLI as an MCP stdio server
--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.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Phantom developer documentation","description":"Phantom is a crypto wallet that can be used to manage digital assets and access decentralized apps on multiple blockchains.","colors":{"primary":"#AB9FF2","light":"#AB9FF2","dark":"#AB9FF2"},"logo":{"light":"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/logo/phantom-light.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=e900bab5ae2cffa45148551c3678ce46","dark":"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/logo/phantom-dark.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=eff6d20e74e8315e9c4a8deb0cf9da15"},"favicon":"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/favicon.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=c951a8095deaeea8c05a37884471cede","background":{"color":{"dark":"#202020"}},"navbar":{"links":[{"href":"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform","label":"Support"}],"primary":{"type":"button","label":"Download Phantom","href":"https://phantom.app/download"}},"footer":{"socials":{"website":"https://phantom.com","github":"https://github.com/phantom"}},"errors":{"404":{"redirect":false,"title":"Page Not Found","description":"The page you're looking for may have been moved, renamed, or doesn't exist. Here are some helpful resources:\n\n\u003cCardGroup cols={2}>\n \u003cCard title=\"Introduction\" icon=\"book-open\" href=\"/introduction\">\n Start here to learn about Phantom wallet integration\n \u003c/Card>\n \u003cCard title=\"Phantom Connect\" icon=\"link\" href=\"/phantom-connect\">\n Enable users to connect using Social Login or browser extension\n \u003c/Card>\n \u003cCard title=\"SDK Overview\" icon=\"code\" href=\"/wallet-sdks-overview\">\n Choose the right SDK for your application\n \u003c/Card>\n \u003cCard title=\"FAQ\" icon=\"circle-question\" href=\"/resources/faq\">\n Find answers to common questions\n \u003c/Card>\n \u003cCard title=\"Support\" icon=\"life-ring\" href=\"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform\">\n Get help from our developer support team\n \u003c/Card>\n\u003c/CardGroup>"}},"contextual":{"options":["claude","copy","view","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Announcements","icon":"telegram","href":"https://t.me/+R0vUw_QWSO9lNjlh"},{"anchor":"Support","icon":"life-ring","href":"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform"},{"anchor":"GitHub","icon":"github","href":"https://github.com/phantom"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"phantom-e50e2e68","hasAudioNarration":false,"actualSubdomain":"phantom-e50e2e68","customDomains":["docs.phantom.com"],"gitSource":{"type":"github","owner":"phantom","repo":"docs-v2","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED","enabled":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b045eab5d82e313e759685a","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"Developer tools and resources","count":79},{"language":"default","tag":"Traditional Provider","count":37},{"language":"default","tag":"Phantom Connect SDKs","count":23},{"language":"default","tag":"Recipes","count":23},{"language":"default","tag":"EVM networks","count":19},{"language":"default","tag":"Mobile Deep Links","count":16},{"language":"default","tag":"Provider API Reference","count":14},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Overview","count":9},{"language":"default","tag":"Phantom Portal","count":8}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"phantom-cli/commands","slug":"/phantom-cli/commands","pageMetadata":{"title":"Commands","description":"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.","href":"/phantom-cli/commands"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`phantom --help`}),` or `,_jsx(_components.code,{children:`phantom \u003ccommand> --help`}),` for inline documentation.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`wallet`,children:`Wallet`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` wallet`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` status`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Check session status (no API call)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` wallet`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` addresses`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get all wallet addresses (Solana, EVM, Bitcoin, Sui)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` wallet`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` balances`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get token balances with USD prices across all chains`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` wallet`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rebalance`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Rebalance portfolio to a target allocation`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:_jsx(_components.strong,{children:`Sui support has been deprecated.`})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`tokens-\u0026-swaps`,children:`Tokens \u0026 Swaps`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` buy`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Swap tokens on Solana, supported EVM networks, or cross-chain`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` transfer`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Transfer native tokens or SPL/ERC-20 tokens`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` simulate`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Simulate a transaction and preview asset changes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pay`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Pay for API access using tokens`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`phantom-buy`,children:_jsx(_components.code,{children:`phantom buy`})}),`\n`,_jsx(_components.p,{children:`Swap tokens on Solana, across supported EVM networks, or between chains (including Hyperliquid):`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Swap SOL to USDC on Solana`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` buy`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --sellTokenIsNative`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --buyTokenMint`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` EPjFWdd5...`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amount`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.1`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amountUnit`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ui`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --execute`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Bridge USDC from Solana to Base`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` buy`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --sellTokenMint`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` EPjFWdd5...`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --buyChainId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` eip155:8453`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --buyTokenIsNative`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amount`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amountUnit`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ui`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --execute`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Deposit to Hyperliquid (bridge SOL into HL spot)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` buy`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --sellTokenIsNative`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --buyChainId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` hypercore:mainnet`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --buyTokenMint`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0x00000000000000000000000000000000`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amount`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.05`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amountUnit`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ui`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --execute`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Omit `,_jsx(_components.code,{children:`--execute`}),` to get a quote preview only.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`solana`,children:`Solana`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` solana`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` send`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Sign and broadcast a base64-encoded Solana transaction`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` solana`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sign`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Sign a UTF-8 message (returns base58 signature)`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`evm`,children:`EVM`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Arbitrum (`,_jsx(_components.code,{children:`eip155:42161`}),`) is rejected by `,_jsx(_components.code,{children:`phantom evm send`}),`, `,_jsx(_components.code,{children:`phantom transfer`}),`, and `,_jsx(_components.code,{children:`phantom buy`}),`; it remains valid for perps withdrawals. BNB Smart Chain (`,_jsx(_components.code,{children:`eip155:56`}),`; chain ID `,_jsx(_components.code,{children:`56`}),`) is unsupported. See the `,_jsx(_components.a,{href:`/phantom-mcp-server/tools#supported-networks`,children:`supported networks`}),`.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` evm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` send`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Sign and broadcast an EVM transaction`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` evm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sign`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Sign an EVM personal message (EIP-191)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` evm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sign-typed`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Sign EVM typed data (EIP-712)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` evm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` allowance`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get ERC-20 token allowance for a spender address`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`bitcoin`,children:`Bitcoin`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bitcoin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` recover`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Preview or confirm a recovery transfer to your BIP84 address`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Starting with `,_jsx(_components.code,{children:`@phantom/cli@3.0.3`}),`, the default Bitcoin address is the BIP84 Native SegWit receiving address that Phantom Wallet uses (`,_jsx(_components.code,{children:`m/84'/0'/0'/0/\u003caddress_index>`}),`). Earlier SDK versions derived a different Native SegWit address (`,_jsx(_components.code,{children:`m/84'/0'/\u003caccount_index>'/0`}),`). Funds sent to that earlier address do not move automatically. Use the BIP84 address for new deposits. `,_jsx(_components.code,{children:`phantom wallet balances`}),` reports BTC at the earlier address separately, in `,_jsx(_components.code,{children:`legacySdkBitcoinBalance`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`phantom-bitcoin-recover`,children:_jsx(_components.code,{children:`phantom bitcoin recover`})}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Preview the transfer`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bitcoin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` recover`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Review the preview, then paste its exact quoteId value`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`QUOTE_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cquoteId from the preview>\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Confirm the reviewed transfer`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bitcoin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` recover`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --confirmed`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --quote-id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$QUOTE_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Review the sender, recipient, amount, fee, notices, and simulation warnings before you confirm. Repeat the same command and options with `,_jsx(_components.code,{children:`--confirmed --quote-id`}),`. Quotes expire after five minutes. If the quote expires or the transaction changes, request a new preview. `,_jsx(_components.code,{children:`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.`]}),`\n`,_jsxs(_components.p,{children:[`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 `,_jsx(_components.code,{children:`--derivation-index`}),` to recover a different index (default: `,_jsx(_components.code,{children:`0`}),`). See `,_jsx(_components.a,{href:`/phantom-mcp-server/tools#bitcoin_recover`,children:_jsx(_components.code,{children:`bitcoin_recover`})}),` for the full response shape.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`perpetuals-hyperliquid`,children:`Perpetuals (Hyperliquid)`}),`\n`,_jsxs(_components.p,{children:[`Full perpetuals documentation: `,_jsx(_components.a,{href:`/phantom-mcp-server/perps`,children:`PERPS guide`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` markets`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # List available perpetual markets with prices`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` account`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get account balance, available margin, and withdrawable amount`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` positions`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get all open positions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` orders`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get all open orders`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` history`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get recent trade history`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` open`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Open a long or short position (market or limit)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` close`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Close an open position`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cancel`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Cancel an open order`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` leverage`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Update leverage for a market`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` deposit`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Bridge tokens from external chain into Hyperliquid spot`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` transfer`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Move USDC from Hyperliquid spot into perps account`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` withdraw`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Bridge USDC from perps account to an external chain`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` withdraw-hl-spot`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Bridge USDC from Hyperliquid spot to an external chain`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`perps-workflow`,children:`Perps workflow`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Fund and trade:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Bridge SOL into Hyperliquid spot`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` deposit`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --sourceChainId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` solana:mainnet`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amount`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.1`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --sellTokenIsNative`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --execute`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Move USDC from spot into perps account`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` transfer`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amountUsdc`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Open a leveraged long position`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` open`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --market`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` BTC`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --direction`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` long`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --sizeUsd`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 50`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --leverage`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --orderType`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` market`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Exit and withdraw:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Close the position`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` close`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --market`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` BTC`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Bridge USDC from perps back to Solana`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` withdraw`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amountUsdc`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --destinationChainId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` solana:mainnet`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Or bridge USDC from Hyperliquid spot to Solana (if funds are already in spot)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`phantom`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` perps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` withdraw-hl-spot`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --amountUsdc`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --destinationChainId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` solana:mainnet`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`global-flags`,children:`Global flags`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Flag`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--help`})}),_jsx(_components.td,{children:`Show help for the current command`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--version`})}),_jsx(_components.td,{children:`Show CLI version`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--mcp`})}),_jsx(_components.td,{children:`Start the CLI as an MCP stdio server`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`--wallet-id`}),` and `,_jsx(_components.code,{children:`--derivation-index`}),` belong to the commands whose schemas include them. `,_jsx(_components.code,{children:`phantom wallet status`}),` and `,_jsx(_components.code,{children:`phantom login`}),` do not take those flags. `,_jsx(_components.code,{children:`phantom wallet balances`}),` takes `,_jsx(_components.code,{children:`--derivation-index`}),` starting with `,_jsx(_components.code,{children:`@phantom/cli@3.0.3`}),`, but not `,_jsx(_components.code,{children:`--wallet-id`}),`. `,_jsx(_components.code,{children:`phantom login`}),` takes `,_jsx(_components.code,{children:`--display-mode browser`}),` or `,_jsx(_components.code,{children:`--display-mode text`}),`. Chain reads use the SDK endpoint for the selected network. There is no `,_jsx(_components.code,{children:`rpcUrl`}),` flag.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Commands","description":"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.","href":"/phantom-cli/commands"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Wallet","slug":"wallet","depth":2,"children":[]},{"title":"Tokens \u0026 Swaps","slug":"tokens-\u0026-swaps","depth":2,"children":[{"title":"phantom buy","slug":"phantom-buy","depth":3,"children":[]}]},{"title":"Solana","slug":"solana","depth":2,"children":[]},{"title":"EVM","slug":"evm","depth":2,"children":[]},{"title":"Bitcoin","slug":"bitcoin","depth":2,"children":[{"title":"phantom bitcoin recover","slug":"phantom-bitcoin-recover","depth":3,"children":[]}]},{"title":"Perpetuals (Hyperliquid)","slug":"perpetuals-hyperliquid","depth":2,"children":[{"title":"Perps workflow","slug":"perps-workflow","depth":3,"children":[]}]},{"title":"Global flags","slug":"global-flags","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/phantom-e50e2e68/f7f937fb83d93950/analytics.js"],"subdomain":"phantom-e50e2e68","siteName":"Phantom developer documentation","title":"Commands - Phantom developer documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-23T14:42:27.639Z","originalFileLocation":"phantom-cli/commands.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Phantom developer documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Commands - Phantom developer documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Phantom developer documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.phantom.com/phantom-cli/commands\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://phantom-e50e2e68.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Commands\u0026amp;description=Full+reference+for+all+Phantom+CLI+commands%2C+including+wallet%2C+swap%2C+transfer%2C+signing%2C+and+perpetuals+trading.\u0026amp;theme=5265053dc1d774e2df120e48\u0026amp;signature=f3f302030fee8eadbc909112aecee6fea2b58000022c85e2e32cf4ccc990c914\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Commands - Phantom developer documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://phantom-e50e2e68.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Commands\u0026amp;description=Full+reference+for+all+Phantom+CLI+commands%2C+including+wallet%2C+swap%2C+transfer%2C+signing%2C+and+perpetuals+trading.\u0026amp;theme=5265053dc1d774e2df120e48\u0026amp;signature=f3f302030fee8eadbc909112aecee6fea2b58000022c85e2e32cf4ccc990c914\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Phantom developer documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#AB9FF2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.phantom.com/phantom-cli/commands\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/phantom-cli/commands.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.phantom.com/#organization\",\"name\":\"Phantom developer documentation\",\"url\":\"https://docs.phantom.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/logo/phantom-light.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=e900bab5ae2cffa45148551c3678ce46\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.phantom.com#website\",\"name\":\"Phantom developer documentation\",\"url\":\"https://docs.phantom.com\",\"publisher\":{\"@id\":\"https://docs.phantom.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.phantom.com/phantom-cli/commands#webpage\",\"url\":\"https://docs.phantom.com/phantom-cli/commands\",\"name\":\"Commands\",\"description\":\"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.\",\"dateModified\":\"2026-11-23T14:42:27.639Z\",\"isPartOf\":{\"@id\":\"https://docs.phantom.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.phantom.com/phantom-cli/commands#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.phantom.com/phantom-cli/commands#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.phantom.com/phantom-cli/installation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Commands\",\"item\":\"https://docs.phantom.com/phantom-cli/commands\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.phantom.com/phantom-cli/commands#article\",\"headline\":\"Commands\",\"name\":\"Commands\",\"description\":\"Full reference for all Phantom CLI commands, including wallet, swap, transfer, signing, and perpetuals trading.\",\"url\":\"https://docs.phantom.com/phantom-cli/commands\",\"mainEntityOfPage\":{\"@id\":\"https://docs.phantom.com/phantom-cli/commands#webpage\"},\"dateModified\":\"2026-11-23T14:42:27.639Z\",\"publisher\":{\"@id\":\"https://docs.phantom.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.phantom.com#website\"}}]}\u003c/script>","agentPointerHref":"/phantom-cli/commands.md","siteName":"Phantom developer documentation","nav":{"global":{"anchors":[{"anchor":"Announcements","icon":"telegram","href":"https://t.me/+R0vUw_QWSO9lNjlh"},{"anchor":"Support","icon":"life-ring","href":"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform"},{"anchor":"GitHub","icon":"github","href":"https://github.com/phantom"}]},"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/introduction"}]},{"tab":"Phantom MCP server","pages":[{"title":"Phantom MCP server","href":"/phantom-mcp-server"}]},{"tab":"Phantom CLI","groups":[{"group":"Overview","pages":[{"title":"Phantom CLI","href":"/phantom-cli"}]},{"group":"Reference","pages":[{"title":"Installation","description":"Install the Phantom CLI, authenticate, and configure your environment.","href":"/phantom-cli/installation"},{"title":"Commands","href":"/phantom-cli/commands"}]}]},{"tab":"Phantom Connect SDKs","pages":[{"title":"Phantom Connect SDKs","href":"/wallet-sdks-overview"}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/recipes"}]},{"tab":"Developer tools and resources","pages":[{"title":"Developer tools and resources","href":"/developer-powertools/overview"}]}]},"basePath":"","title":"Commands - Phantom developer documentation","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}