Solana Trading
Balchemy Hub agents trade Solana tokens through Jupiter, the leading Solana liquidity aggregator, with automatic pre-trade security screening on every swap.
What is this?
Solana trading in Balchemy routes every swap through the Jupiter aggregator (jup.ag). Jupiter finds the best route across all major Solana DEXes — including Raydium, Orca, and Meteora — and splits orders across multiple pools when it improves the output price. Your Hub agent can search tokens, fetch live quotes, run security checks, and execute swaps through authorized commands, MCP/API calls, or rules that pass policy.
The trading engine is a Rust-based service that handles execution, risk policy enforcement, and on-chain transaction signing. The agent or operator supplies intent; the engine validates policy, quote, and risk signals before any submitted transaction touches the chain.
Prerequisites
- A custodial Solana wallet created and set as primary through the authorized Hub wallet flow (see Agent Wallet Management)
- The custodial wallet funded with SOL (for gas) and your input token (typically SOL or USDC)
- A Hub agent key or runtime with
tradescope where trading is intended
Warning: Solana trading is only available with custodial wallets. External delegate wallets cannot sign transactions automatically. If you connect an external wallet, the product can present trade summaries but will not execute them.
Two ways to trigger a Solana trade
1. Natural language or MCP/API intent
Use the authorized Hub/agent flow and describe what you want in plain English:
- "Buy 0.5 SOL worth of BONK"
- "Swap 100 USDC for JUP with 1% slippage"
- "Sell 50% of my WIF position"
The agent flow interprets the request, resolves token addresses, fetches a quote, runs the pre-trade report, and presents a trade summary for confirmation before submitting. If the authorized rules/profile allow execution, eligible orders can be submitted through the execution path without an additional chat confirmation.
2. Hub rules and runtime
Hub rules can create Solana trade candidates based on price conditions, technical signals, Signal Sources, or scheduled DCA intervals. When a rule fires, the pipeline still preserves quote, pre-trade status, policy checks, and explicit submitted/blocked/approval-required outcomes.
Fee structure
Balchemy charges a platform fee on every Solana swap using Jupiter's feeAccount mechanism:
| Item | Fee rate |
|---|---|
| Swap fee | 1.0% of input amount |
The fee is deducted from the input token before the swap is submitted to Jupiter. It is passed directly to the Balchemy fee account on-chain and is visible in the transaction explorer. Jupiter also charges its own routing fee (typically 0.04–0.1% depending on the route), which is separate from the Balchemy platform fee.
Tip: The fee is taken from your input token, not from the output. If you sell 1 SOL, 0.01 SOL goes to the Balchemy fee account and 0.99 SOL is routed through Jupiter.
Slippage settings
Slippage tolerance is specified in basis points (bps), where 100 bps = 1%. Balchemy recommends:
| Token category | Suggested slippage |
|---|---|
| SOL, USDC, major tokens | 50 bps (0.5%) |
| Mid-cap DeFi tokens | 100–200 bps (1–2%) |
| Low-cap meme tokens | 300–500 bps (3–5%) |
You can set default slippage through the authorized Hub rules/profile flow or override it per trade where the product flow supports it. The trading engine rejects trades where the actual on-chain price impact exceeds the configured maxSlippage value.
Pre-trade security checks
Before a Solana swap is submitted, the trading engine runs the available pre-trade checks and reports each source as available, degraded, or unavailable instead of treating missing data as safe.
RugCheck (trading_solana_rugcheck_report)
RugCheck is a Solana-native token analysis service. It scores a token's mint address and returns signals including:
- Mint authority — Can the creator mint more tokens?
- Freeze authority — Can the creator freeze your tokens?
- LP lock status — Is the liquidity pool locked from rug pulls?
- Holder concentration — What percentage of supply do top wallets hold?
- Overall risk score — Aggregated rating: low / medium / high / very high
Trades into tokens with a "very high" risk score are blocked by default. Only override risk guards through authorized Hub policy/rules flows if your strategy intentionally trades high-risk tokens and you understand the consequences.
Token Insights (trading_solana_token_insights)
Token Insights queries the Solana RPC directly and returns:
- Mint authority and freeze authority addresses
- Total supply and decimals
- Top holder distribution (wallet addresses and percentages)
This data supplements RugCheck and lets your bot provide a richer assessment in the pre-trade summary.
Token research tools
Your Hub agent has access to these tools for Solana token research before and independent of trading:
| Tool name | What it does |
|---|---|
trading_solana_jupiter_tokens_search | Search tokens by name or symbol via Jupiter's token list |
trading_solana_jupiter_price | Get current prices for one or more mint addresses |
trading_solana_jupiter_quote | Fetch a live swap quote without executing |
trading_solana_rugcheck_report | Full RugCheck report for a mint address |
trading_solana_token_insights | On-chain mint details and top holder distribution |
trading_solana_pretrade_report | Pre-trade checklist with explicit source availability, degradation, and quote status |
You can trigger any of these by asking the agent to research a token before committing to a trade. For example: "Run a pre-trade report on So11111111111111111111111111111111111111112."
Pending vs immediate execution
By default, the trading_solana_jupiter_swap tool runs in plan mode (submit: false). In plan mode the agent:
- Fetches a live quote.
- Runs the pre-trade report.
- Presents the quote, fee, slippage, and risk summary to you in chat.
- Waits for your explicit confirmation before submitting.
When submit: true is set through an authorized confirmation or rule/profile path, the engine signs and broadcasts the transaction immediately. Once submitted, Solana transactions cannot be cancelled.
Example trade flow: buying BONK with 50 USDC
Here is what happens end-to-end when you ask an agent to buy 50 USDC of BONK:
- Token resolution — The agent searches for BONK's mint address using
trading_solana_jupiter_tokens_search. - Quote —
trading_solana_jupiter_quotereturns the expected BONK output, route details, and price impact at current market conditions. - Pre-trade report —
trading_solana_pretrade_reportruns RugCheck and token insights on the BONK mint address in parallel. - Policy check — The trading engine verifies the trade would not breach your configured max drawdown, daily loss limit, or max position size.
- Summary — The agent flow shows you the quote, platform fee, slippage, and BONK's RugCheck risk level.
- Confirmation — You confirm through the authorized flow, or an eligible rule proceeds when policy allows it.
- Submission —
trading_solana_jupiter_swapis called withsubmit: true. The engine constructs the Jupiter swap transaction and signs it with your custodial wallet's private key. - On-chain verification — The engine monitors the submitted transaction until it is confirmed or marked for follow-up.
- Order update — The order status reflects the lifecycle state, such as submitted, confirmed, filled, failed, or reconciliation-required. The Trading Dashboard and Trade History should show that state rather than treating submission as final execution.
Order constraints (P3 policy)
The current Solana trading implementation enforces the following constraint at the engine level:
The
inputMint(the token you are selling) must be native SOL or USDC.
This means you can buy any Solana token using SOL or USDC, but you cannot yet execute token-to-token swaps where both tokens are non-SOL altcoins (for example, BONK → JUP directly). Cross-token swaps via an intermediate hop are on the roadmap.
DCA on Solana
Dollar-cost averaging lets an agent buy a fixed USD amount of a token at regular intervals. DCA strategies run the same swap pipeline on a schedule. Use the Hub rules/runtime and agent detail surfaces where DCA profiles are exposed.
See Rules and Runtime for current Hub runtime guidance.
Tips and warnings
Tip: Ask your agent to "run a pre-trade report on [mint address]" before any unfamiliar token. The response will include the RugCheck risk rating, mint authority status, holder concentration, and the expected trade output — all in one message.
Tip: For meme tokens with thin liquidity, use a trade size under $500 and set slippage to 3–5% to reduce the chance of partial fills or price impact failures.
Warning: Solana transactions that are broadcast cannot be cancelled. Once the engine submits the transaction with
submit: true, it will execute unless it expires (default timeout: 30 seconds). Always verify the quote summary before confirming.
Warning: If RugCheck returns a "very high" risk score, the trade is blocked by default. Only disable this guard through an authorized risk policy flow if you understand the token and accept the risk.
Common issues
"Insufficient balance" when placing a trade. Your custodial Solana wallet does not have enough SOL or USDC. Fund it from an external wallet using the address shown in the Hub wallet flow. Remember to keep at least 0.01 SOL for transaction fees.
"Token not found" when searching by symbol. Jupiter's token list does not include every Solana token by symbol. Search by the full mint address instead. Mint addresses are available on DexScreener, Birdeye, or the project's official website.
"High slippage warning" on the pre-trade report. The current liquidity in the selected pool(s) is insufficient to fill your order without significant price impact. Try reducing the trade size, increasing the slippage tolerance, or waiting for deeper liquidity.
Trade stays in "queued" for more than 2 minutes. The trading engine queue may be under load, or the Solana network is congested. The order will execute as soon as capacity allows. If it remains queued for more than 5 minutes, contact support via the in-app help panel.
The amount I received was less than the quote showed. Slippage is the difference between the quoted price and the final execution price. If the market moved between quote time and execution time, you may receive slightly less than quoted. The actual amount received is shown in the Order Details drawer in Trade History.
RugCheck reports "Mint authority not revoked" — is it safe? An active mint authority means the token creator can print new tokens, diluting your position. This is a significant red flag for most projects. Some legitimate tokens (wrapped assets, certain stablecoins) intentionally keep mint authority. Research the project before proceeding and do not rely solely on RugCheck for investment decisions.
Related pages
- EVM Trading — Trading on Base via 0x aggregation
- Agent Wallet Management — Set up and review Hub agent wallets
- Rules and Runtime — Configure Hub agent rules and runtime state
- Hub Overview — Monitor active Hub agent operations