Trade
POST https://sol.shrine.trade/api/lightspeed, with the API key from your account.
- JavaScript
- Python
- curl
const res = await fetch("https://sol.shrine.trade/api/lightspeed", {
method: "POST",
headers: { "content-type": "application/json", "x-api-key": process.env.SNIPE_KEY },
body: JSON.stringify({
action: "buy", // "buy" or "sell"
mint: "<token mint>",
amount: 0.5, // SOL on a buy; tokens or "100%" on a sell
slippage: 25, // percent; snipes want room
priorityFee: 0.002, // SOL, total
tip: 0.001, // SOL, per provider copy; paid once, by the copy that lands
}),
});
const r = await res.json();
console.log(r.success, r.signature, r.submissions);
import os, requests
r = requests.post(
"https://sol.shrine.trade/api/lightspeed",
headers={"x-api-key": os.environ["SNIPE_KEY"]},
json={
"action": "buy",
"mint": "<token mint>",
"amount": 0.5,
"slippage": 25,
"priorityFee": 0.002,
"tip": 0.001,
},
).json()
print(r["success"], r["signature"], r["submissions"])
curl -X POST https://sol.shrine.trade/api/lightspeed \
-H "content-type: application/json" -H "x-api-key: ls_…" \
-d '{ "action": "buy", "mint": "<token mint>", "amount": 0.5, "slippage": 25, "priorityFee": 0.002, "tip": 0.001 }'
Request
| Field | ||
|---|---|---|
apiKey | string | Or the x-api-key header. |
action | "buy" | "sell" | |
mint | string | Token mint, base58. |
amount | number | string | SOL on a buy (the quote token on a quoted coin). Tokens, or "100%" / "50%" of the balance, on a sell. |
slippage | number | Percent. Default 5. |
priorityFee | number | Total priority fee in SOL. Default 0.001. |
tip | number | Tip per provider copy in SOL. Default 0.0005. Only the copy that lands pays it. Below a provider's minimum that provider drops its copy. |
pool | string | Force a launchpad: pumpfun, pumpswap, bonk, raydium_cpmm, raydium_amm_v4, meteora_damm_v2, meteora_dbc. Omit to auto-route from the live cache. |
poolAddress | string | For the AMMs when the cache has no pool for the mint. |
guard | boolean | One-fill protection. Default true. With false every copy can land and the wallet trades once per provider. |
providers | string[] | Race only these (lowercase names from the SWQoS page). The plain RPC always rides along, untipped. |
Response
{
"success": true,
"signature": "3nQ…",
"submissions": [
{ "provider": "zeroslot", "signature": "3nQ…", "accepted": true, "ms": 9.1 },
{ "provider": "jito", "signature": "5aP…", "accepted": true, "ms": 11.4 },
{ "provider": "nextblock", "signature": "2Ff…", "accepted": true, "ms": 13.0 },
{ "provider": "rpc", "signature": "4Rc…", "accepted": true, "ms": 21.7 }
],
"feeLamports": 1250000,
"quoteMint": "So11111111111111111111111111111111111111112",
"tipLamports": 1000000,
"slot": 447483508,
"guard": true,
"buildMs": 1.8
}
success means at least one provider accepted the transaction. Any accepted copy may be the one that lands, so to confirm, watch every signature in submissions (or just the wallet's balance). ms is measured from the request's arrival on our server to that provider's acknowledgement. slot is the newest slot our feed had seen when the copies left; the landed transaction's slot minus it is your slots-to-land.
One fill, never two
Every copy carries the same trade and a different tip, so each has its own signature and any of them may be the one that lands. The first to execute trades; the rest fail on chain before moving funds. A failed copy costs its priority fee and nothing else: the tip is inside the same transaction and fails with it. So the trade happens once and the tip is paid once, to the provider whose copy landed.
Set guard: false only if you mean to buy once per provider.
What a reverted copy costs is its base fee (0.000005 SOL) plus its priority fee, nothing more. Copies the leader never includes cost nothing. So put the budget into tip, which only the winning copy pays, and keep priorityFee modest: at 0.00002 SOL three reverted copies cost 0.000075 SOL, at 0.001 they cost 0.003.
Fees
0.25% of the trade, the same as everywhere else, taken inside the transaction. The tip is yours to set and goes to the provider whose copy landed. Frequent snipers: ask in the Telegram group for a lower rate.
Speed checklist
- Keep the wallet funded so no request waits on a deposit.
- Send
mintthe moment your stream shows the launch; thecreateevent onsubscribe_streamcarries it. A pump.fun coin can be bought from its create event alone, the API needs no chain read for it. - Run your bot near our server (Europe) or accept the network hop; our side adds a few milliseconds.
- Use
providersto skip a provider you have seen lag, andtipto outbid a crowded slot.