Jupiter Swap Quote
Get a swap quote from Jupiter, Solana's leading DEX aggregator. Returns the best route, expected output amount, and price impact for any SPL token pair. Read-only — does not execute a swap. Ideal for: price checks, swap previews, route analysis.
Catalog action Solana Onchain
Get a swap quote from Jupiter, Solana's leading DEX aggregator. Returns the best route, expected output amount, and price impact for any SPL token pair. Read-only — does not execute a swap. Ideal for: price checks, swap previews, route analysis.
At a Glance
| Field | Value |
|---|---|
| Action ID | jupiter-quote |
| Category | Solana Onchain |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | solana, jupiter, swap, quote, dex, defi, read |
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 | Yes | Amount in smallest unit (raw, not human-readable). For example: 1 SOL = 1000000000, 1 USDC = 1000000. |
slippageBps | number | No | Maximum acceptable price difference in basis points. 50 = 0.5%, 100 = 1%. Default: 50 (0.5%). |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
inAmount | string | Yes | Input amount in smallest unit |
outAmount | string | Yes | Output amount in smallest unit |
otherAmountThreshold | string | No | Minimum output amount accounting for slippage |
priceImpactPct | string | No | Price impact as a percentage string (e.g. '0.01') |
inputMint | string | Yes | Input token mint address |
outputMint | string | Yes | Output token mint address |
routePlan | array | No | Route plan detailing the swap path through DEX pools |
Examples
json{ "type": "jupiter-quote", "payload": { "inputMint": "example-inputMint", "outputMint": "example-outputMint", "amount": "1000000" }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/jupiter-quote/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "inputMint": "example-inputMint", "outputMint": "example-outputMint", "amount": "1000000" }}'
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.
