Skip to content
Skip to content

Solana Trading

Your Balchemy bots 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 bot can search tokens, fetch live quotes, run security checks, and execute swaps, either in response to natural language chat commands or through programmatic strategy triggers.

The trading engine is a Rust-based service that handles execution, risk policy enforcement, and on-chain transaction signing. Your bot is the AI layer that decides what to trade; the engine ensures each decision is safe and cost-efficient before it touches the chain.

Prerequisites

  • A custodial Solana wallet created and set as primary (see Wallet Management)
  • The custodial wallet funded with SOL (for gas) and your input token (typically SOL or USDC)
  • A bot with the trade scope enabled (see Bot Settings)

Warning: Solana trading is only available with custodial wallets. External delegate wallets cannot sign transactions automatically. If you connect an external wallet, your bot will present trade summaries but will not execute them.


Two ways to trigger a Solana trade

1. Natural language via chat

Open your bot's chat at /studio/chat/[botId] 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"

Your bot interprets the request, resolves token addresses, fetches a quote, runs the pre-trade report, and presents a trade summary for your confirmation before submitting. You can also configure your bot to execute trades autonomously without a confirmation step by enabling autoApprove in the default order profile.

2. Strategy automation

In the bot's Automation tab (/studio/bots/[botId]/automation), you can set rules that trigger Solana swaps automatically based on price conditions, technical signals, or scheduled DCA intervals. When a rule fires, the same pipeline — quote → pre-trade report → policy check → execute — runs without any manual input.


Fee structure

Balchemy charges a platform fee on every Solana swap using Jupiter's feeAccount mechanism:

Account typeFee rate
Standard1.0% of input amount
Enterprise (Bot.policyMode = enterprise)0.5% 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 on a standard account, 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 categorySuggested slippage
SOL, USDC, major tokens50 bps (0.5%)
Mid-cap DeFi tokens100–200 bps (1–2%)
Low-cap meme tokens300–500 bps (3–5%)

You can set a default slippage for all trades in Trading Settings or override it per-trade in chat ("buy BONK with 2% slippage"). The trading engine rejects trades where the actual on-chain price impact exceeds the maxSlippage value configured in your pool preferences.


Pre-trade security checks

Before any Solana swap is submitted, the trading engine automatically runs a pre-trade report combining two data sources.

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. You can override this guard in the bot's Risk tab 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 bot has access to these tools for Solana token research before and independent of trading:

Tool nameWhat it does
trading_solana_jupiter_tokens_searchSearch tokens by name or symbol via Jupiter's token list
trading_solana_jupiter_priceGet current prices for one or more mint addresses
trading_solana_jupiter_quoteFetch a live swap quote without executing
trading_solana_rugcheck_reportFull RugCheck report for a mint address
trading_solana_token_insightsOn-chain mint details and top holder distribution
trading_solana_pretrade_reportCombined pre-trade checklist (RugCheck + insights + quote)

You can trigger any of these from chat by asking your bot 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 bot:

  1. Fetches a live quote.
  2. Runs the pre-trade report.
  3. Presents the quote, fee, slippage, and risk summary to you in chat.
  4. Waits for your explicit confirmation before submitting.

When submit: true is set — either by your confirmation in chat or by an automation rule with autoApprove enabled — 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 type "buy 50 USDC of BONK" in chat:

  1. Token resolution — Your bot searches for BONK's mint address using trading_solana_jupiter_tokens_search.
  2. Quotetrading_solana_jupiter_quote returns the expected BONK output, route details, and price impact at current market conditions.
  3. Pre-trade reporttrading_solana_pretrade_report runs RugCheck and token insights on the BONK mint address in parallel.
  4. Policy check — The trading engine verifies the trade would not breach your configured max drawdown, daily loss limit, or max position size.
  5. Summary in chat — Your bot shows you the quote, platform fee, slippage, and BONK's RugCheck risk level.
  6. Confirmation — You type "confirm" (or your bot auto-approves if autoApprove is enabled).
  7. Executiontrading_solana_jupiter_swap is called with submit: true. The engine constructs the Jupiter swap transaction and signs it with your custodial wallet's private key.
  8. On-chain verification — The engine monitors the transaction until it is confirmed on the Solana network.
  9. Order update — The order status updates to filled. The Trading Dashboard and Trade History reflect the result in real time via the WebSocket connection.

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 your bot buy a fixed USD amount of a token at regular intervals. DCA strategies run the same swap pipeline on a schedule. You can pause, resume, and monitor active DCA strategies at /studio/trading/dca.

See DCA Management for setup instructions.


Tips and warnings

Tip: Ask your bot 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. You can disable this guard in the bot's Risk configuration, but doing so removes a critical safety layer. Only disable it 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 on the Wallets page (/studio/wallets). 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.


Connection lost. Retrying...