OpenClaw Fundamentals Features & Use Cases

OpenClaw + Solana: Build a Crypto Agent in Under 1 Hour

A working Solana monitoring and trading agent — wallet alerts, DEX price triggers, and conditional buy/sell execution — built with OpenClaw in under 60 minutes. Every step, with the exact config that works.

TC
T. Chen
AI Systems Engineer
Jan 23, 2025 14 min read 8.1k views
Updated Jan 23, 2025
Key Takeaways
  • A Helius or QuickNode RPC with WebSocket support is required — public RPCs drop connections under real monitoring load
  • The OpenClaw Solana skill connects via WebSocket and fires triggers on wallet balance changes, token transfers, and DEX price thresholds
  • Jupiter aggregator integration gives access to all major Solana DEXes through a single swap interface
  • Never store the trading wallet private key in YAML config — use environment variables and a dedicated low-balance wallet
  • Paper-trade on devnet for at least one week before switching to mainnet with real capital

Solana moves fast. Prices shift, wallets fill, opportunities open and close in seconds. Watching it manually is a losing strategy. A properly configured OpenClaw agent monitors everything in real time, alerts you instantly, and executes predefined trades without waiting for you to wake up or notice the move. Here's the exact build — from RPC connection to live trade execution — completed in under an hour.

Prerequisites Before You Start

Three things need to be in place before the first line of config. First, a running OpenClaw installation with the Solana skill installed. If you haven't installed the Solana skill yet, run openclaw skill install solana from your OpenClaw CLI. Second, a Helius or QuickNode account — the free tier on both covers enough RPC calls and WebSocket connections for a monitoring agent. Third, a dedicated Solana wallet for the agent to operate from, separate from any wallet holding significant funds.

That last point matters more than most builders realize. We'll get to the exact safety configuration in a moment — but first, understand why the RPC provider choice determines whether your monitoring actually works.

⚠️
Public RPCs Will Fail You

Solana's public RPC endpoints rate-limit aggressively and don't guarantee WebSocket connection stability. For anything beyond occasional manual queries, use a dedicated provider. Helius free tier supports 100k requests/day and stable WebSocket connections — more than enough for a single monitoring agent.

Connecting the Solana RPC

Open your OpenClaw agent YAML configuration and add the Solana skill block. Replace the placeholder RPC URLs with your actual Helius or QuickNode endpoints.

skills:
  - name: solana
    rpc_url: "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY"
    ws_url: "wss://mainnet.helius-rpc.com/?api-key=YOUR_KEY"
    network: mainnet-beta
    commitment: confirmed

The commitment level controls how finalized a transaction must be before the skill considers it confirmed. confirmed is the right default for monitoring — it's fast enough for alerts without catching transactions that later roll back. Use finalized only for trade execution where you need absolute certainty.

Restart your OpenClaw agent after adding the skill block. The agent connects to the WebSocket endpoint at startup and maintains the connection for the session. You should see a solana skill connected — mainnet-beta log line within a few seconds of restart.

Building the Wallet Monitoring Skill

Wallet monitoring is the foundation. Once the agent watches a wallet, every incoming transfer, outgoing transaction, and token balance change fires an event your agent can act on. Add the watch configuration to your skill block.

skills:
  - name: solana
    rpc_url: "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY"
    ws_url: "wss://mainnet.helius-rpc.com/?api-key=YOUR_KEY"
    network: mainnet-beta
    commitment: confirmed
    watch_wallets:
      - address: "YOUR_WALLET_ADDRESS"
        label: "main-trading-wallet"
        alert_on: [balance_change, token_transfer, large_inflow]
        large_inflow_threshold_sol: 10

The alert_on array controls which events fire triggers. balance_change catches any SOL movement. token_transfer catches SPL token activity. large_inflow fires only when incoming SOL exceeds your defined threshold — useful for high-signal alerts without noise from small transactions.

💡
Route Alerts to Telegram

Connect your Solana monitoring agent to a Telegram channel for instant mobile alerts. Add a Telegram channel in your OpenClaw config and set alert_channel: telegram in the Solana skill. You'll get formatted wallet event messages delivered in real time to your phone.

Setting Up DEX Price Alerts

Price monitoring watches token pair prices on Solana DEXes and fires triggers when thresholds are crossed. This is where most builders spend the most configuration time — getting the right threshold logic makes the difference between useful alerts and constant noise.

price_monitors:
  - pair: "SOL/USDC"
    source: jupiter
    alert_above: 220.00
    alert_below: 180.00
    check_interval_seconds: 30
  - pair: "JUP/USDC"
    source: jupiter
    alert_above: 1.50
    alert_below: 0.80
    check_interval_seconds: 60

Jupiter aggregator is the recommended price source because it aggregates liquidity across Raydium, Orca, and other pools — giving you the best available market price rather than a single pool's price which can be manipulated. The check_interval_seconds value controls polling frequency. Balance this against your RPC plan's request limits.

