Jupiter Swap
Execute a token swap on Solana via Jupiter, the leading DEX aggregator. Automatically finds the best route across all Solana DEX pools for any SPL token pair. Ideal for: automated swaps, portfolio rebalancing, DCA strategies, and token distribution on Solana.
Catalog action Solana Onchain wallet swap
Execute a token swap on Solana via Jupiter, the leading DEX aggregator. Automatically finds the best route across all Solana DEX pools for any SPL token pair. Ideal for: automated swaps, portfolio rebalancing, DCA strategies, and token distribution on Solana.
This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.
At a Glance
| Field | Value |
|---|---|
| Action ID | jupiter-swap |
| Category | Solana Onchain |
| Connector | wallet |
| Requires gas | No |
| Funds movement | swap |
| Tags | blockchain, solana, swap, jupiter, dex, trade, write |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
inputMint | string | Yes | Contract address of the token you want to sell (e.g., the USDC or SOL mint address). Find it on Solscan or Jupiter. |
outputMint | string | Yes | Contract address of the token you want to buy (e.g., the USDC or SOL mint address). Find it on Solscan or Jupiter. |
amount | string | No | Amount of the input token to swap, in human-readable format (e.g., "1.5" for 1.5 USDC). Supports full token precision. |
rawAmount | string | No | Raw amount in smallest unit (alternative to 'amount' for chaining from jupiter-quote). If provided, 'amount' is ignored. |
slippageBps | number | No | Maximum acceptable price difference in basis points. 50 = 0.5%, 100 = 1%. Default: 50 (0.5%). |
allowUnverifiedTokens | boolean | No | Allow swapping tokens not on the Jupiter verified list. Only applies to automated workflows. Manual executions always allow all tokens. |
chainId | number | Yes | Solana network (Mainnet or Devnet) |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | - |
signature | string | Yes | Transaction signature (base58 encoded) |
transactionHash | string | Yes | Transaction hash (same as signature, for workflow engine compatibility) |
inputMint | string | Yes | Input token mint address |
outputMint | string | Yes | Output token mint address |
inputAmount | string | No | Input amount in smallest unit (e.g. atomic units for SPL tokens) |
outputAmount | string | No | Quoted output amount in smallest unit (pre-slippage estimate, not confirmed received amount) |
formattedInputAmount | string | No | Human-readable input amount (e.g. '1.5') |
formattedOutputAmount | string | No | Human-readable output amount (pre-slippage estimate, not confirmed received amount) |
inputSymbol | string | No | Symbol of the input token (e.g. 'SOL', 'USDC') |
outputSymbol | string | No | Symbol of the output token (e.g. 'USDC', 'BONK') |
priceImpactPct | string | No | Price impact as a percentage string (e.g. '0.01') |
slot | number | No | Slot number where the transaction was confirmed |
chainId | number | No | Chain ID where the transaction was executed |
Examples
json{ "type": "jupiter-swap", "payload": { "inputMint": "example-inputMint", "outputMint": "example-outputMint", "chainId": 7565164 }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/jupiter-swap/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "inputMint": "example-inputMint", "outputMint": "example-outputMint", "chainId": 7565164 }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
