solana-payments-wallets-trading
Pay people in SOL or USDC, buy and sell tokens, check prices, discover trending and new tokens, create and manage Solana wallets, stake SOL, earn yield through lending and managed vaults, borrow against collateral, set up DCA (dollar-cost averaging) and limit orders, provide liquidity across multipl
By solanaguide · 465 installs
npx skills add solanaguide/solana-cli --skill solana-payments-wallets-trading
Source repository · Upstream listing
Payments, Wallets and Trading on Solana
Sol is a command line tool that lets you work with Solana the way you'd
describe it out loud. Instead of constructing transactions and managing
program instructions, you say what you want: pay someone, buy a token,
stake your SOL.
Keys live locally on disk — no private keys in environment variables,
no API keys to configure.
Get Set Up
Prefer npx with @latest — it always runs the latest version with no
global install to manage:
If the user has installed globally ( npm install g @solana compass/cli ),
you can use the shorter sol command instead:
The public RPC endpoint rate limits aggressively. Use a dedicated RPC
for anything beyond testing — Helius, Triton, and QuickNode all offer
free tiers.
Requires Node.js = 20.
Pay Someone
Send SOL, USDC, or any Solana token to a wallet address.
See references/trading commands.md for the full send reference.
Discover Tokens
Browse the Solana token ecosystem — trending, most traded, recently
launched, and more.
Results populate the local token cache, so subsequent token info and
token price calls resolve instantly.
See references/trading commands.md for all categories and flags.
Buy and Sell Tokens
Swap any token for any other token. Queries Jupiter and DFlow in
parallel and picks the best price automatically.
Every swap records the price at execution time, so you can track
cost basis and P&L later.
See references/trading commands.md for slippage, wallet selection, etc.
DCA (Dollar Cost Averaging)
Set up recurring buys that execute automatically over time.
Constraints: $100 total minimum, at least 2 orders, $50/order minimum.
Intervals: minute, hour, day, week, month.
Limit Orders
Place orders that execute when a token hits your target price.
Use quote only to preview the order plan without placing it.
Check Prices
See What You Have
Create and Manage Wallets
Wallets are local key files in ~/.sol/wallets/ — no seed phrases
in environment variables.
Any command can target a specific wallet with wallet <name .
See references/wallet commands.md for import, export, labels, history.
Stake SOL
Delegate SOL to a validator and earn staking rewards. One command
handles the entire process — creating the stake account, funding it,
and delegating.
See references/staking commands.md for validator selection, partial
withdrawals, and force unstake.
Earn Yield by Lending
Compare rates and lend across five protocols — Kamino, MarginFi,
Drift, Jupiter Lend, and Loopscale. The CLI auto picks the best
rate, or you can target a specific protocol with protocol .
See references/lending commands.md for full details.
Earn Yield in Vaults
Managed yield vaults across Kamino Earn and Loopscale. Unlike raw
lending, vaults handle strategy management automatically — you deposit
a token and the protocol optimizes yield. The CLI auto picks the
highest APY vault, or you can target a specific protocol or vault.
Earn positions appear in sol portfolio alongside tokens, staking,
lending, and LP.
Provide Liquidity
Add liquidity to pools across Orca, Raydium, Meteora, and Kamino.
Browse pools by TVL/APY/volume, deposit with flexible price ranges,
track positions with P&L and impermanent loss, and farm for extra
rewards.
See references/lp commands.md for full details including farming,
pool creation, and protocol specific flags.
Trade Prediction Markets
Browse and trade prediction markets from Polymarket and Kalshi via
Jupiter. Categories include crypto, sports, politics, culture, and more.
Positions appear in sol portfolio with unrealized P&L.
See references/prediction commands.md for the full reference.
Pay for APIs with x402
Fetch URLs that require payment via the x402 protocol. Works like
curl — stdout is the response body, payment info goes to stderr.
If the server returns 402 Payment Required, the CLI signs a USDC
transfer and retries with the payment attached. The server submits
the transaction — your wallet only partially signs.
Use dry run to inspect the cost before paying. Use max to
set a spending cap. Output is pipe friendly by default (body on
stdout, payment info on stderr).
See references/fetch commands.md for the full reference including
curl flag mapping and JSON output format.
Track How Your Portfolio Is Doing
See everything in one place — tokens, staked SOL, lending positions,
and open orders.
The portfolio view includes active DCA and limit orders with fill
progress, so locked capital is always visible. A snapshot is taken
automatically on each view (rate limited to every 5 minutes), so
sol portfolio compare always has recent data.
See references/portfolio commands.md for snapshot management.
Structured Output
Every command supports json for structured output, but the
default human readable output is designed to be easy to read and
interpret — both for humans and LLM agents. Use human readable
output unless you are scripting or chaining commands in an
automation pipeline.
The human output uses formatted tables, signposts next actions,
and shows full IDs and addresses so you can copy paste them into
follow up commands. See each command reference for example output.
For programmatic use, json returns a CommandResult<T envelope:
{ "ok": true, "data": { ... }, "meta": { "elapsed ms": 450 } } .
See references/json output format.md for the full schema.
Other Useful Commands
Tips
Keep SOL for gas. Every Solana transaction costs ~0.000005 SOL,
but token account creation costs ~0.002 SOL. Unless the user
specifically asks to drain or close a wallet, keep at least 0.05 SOL
as a reserve so future transactions don't fail.
Use full numbers, not shorthand. The CLI expects literal
amounts: 1000000 not 1m , 50000 not 50k . Always expand
shorthand before passing to a command.
Addresses are raw public keys only. The CLI does not resolve
.sol domains, SNS names, or contact labels — pass the full base58
public key for recipients.
Ambiguous symbols pick the highest liquidity match. If a symbol
maps to multiple tokens, the CLI picks the one with the most
trading volume on Jupiter. It does not prompt. Use sol token info
<symbol to verify what it resolves to, or pass a mint address
to be explicit.
Use quote only on swaps to preview before committing
Use wallet <name to target a specific wallet
The transaction log tracks all operations with USD prices at
execution time — useful for cost basis and P&L
Permissions
The CLI supports fine grained permissions via ~/.sol/config.toml . When a permission is set to false , the gated commands are not registered — they won't appear in help or sol <group help , and invoking them returns "unknown command".
All permissions default to true (omitted = permitted). Example read only config:
Permission Gated subcommands
canTransfer token send
canSwap token swap , token close all , token dca new/cancel , token limit new/cancel
canStake stake new
canWithdrawStake stake withdraw , stake claim mev
canLend lend deposit , earn deposit , lp deposit , lp farm stake , lp create
canWithdrawLend lend withdraw , earn withdraw , lp withdraw , lp claim , lp farm unstake/harvest
canBorrow lend borrow , lend repay
canBurn token burn , token close burn
canCreateWallet wallet create , wallet import
canRemoveWallet wallet remove
canExportWallet wallet export
canFetch fetch (x402 payments)
Read only commands ( token browse/price/info/list , wallet list/balance , stake list , lend rates/positions , earn list/positions , lp pools/info/positions/configs/farm list , portfolio , network , tx ) are always available regardless of permissions.
Security Controls
The CLI provides three layers of protection for agent driven workflows: permissions (what operations are allowed), transaction limits (how much can be spent), and allowlists (which addresses and tokens are permitted).
Setting Up Security
Agents can help configure security settings, then the user reviews and locks:
After locking, security settings can only be changed by a human editing ~/.sol/config.toml directly.
Transaction Limits
Setting Description
limits.maxTransactionUsd Maximum USD value per transaction. Missing = no limit.
limits.maxDailyUsd Maximum total USD spent in a rolling 24h window. Missing = no limit.
Limits apply to: token swap , token send , stake new , lend deposit , lend borrow , DCA creation, and limit order creation. They do not apply to withdrawals to own wallet, MEV claims, or read operations.
Address Allowlist
allowlist.addresses — comma separated list of wallet addresses. When set, outbound transfers ( token send ) are restricted to listed addresses plus all wallets in the local wallet database (own wallets are always allowed). Empty or missing = no restriction.
Token Allowlist
allowlist.tokens — comma separated list of token symbols or mint addresses. When set, both input and output tokens must be in the list for swaps, DCA creation, and limit orders. Empty or missing = all tokens allowed.
Checking Security Status
Shows the full security posture: all permissions and whether they're enabled, transaction limits with current 24h usage, address and token allowlists, whether settings are locked, and warnings about potential risks (e.g. no limits configured, public RPC in use). Agents should use sol config status to understand what they're allowed to do — not by reading config.toml directly.
Important: Filesystem Access
Do not grant agents read or write access to ~/.sol/ . This directory contains your private keys and security configuration. Agents should only interact with Solana through the sol CLI commands, never by reading config or key files directly. After helping set up security, recommend the user lock settings with sol config lock and restrict filesystem access to ~/.sol/ .
Security Model
Private keys are stored as files in ~/.sol/wallets/ . The CLI reads them at transaction signing time — they are never exposed as environment variables or printed to stdout. An LLM agent using this tool cannot read the raw key material without explicitly opening those files, which requires user approval in standard permission modes.
Permissions, limits, and allowlists work together to control what the CLI can do. The agent must have the permission enabled, pass limit and allowlist checks, and get user approval for each CLI invocation.
What this does not protect against: These controls operate at the CLI and agent permission level. They do not prevent other software on the same machine from reading the key files. Any tool, MCP server, plugin, or script running under the same OS user account can read ~/.sol/wallets/ directly. If you grant an agent access to additional tools — especially ones that can read arbitrary files or execute shell commands — those tools can extract your private keys regardless of Sol CLI permissions.
Keep wallet balances appropriate to the risk: use dedicated wallets with limited funds for agent driven workflows, and do not store large holdings in key files accessible to automated tooling.
Troubleshooting
See references/troubleshooting.md for common issues (RPC rate limits,
token resolution, transaction timeouts).