jupiter_swap
Execute a token swap via Jupiter (non-custodial).
submit_mode (optional): your execution preference.
Omitted/"public" = public-RPC broadcast (default, unchanged).
"mev_protected" = the tx is built with a Jito tip you pay
(jito_tip_lamports, default 10,000) and relayed to the Jito block
engine as a bundle. Use the same mode on build and broadcast. A failed
protected submit returns an error and is NOT sent publicly unless you set
mev_fallback_public=true. The response execution block names the
mode and tip. Mainnet only. Never selected for you.
Without signed_transaction: returns an UNSIGNED base64 transaction for your wallet to sign + broadcast. With signed_transaction: broadcasts the caller-signed tx and returns tx_signature. amount is in base units of input_token. Includes the Crank technology service fee when a referral fee account is configured -- collected ON-CHAIN via Jupiter's platformFeeBps, deducted from swap output. Swaps are NOT additionally gated by x402 (that would double-charge the same fee), so payment_header stays a no-op here (jupiter_swap is not in x402 PAID_TOOLS). pay_in_crank is NO LONGER a no-op: the on-chain rate is now derived from this wallet's volume tier and $CRANK staker / pay-in-$CRANK / Crank Score discounts, so a discounted wallet is quoted a lower platformFeeBps -- the same schedule x402 applies to perps/lend/stake.
slippage_bps omitted (None) resolves to the published platform default of 50 bps -- unchanged from before; the returned envelope's slippage.applied_source honestly reports "platform_default" in that case rather than falsely claiming "caller".
SECURITY: the output_token is run through multi-layer authenticity verification before any tx is built; an unverified/suspicious/fake token is blocked (UNVERIFIED_TOKEN). Set allow_unverified=true to trade an unverified token at your own risk (hard scam signals are never overridable).
venue_hint is ADVISORY, never
required -- spot routes via Jupiter aggregation (the only spot venue
today); an unknown hint raises, omitting it is unchanged from before.
Workflow: EXECUTE step -- deploy the directional/allocation leg after the risk phase capped the size. Non-custodial. Get a price first with get_quotes. See get_trading_workflow.
idempotency_key (optional): a client-generated UUID.
Retrying the SAME call (build or broadcast) with the same key + same args
replays the original result instead of re-executing -- guards against a
timeout-then-retry double-swap. Reuse the SAME key across the build call
and its signed_transaction broadcast retry (they dedupe independently);
a NEW key means a genuinely new swap.
verify (default True): when broadcasting
(signed_transaction supplied), await on-chain confirmation and re-read
the output_token balance -- the response gains a verification block
({confirmed, slot, post_state, expected_vs_actual}). Gate follow-on
decisions on verification.confirmed, never on tx_signature alone.
Set False to skip for latency-sensitive callers. Verify any prior
signature later with the standalone verify_transaction tool.
GEO GATE: when either leg is a tokenized
security this call is geo-gated (Reg S = no US persons) and OFAC-screened,
same control trade_equity enforces -- jurisdiction declares the
caller's jurisdiction once (persisted for next time), ip is the
caller's origin IP for the additional Reg-S IP layer. Non-security swaps
are unaffected.
simulate (optional): true = rehearse this call. The full
gate stack (capability, kill switch, session signer, wallet policy,
permission mode, soft launch, venue / compliance / token checks, fee quote)
is evaluated read-only and returned as verdicts + would_execute,
with a paper fill where one applies. Nothing is built, signed, broadcast or
charged. Omitted = your wallet's default_simulate setting; false = execute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | ||
| amount | Yes | ||
| verify | No | ||
| simulate | No | ||
| caller_id | No | ||
| venue_hint | No | ||
| input_token | Yes | ||
| submit_mode | No | ||
| jurisdiction | No | ||
| output_token | Yes | ||
| pay_in_crank | No | ||
| slippage_bps | No | ||
| payment_header | No | ||
| wallet_address | Yes | ||
| idempotency_key | No | ||
| allow_unverified | No | ||
| jito_tip_lamports | No | ||
| signed_transaction | No | ||
| mev_fallback_public | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||