Low latency Solana execution infrastructure.
Deterministic routing. Adaptive slippage. Non-custodial.
LaserSell is professional Solana execution infrastructure for automated exit strategies. It builds optimized transactions across major Solana DEXs, submits them with adaptive slippage logic, and monitors positions in real time so you can set profit targets, stop losses, trailing stops, and timeouts that fire the millisecond conditions are met.
Supported DEXs and platforms: Pump.fun, Raydium (LaunchLab, CPMM), Meteora (DBC, DAMM v2), Bags.fm.
Non-custodial by design. Your private keys never leave your machine. LaserSell builds unsigned transactions, you sign locally, you submit.
- Automated exit strategies — connect to the Exit Intelligence Stream, receive real-time exit signals with pre-built transactions, sign and submit in milliseconds.
- One-shot sells and buys — build, sign, and submit a single transaction through the LaserSell API with optimized routing and slippage.
- Custom trading bots — combine the stream, retry, and transaction modules to build production trading infrastructure.
- Portfolio management tools — monitor positions, track PnL, and execute exits programmatically across multiple wallets.
- Liquidity aware selling — query real time slippage bands and liquidity trends to size sells optimally. Use
buildPartialSellTx()to sell a portion of a position based on slippage data.
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.
{
"mcpServers": {
"lasersell-docs": {
"type": "streamable-http",
"url": "https://docs.lasersell.io/mcp"
}
}
}For deeper SDK integration, install the LaserSell coding skill so your assistant has full context on SDK patterns, method signatures, examples, and troubleshooting loaded directly into its context window:
npx skills add lasersell/skills# TypeScript / JavaScript
npm install @lasersell/lasersell-sdk
# Python
pip install lasersell-sdk
# Rust
cargo add lasersell-sdk
# Go
go get github.com/lasersell/lasersell-sdk/goSign up for free at app.lasersell.io and create an API key from the dashboard. No credit card required. See the Authentication guide for details.
TypeScript
import {
ExitApiClient,
signUnsignedTx,
sendTransaction,
sendTargetDefaultRpc,
sendTargetRpc,
} from "@lasersell/lasersell-sdk";
import { Keypair } from "@solana/web3.js";
const client = ExitApiClient.withApiKey(process.env.LASERSELL_API_KEY!);
const unsignedTxB64 = await client.buildSellTxB64({
mint: "TOKEN_MINT_ADDRESS",
user_pubkey: "YOUR_WALLET_PUBKEY",
amount_tokens: 1_000_000,
slippage_bps: 2_000,
output: "SOL",
});
const signedTx = signUnsignedTx(unsignedTxB64, keypair);
// Quick start: use the built-in public RPC (rate-limited, not for production)
const signature = await sendTransaction(sendTargetDefaultRpc(), signedTx);
// Production: use a private RPC from Helius, Chainstack, etc.
// const signature = await sendTransaction(sendTargetRpc(process.env.RPC_URL!), signedTx);Python
from lasersell_sdk.exit_api import ExitApiClient, BuildSellTxRequest, SellOutput
from lasersell_sdk.tx import sign_unsigned_tx, send_transaction, SendTargetRpc
client = ExitApiClient.with_api_key("YOUR_API_KEY")
request = BuildSellTxRequest(
mint="TOKEN_MINT_ADDRESS",
user_pubkey="YOUR_WALLET_PUBKEY",
amount_tokens=1_000_000,
slippage_bps=2_000,
output=SellOutput.SOL,
)
unsigned_tx_b64 = await client.build_sell_tx_b64(request)
signed_tx = sign_unsigned_tx(unsigned_tx_b64, keypair)
# Quick start: use the built-in public RPC (rate-limited, not for production)
signature = await send_transaction(SendTargetRpc(), signed_tx)
# Production: use a private RPC from Helius, Chainstack, etc.
# signature = await send_transaction(SendTargetRpc(url="YOUR_RPC_URL"), signed_tx)Connect to the Exit Intelligence Stream to receive real-time exit signals with pre-built transactions.
Important: Connect and configure the stream before submitting a buy transaction. The stream detects positions by watching for on-chain token arrivals. If the stream is not connected when the buy lands, the position will not be tracked. See the Quickstart for the full flow.
import {
StreamClient,
StreamSession,
signUnsignedTx,
sendTransaction,
sendTargetHeliusSender,
} from "@lasersell/lasersell-sdk";
const client = new StreamClient("YOUR_API_KEY");
const session = await StreamSession.connect(client, {
wallet_pubkeys: ["YOUR_WALLET_PUBKEY"],
strategy: { target_profit_pct: 50, stop_loss_pct: 10, trailing_stop_pct: 5 },
deadline_timeout_sec: 120,
send_mode: "helius_sender",
tip_lamports: 1000,
});
while (true) {
const event = await session.recv();
if (event === null) break;
if (event.type === "exit_signal_with_tx" && event.message.type === "exit_signal_with_tx") {
const signed = signUnsignedTx(event.message.unsigned_tx_b64, signer);
const signature = await sendTransaction(sendTargetHeliusSender(), signed);
console.log(`Exit executed: ${signature}`);
}
}The stream supports four exit conditions. At least one must be enabled. See the Strategy Configuration guide for full details and a trailing stop walkthrough.
| Condition | Field | Description |
|---|---|---|
| Take profit | target_profit_pct |
Exit when profit reaches this % of entry cost |
| Stop loss | stop_loss_pct |
Exit when loss reaches this % of entry cost |
| Trailing stop | trailing_stop_pct |
Track a high-water mark; exit when profit drops this % of entry cost from its peak |
| Deadline timeout | deadline_timeout_sec |
Exit after this many seconds regardless of PnL |
| Sell on graduation | sell_on_graduation |
Automatically sell when a token graduates from a bonding curve to a full DEX (e.g. Pump.fun to PumpSwap) |
Trailing stop is useful for locking in gains during a pump. For example, with trailing_stop_pct: 5 and an entry of 100 SOL: if profit peaks at 30 SOL, an exit triggers when profit falls below 25 SOL. The trailing stop only fires after the position has been in profit (peak > 0), so it won't trigger on a position that has only gone down.
Add or remove watched wallets without reconnecting:
await session.sender().updateWallets(["WALLET_1", "WALLET_2"]);The server diffs the new list against the current set and registers/unregisters accordingly. Positions on removed wallets continue to be tracked until they close.
Professional and Advanced tier subscribers receive real time liquidity snapshots alongside PnL updates. Each snapshot contains slippage bands (how many tokens are sellable at each slippage threshold) and a liquidity trend indicator ("growing", "stable", or "draining"). See the full announcement for details.
StreamSession caches the latest snapshot per position. Query it with:
const bands = session.getSlippageBands(positionId);
const maxTokens = session.getMaxSellAtSlippage(positionId, 500); // 5% slippage
const trend = session.getLiquidityTrend(positionId);Use buildPartialSellTx() to sell a subset of a position's tokens. This pairs well with slippage bands: query the maximum sellable amount at your desired slippage, then build a transaction for exactly that amount.
const maxTokens = session.getMaxSellAtSlippage(positionId, 500);
if (maxTokens !== undefined) {
const response = await client.buildPartialSellTx(handle, maxTokens, 500, "SOL");
}The method accepts a PositionHandle (available on every StreamEvent), the token amount, slippage in bps, and the output asset.
Every SDK ships with the Solana public mainnet-beta RPC (https://api.mainnet-beta.solana.com) as a built-in default so you can get started without configuring an RPC provider:
// TypeScript — zero-config RPC
import { sendTargetDefaultRpc } from "@lasersell/lasersell-sdk";
const target = sendTargetDefaultRpc();# Python — zero-config RPC
from lasersell_sdk.tx import SendTargetRpc
target = SendTargetRpc() # uses mainnet-beta public RPC// Rust — zero-config RPC
let target = SendTarget::default_rpc();// Go — zero-config RPC
target := lasersell.SendTargetDefaultRpc()A private RPC is highly recommended for production — the public endpoint is rate-limited and unreliable under load. Free private RPC tiers are available from Helius and Chainstack, among others.
Full API and SDK documentation is available at docs.lasersell.io/api.
| Topic | Link |
|---|---|
| API and SDK Overview | docs.lasersell.io/api/overview |
| Authentication | docs.lasersell.io/api/authentication |
| Quickstart | docs.lasersell.io/api/quickstart |
| POST /v1/sell | docs.lasersell.io/api/exit-api/sell |
| POST /v1/buy | docs.lasersell.io/api/exit-api/buy |
| Exit Intelligence Stream | docs.lasersell.io/api/stream/overview |
| Strategy Configuration | docs.lasersell.io/api/stream/strategy-configuration |
| Transaction Signing | docs.lasersell.io/api/transactions/signing |
| Send Targets | docs.lasersell.io/api/transactions/send-targets |
| Rate Limits and Tiers | docs.lasersell.io/api/reference/rate-limits |
| Language | Package | SDK Guide | README |
|---|---|---|---|
| TypeScript | @lasersell/lasersell-sdk |
docs.lasersell.io/api/sdk/typescript | README · Examples |
| Python | lasersell-sdk |
docs.lasersell.io/api/sdk/python | README · Examples |
| Rust | lasersell-sdk |
docs.lasersell.io/api/sdk/rust | README · Examples |
| Go | github.com/lasersell/lasersell-sdk/go |
docs.lasersell.io/api/sdk/go | README · Examples |
| Resource | Link |
|---|---|
| Website | lasersell.io |
| Dashboard & API keys | app.lasersell.io |
| Documentation | docs.lasersell.io |
| Blog | lasersell.io/blog |
| Benchmarks | 2-5x faster than every major Solana trading API |
| SDK 0.3 release | Liquidity Snapshots, Slippage Bands, and SDK 0.3 |
| LaserSell CLI (open source) | github.com/lasersell/lasersell |
| SDKs (this repo) | github.com/lasersell/lasersell-sdk |
| Discord | discord.gg/lasersell |
| X (Twitter) | @lasersellhq |
LaserSell is non-custodial. The SDK builds unsigned transactions. Your private keys never leave your machine. Transactions are signed locally and submitted directly to the Solana network.
- Private keys are never transmitted to LaserSell servers
- All transaction signing happens client-side
- Open-source SDKs for full auditability
Learn more at lasersell.io/security.
Yes, this is one of the best use cases for the SDK. LaserSell offloads the heavy lifting of DEX routing, slippage optimization, and transaction construction to the API, so your AI agent doesn't need to understand Solana's low-level mechanics. An agent can execute a trade in a single API call: pass a mint address and amount, get back a ready-to-sign transaction. This makes it straightforward to give any LLM or AI agent the ability to execute on Solana efficiently and reliably.
The Exit Intelligence stream is not a regular WebSocket feed. It monitors your positions server-side against your take-profit, stop-loss, and trailing-stop thresholds and delivers ready-to-sign exit transactions the moment conditions are met. No polling, no client-side price math, no separate transaction building step. It is also superior to limit orders: limit orders sit passively and often get skipped entirely during rapid dumps because the price gaps right past them. The Exit Intelligence stream fires an immediate market swap the instant your trigger hits, using real-time on-chain data rather than stale API snapshots. Learn more in the full comparison and the Stream documentation.
The API client (ExitApiClient) is for one-shot operations: build a single buy or sell transaction on demand. The stream (StreamClient + StreamSession) is for continuous monitoring: it watches your positions in real time and sends exit signals with pre-built transactions the moment your take-profit, stop-loss, trailing-stop, or timeout conditions are met.
The LaserSell CLI is an open-source command-line application built on top of this SDK. It's a ready-to-use trading tool. The SDK is for developers who want to build their own applications, bots, or integrations on top of the LaserSell API.