Skip to main content

Getting Your API Key

  1. Sign in at app.lasersell.io.
  2. Navigate to Settings > API Keys.
  3. Click Create API Key, give it a name, and copy the value.
Store the key securely. It cannot be displayed again after creation.

Authenticating Requests

Every request to the LaserSell API and every WebSocket connection to the Exit Intelligence Stream requires an API key passed via the x-api-key HTTP header.

curl

curl -X POST https://api.lasersell.io/v1/sell \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"mint":"TOKEN_MINT","user_pubkey":"WALLET","amount_tokens":1000000}'

SDK Examples

import { ExitApiClient } from "@lasersell/lasersell-sdk";

const client = ExitApiClient.withApiKey("YOUR_API_KEY");

Exit Intelligence Stream Authentication

The Exit Intelligence Stream WebSocket also uses x-api-key. The SDK handles this automatically when you construct a StreamClient:
import { StreamClient } from "@lasersell/lasersell-sdk";

const client = new StreamClient("YOUR_API_KEY");

Security Best Practices

  • Never commit your API key to version control. Use environment variables or a secrets manager.
  • Rotate keys periodically through the dashboard.
  • Scope access by creating separate keys for different bots or environments.
  • If a key is compromised, revoke it immediately from the dashboard and create a replacement.