Sandlot Dashboard

Docs

Sandlot speaks the Jupiter swap API (/swap/v1). Anything your agent already sends there works here. All amounts are raw token units, as strings, as on Jupiter.

Quickstart

  1. Open the dashboard, create a workspace and save its key.
  2. Add an agent, choose its starting SOL and USDC, and copy its key.
  3. Change your base address to your Sandlot address and send the agent key as x-api-key.
  4. Skip signing when the response says it's paper.
const BASE = process.env.SWAP_BASE  // this site's address
const headers = { "x-api-key": process.env.SANDLOT_KEY, "content-type": "application/json" }

const quote = await fetch(
  `${BASE}/swap/v1/quote?inputMint=${inputMint}&outputMint=${outputMint}&amount=${amount}&slippageBps=50`,
  { headers },
).then((r) => r.json())

const order = await fetch(`${BASE}/swap/v1/swap`, {
  method: "POST",
  headers,
  body: JSON.stringify({ quoteResponse: quote, userPublicKey: wallet }),
}).then((r) => r.json())

if (order.sandlot?.mode === "paper") {
  record(order.sandlot)            // no transaction to sign
} else {
  await signAndSend(order.swapTransaction)
}

GET /swap/v1/quote

Passed through to the live route and returned unchanged. Accepted parameters: inputMint, outputMint, amount, slippageBps, swapMode, dexes, excludeDexes, restrictIntermediateTokens, onlyDirectRoutes, asLegacyTransaction, maxAccounts.

POST /swap/v1/swap

Send quoteResponse as you received it. userPublicKey is optional on paper and required on the real route. prioritizationFeeLamports sets the priority fee the fill pays; without it the default is 100,000 lamports.

On paper the response keeps Jupiter's top-level fields and adds a sandlot object:

FieldMeaning
swapTransactionnull on paper
simulationErrornull, or the reason a fill failed
sandlot.modepaper or live
sandlot.statusfilled or failed (routed on the real route)
sandlot.failReasonslippage_exceeded or insufficient_funds
sandlot.signatureSandlot's order id. Not an on-chain signature.
sandlot.inAmount, outAmountWhat actually moved in the book
sandlot.quotedOutAmountWhat your quote promised
sandlot.slippageBpsSlippage applied to this fill
sandlot.networkFeeLamports, rentLamportsWhat came off the SOL balance
sandlot.costUsdSlippage and fees together, in USD at live prices

/swap/v1/swap-instructions isn't supported yet and returns 501.

Fill model

  1. Re-quote. The order is priced again against the live route. The amounts in your quoteResponse don't decide the fill, only its pair, size and limit do.
  2. Slippage. 1 bp, plus half the route's price impact, plus a random 0 to 3 bps for latency. It's taken from the output on ExactIn and added to the input on ExactOut.
  3. Your limit. If the result breaches otherAmountThreshold the order fails with slippage_exceeded. The network fee is still charged, as it is on chain.
  4. Settlement. 5,000 lamports base fee plus the priority fee come off SOL. The first time an agent holds a token, it also pays 2,039,280 lamports of account rent. A paper wallet that can't cover the order fails with insufficient_funds and pays nothing, because a real one would fail simulation before sending.

Route fees are already inside the live quote. Paper fills can't model what your own order would do to later prices, or fail for chain reasons such as congestion.

Day by day

Each UTC day gets a row on the agent's board: closing value, the day's profit and loss, fills, misses and costs. Paper agents are marked to live prices every 15 minutes, with or without orders. A token with no live price is left out of the value and flagged on that day's row.

Real route

From the agent's page, turn on the real route by typing its name and setting an order cap and a daily cap in USD. Nothing else about your agent changes: the same key and calls now return a real, unsigned transaction from Jupiter. Your agent signs and sends it. Sandlot never holds keys, and records routed orders without tracking whether they landed.

Orders over a cap return 422 and aren't routed. Quotes on the real route may carry a small referral fee, visible in platformFee. The dashboard shows when the real route is open.

Errors and limits

StatusCodeMeaning
400bad_requestMalformed input; the message says which field
401bad_keyMissing or wrong key
403live_routing_closedThe real route isn't open
422over_order_cap, over_day_cap, unpricedNot routed
429rate_limitedLimits per agent: 240 quotes and 120 orders a minute
503quotes_unavailableThe live route can't be reached. Nothing was filled; retry.