Skip to main content
AdvancedFastest-path route for snipers, from a wallet only your API key can open. To sign on your own machine instead, use the Buy & Sell API.

Trade

POST https://rh-lightspeed.shrine.trade/api/lightspeed, with the API key from your account.

const res = await fetch("https://rh-lightspeed.shrine.trade/api/lightspeed", {
method: "POST",
headers: { "content-type": "application/json", "x-api-key": process.env.LS_KEY },
body: JSON.stringify({
action: "buy", // "buy" or "sell"
token: "0xTHE_TOKEN",
amount: 0.01, // ETH on a buy; tokens or "100%" on a sell
slippage: 10, // percent; a fresh launch wants room
}),
});
const r = await res.json();
console.log(r.success, r.hash, r.quote?.expectedOutFormatted, r.sendMs);

Request​

Field
apiKeystringOr the x-api-key header.
action"buy" | "sell"
tokenstringToken address.
amountnumber | stringETH on a buy, whatever the token is priced in. Tokens, or "100%" / "50%" of the balance, on a sell.
slippagenumberPercent. Default 5.
toEthbooleanSells of a token priced in an asset (USDG, NVDA, ORBIO …): take the proceeds in ETH (default true) or keep the asset (false).
waitbooleanDefault false: the answer comes as soon as Robinhood accepted. true waits up to 20 s for the receipt and adds status, blockNumber and gasUsed.

Response​

{
"success": true,
"hash": "0x…",
"explorer": "https://robinscan.io/tx/0x…",
"wallet": "0x9985…a92f",
"engine": "local",
"buildMs": 0.9,
"sendMs": 11.4,
"txs": [
{ "description": "buy", "hash": "0x…", "nonce": 7, "signUs": 180,
"submissions": [ { "address": "203.0.113.7", "accepted": true, "ms": 11.2 } ] }
],
"protocol": "PONS_V2", "venue": "pons_curve", "phase": "NotGraduated",
"token": "0x…", "name": "…", "symbol": "…", "curve": "0x…",
"quoteAsset": { "address": "ETH", "symbol": "ETH", "decimals": 18, "isNative": true },
"action": "buy",
"ethIn": "10000000000000000", "ethInFormatted": "0.01",
"amountIn": "9925000000000000", "amountInFormatted": "0.009925",
"quote": {
"expectedOut": "…", "expectedOutFormatted": "1250000.0", "minOut": "…",
"curveFeeBps": 100, "creatorTaxBps": 0, "snipeTaxBps": 0,
"lightspeedFeeBps": 75, "slippagePct": 10
}
}

success means Robinhood accepted every transaction of the trade; hash is the last one (a sell may be preceded by an approval, listed in txs). sendMs is from the request's arrival on our box to Robinhood's acceptance; signUs is the signing time in microseconds. amountIn is what reaches the venue after the Lightspeed fee, in the token's quote asset; on an asset-priced token route lists the hops the ETH took to get there. The quote is computed here from the curve's or pool's own math, and minOut is what the transaction enforces.

An accepted transaction can still revert on chain: the curve sold out in the same block, or the price moved past your slippage. Pass wait: true to learn that in the same request, or watch hash.

Venues​

venueFee
pons_curvethe bonding curve, through the Lightspeed router0.75% in the quote asset
uniswap_v4the Pons pool after graduation, through the Universal Router0.75% in the asset the trade settles in

An asset-priced curve token (quoteAsset not ETH) is bought with ETH in one transaction: the router swaps the ETH into the asset over Uniswap and buys the curve with it. A sell goes the other way and comes back as ETH unless toEth is false. A token outside Pons v2 is built by the Buy & Sell API and sent from here ("engine": "builder", with builderReason); it may take more than one transaction.

Errors​

Statuserror
401unauthorizedMissing or unknown API key.
400invalid_action, invalid_token, invalid_amount, invalid_slippage
400insufficient_balanceThe wallet holds fewer tokens than the sell asks for.
400insufficient_fundsRobinhood refused: not enough ETH for the value plus gas.
400unquotableThe amount is outside what the curve or pool can fill.
409curve_closedThe curve sold out and is graduating; buys reopen in the pool.
503warming_up, rpcThe box has no gas price yet, or a cold read failed.
502otherRobinhood refused with message; txs shows each attempt.

Fees​

0.75% of the trade, taken inside the transaction, in the asset the trade settles in. Gas on Robinhood Chain is a few millionths of an ETH. See Fees.

Speed checklist​

  • Keep the wallet funded so no request waits on a deposit.
  • Take token from the stream: a launch event carries the predicted token address before the block exists, and the curve is quotable from its launch config.
  • Run your bot near our box (Chicago) or accept the network hop; our side adds about a millisecond.
  • Give a fresh launch slippage room: the dev buy and the first snipes land in the same blocks as yours.