Each price alert fires a trigger with the current price, the threshold crossed, and a timestamp. Your agent's LLM layer can then decide what to do — alert you, log it, or trigger a conditional trade.

Configuring Automated Buy/Sell Triggers

This is where the agent goes from passive monitor to active participant. Trade triggers connect price events or wallet events to actual swap execution via Jupiter. Before configuring this section, understand clearly that automated trading carries real financial risk — errors in configuration can result in unintended trades.

trade_triggers:
  - name: "SOL dip buy"
    condition: price_below
    pair: "SOL/USDC"
    threshold: 185.00
    action: swap
    from_token: USDC
    to_token: SOL
    amount_usdc: 50
    slippage_bps: 50
    enabled: true

The amount_usdc field sets a hard dollar cap per trade. Never configure a trade trigger without a hard cap — percentage-based sizing sounds elegant but becomes dangerous when you haven't paper-traded the full logic chain. Set absolute dollar amounts until you have months of live data on your agent's execution behavior.

The slippage_bps field sets maximum acceptable slippage in basis points. 50 bps (0.5%) is a reasonable default for major pairs during normal market conditions. High-volatility moments may require higher slippage to execute — but if you raise slippage significantly, also reduce trade size proportionally.

Safety Guardrails That Are Non-Negotiable

Every Solana trading agent needs three safety layers configured before any capital touches mainnet. These are not optional additions — they're the minimum viable safety configuration.

Daily spend limit: Set a maximum total USDC or SOL the agent can deploy in a 24-hour window across all trade triggers. When the limit is hit, all trading halts until the window resets.

Kill switch: Configure a message your agent listens for that instantly disables all trade triggers. A simple Telegram message to your agent like "halt all trades" should flip enabled: false on every trigger and confirm the halt. Test this before you go live.

Dedicated wallet with limited balance: The agent's signing wallet should only ever hold the funds you explicitly want it to deploy. Never point it at a wallet with significant holdings. Load it with exactly the capital you've decided to commit, nothing more.

Common Mistakes in Solana Agent Builds

  • Using a public RPC for production — they drop WebSocket connections unpredictably. Your monitoring agent goes silent without you knowing. Use a paid provider with uptime guarantees.
  • Storing wallet private keys in YAML — config files get committed to version control, shared in support chats, backed up to cloud storage. Use environment variables exclusively for any secret that controls funds.
  • Setting check intervals too low — polling every second for price data burns through RPC request quotas in hours. Thirty-second intervals work for most alert strategies; use WebSocket subscriptions for anything requiring faster response.
  • Skipping devnet testing — Solana's devnet is a full-featured test environment with free test SOL. There is no valid reason to skip it. Run your complete agent logic on devnet for at least a week before touching mainnet.
  • No position size cap on trade triggers — a misconfigured trigger can execute repeatedly. Hard caps on every trigger prevent small config errors from becoming large losses.

Frequently Asked Questions

What Solana RPC provider works best with OpenClaw?

Helius and QuickNode are the most reliable choices. Both offer WebSocket support for real-time event streaming — essential for wallet monitoring and DEX price alerts. Free-tier public RPCs work for testing but drop connections under any sustained monitoring load.

Can OpenClaw execute Solana transactions automatically?

Yes — the Solana skill signs and broadcasts transactions using a configured wallet private key. Always store the key in environment variables, never in YAML files. Use a dedicated trading wallet with limited funds to contain any execution errors before they reach significant capital.

How do I monitor a Solana wallet with OpenClaw?

Configure the Solana skill with your RPC WebSocket URL and the target wallet address. The skill subscribes to account change events and fires a trigger on any balance or token holding change. Route those triggers to Telegram, Discord, or email for instant alerts.

What DEXes does the OpenClaw Solana skill support?

The built-in skill integrates with Jupiter aggregator for swaps, giving access to Raydium, Orca, and other major Solana DEXes through a single interface. Direct pool monitoring for Raydium and Orca is also supported for raw pool data when needed.

Is a Solana trading agent safe to run with real money?

Only after thorough paper-trading on devnet. Run your agent against a devnet wallet for at least one week before switching to mainnet. Set hard position size limits and implement a kill-switch trigger that halts all trading instantly. Never deploy capital you can't afford to lose to an untested system.

How do I handle Solana RPC rate limits in OpenClaw?

Configure retry logic and request throttling in the Solana skill settings. Match your polling frequency to your plan tier's rate limits. For WebSocket subscriptions, one connection per monitored address is the practical limit before connection management becomes a significant operational overhead.

TC
T. Chen
AI Systems Engineer

T. Chen designs and deploys AI agent systems for high-frequency data environments. Has built OpenClaw-based Solana monitoring agents for DeFi operators and crypto funds, with production deployments running on Helius and QuickNode infrastructure since mid-2024.

Crypto Agent Build Guides

Weekly OpenClaw DeFi and trading agent guides, free.