Jupiter Routing
L1 - Summary
Quote-only route preparation for the single approved buy (SNIPER) or sell (EXIT). Resolves the best Jupiter route for the exact ticket parameters through GET https://api.jup.ag/swap/v2/order, then hands the route to exec.quote and exec.place. This skill never executes, never signs, and never treats the quote as the fill price.
L2 - Method
- Take the APPROVED ticket parameters only: input mint, output mint, amount (lamports), max slippage bps. Refuse when the ticket is not APPROVED or RISK verdict is not CLEAR (CONDITIONAL conditions met counts as CLEAR only for the listed conditions).
- Request a quote-only route:
GET https://api.jup.ag/swap/v2/orderwithinputMint,outputMint,amount,slippageBps. Send the key asx-api-keyfromJUPITER_API_KEY. Never sendtaker. Never call/execute,/build, or/submit. - Treat the response as informational. Map
priceImpact(percentage points) to a ratio by dividing by 100. The quote is never the fill price (R38). - Estimate the priority fee with
onchain.priority_fee, capped by themax_micro_lamportsfield so a spike cannot drain the wallet. The quote is informational (route plus priority); onlyexec.placefills. - Hand the prepared route to
exec.quote(simulate) and thenexec.place(paper fill). On any timeout or unknown result, stop and reportUNKNOWN RESULT - reconcile by signature. Never retry without a new human approval.
Failure modes
- Stale quote (older than 30-60 s): re-quote before
exec.place; never send on a stale route. - Missing
JUPITER_API_KEY: proceed keyless only where the endpoint allows, and say so in the handoff. - Quote/fill confusion: the Jupiter response is a route plan, not a fill. The fill comes only from
exec.place. - Timeout or ambiguous send result: single-send rule holds. Report
UNKNOWN RESULT - reconcile by signature, never second-send. - Parameter drift (mint, size, slippage differ from the ticket): refuse and escalate to CHIEF + RISK.
References
- Port:
src/pumpgrok/tools/market/jupiter.py(quote-only v2 order adapter, R44) - Execution:
exec.quote,exec.simulate,exec.place(paper only; live refuses viaLiveGateError) - Gate: G-6 execution gate; precondition RISK CLEAR; approval record per ticket
- Companion skill:
desk-execution-protocol(single-send, exact-parameter rules)