Skip to Content

Examples

Real-world workflows showing how AI agents interact with SharkBlock through MCP.


Token Research Workflow

Before trading any token, have your agent do thorough research:

You: “Research the token DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 on Solana. I want to know if it’s safe to trade.”

Agent workflow:

  1. get_token_info — Gets price, market cap, volume, security score, and available trading pairs
  2. get_token_holders — Checks holder distribution and whale concentration
  3. get_token_chart — Pulls OHLCV data for trend analysis
  4. get_token_trades — Reviews recent buy/sell activity

Agent response: A comprehensive analysis with price, liquidity, security risks (rugpull probability, ownership concentration), holder distribution, and a trading recommendation.


Paper Trading Setup

Test a strategy risk-free with shadow mode:

You: “Set up paper trading for me. I want to test a strategy with 0.5 SOL per trade.”

Agent workflow:

  1. create_wallet — Creates a shadow wallet (type: "shadow")
  2. fund_shadow_wallet — Adds 5 SOL (amount: "5000000000")
  3. create_strategy — Sets up the strategy with:
    • 0.5 SOL per position (amount: "500000000")
    • Max 3 concurrent positions
    • 50% take-profit target (5000 bps)
    • 20% stop-loss target (2000 bps)
  4. start_strategy — Activates the bot

You (later): “How is my paper trading going?”

Agent workflow:

  1. list_strategies — Finds the shadow strategy
  2. get_strategy_stats — Gets PnL, win rate, total trades
  3. list_positions — Shows current open positions

Daily Trading Briefing

You: “Give me my morning trading briefing.”

Agent workflow:

  1. list_wallets — Gets all wallets with balances
  2. get_wallet_pnl — PnL for each wallet
  3. list_strategies — Status of all strategies (active/paused)
  4. list_positions — All open positions across strategies
  5. discover_trending — Today’s trending tokens
  6. list_notifications — Any alerts from overnight

Agent response: A summary covering portfolio value, overnight performance, active positions with current PnL, and new opportunities.


Smart Position Management

You: “Check my positions on wallet 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU. Close anything that’s down more than 15%.”

Agent workflow:

  1. list_strategies — Finds the strategy for this wallet
  2. list_positions — Gets all open positions with PnL data
  3. For each position down >15%:
    • close_position — Executes a sell swap with current market params
  4. Reports which positions were closed and the realized losses

Strategy Optimization

You: “Pause my strategy, tighten the stop-loss to 10% on all open positions, then resume.”

Agent workflow:

  1. pause_strategy — Stops the bot from opening new positions
  2. list_positions — Gets all open positions
  3. For each position with a stop-loss >10%:
    • update_position_target — Updates to 1000 bps (10%)
  4. start_strategy — Resumes the bot

Wallet Analysis

You: “Analyze this wallet: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM. Is this a good trader to copy?”

Agent workflow:

  1. analyze_wallet — Full wallet analysis including:
    • Portfolio composition
    • Active positions
    • Trading history
    • Win rate and performance metrics

Agent response: A trader profile with win rate, average hold time, preferred tokens, risk profile, and whether their strategy aligns with your goals.


Multi-Step Strategy Creation

You: “I want to create a sniper strategy. Find tokens with high volume and momentum, enter fast with anti-MEV, take profit at 30% and 60%, stop-loss at 15%.”

Agent workflow:

  1. list_wallets — Finds a delegated wallet
  2. create_strategy — Creates strategy with:
    { "amount": "100000000", "maxConcurrentPositions": 5, "targets": [ { "type": "TAKE_PROFIT", "triggerPercentageBps": 3000, "amountPercentageBps": 5000 }, { "type": "TAKE_PROFIT", "triggerPercentageBps": 6000, "amountPercentageBps": 10000 }, { "type": "STOP_LOSS", "triggerPercentageBps": 1500, "amountPercentageBps": 10000 } ], "buyPreset": { "slippage": 1.0, "priorityFees": 100000, "antiMev": true }, "sellPreset": { "slippage": 1.0, "priorityFees": 100000, "antiMev": true } }
  3. start_strategy — Launches the bot

Notification Management

You: “I’m getting too many notifications. Disable the ones about bot starting and stopping, keep the trade alerts.”

Agent workflow:

  1. get_notification_preferences — Gets current settings
  2. update_notification_preferences — Disables:
    { "disabledTypes": ["bot-enabled", "bot-disabled"] }

Tips for AI Agents

Do Research First

Always call get_token_info with includeSecurity: true before creating strategies or opening positions. This prevents trading honeypot tokens or low-liquidity scams.

Use Shadow Mode for Testing

Before deploying real capital, test with shadow wallets. The trading logic is identical — only the execution is simulated.

Respect Rate Limits

Market data tools share a 60 req/min limit. If you need to analyze many tokens, batch your research rather than calling them in rapid succession.

Check Delegation

Before calling start_strategy, verify the wallet has delegation enabled with get_wallet. Strategies on non-delegated wallets will fail to start.

Amounts Are in Atomic Units

All token amounts use atomic units (lamports for SOL). 1 SOL = 1,000,000,000 lamports. Basis points (bps) are used for percentages: 100 bps = 1%.

Last updated on