Skip to main content

Prerequisites

  • A LaserSell API key (get one here).
  • A Solana keypair file (JSON array of bytes).
  • Node.js 18+ (for the TypeScript example) or the runtime for your preferred language.
Using AI to code? Add the LaserSell MCP server to your editor so your AI assistant can search LaserSell documentation in real time. Works with Claude Code, Claude Desktop, Cursor, and Windsurf.

Example 1: Build, Sign, and Send a Sell Transaction

This example calls the LaserSell API to build an unsigned sell transaction, signs it locally, and submits through Helius Sender.

Example 2: Auto Sell with the Exit Intelligence Stream

Connect the Exit Intelligence Stream to monitor wallets and automatically execute exits when your strategy thresholds are reached.
Connect the stream before you buy. The stream detects positions by watching for on chain token arrivals. If you call /v1/buy before the stream is connected and configured, the position will not be tracked. Always start the stream first, then submit your buy transaction.

Next Steps