Jupiter DEX is built for Confirmed Output Before Partial Holding Exits
Jupiter DEX is a practical route for selling part of a Solana token holding while preserving the rest. Enter the input amount you want to sell, inspect the quoted output and fee, sign the transaction and wait for confirmed settlement. Then read the post-swap source balance as the remaining holding and the destination balance as the realized output.
This workflow separates four numbers that are easy to conflate: quoted output, minimum protected output, amount delivered after fees and source tokens still held. Each belongs to a different stage of the exit.
In short: A second sale should begin only after the first transaction shows code 0 and the destination balance has changed.
The Current Swap Path Exposes Final Wallet Output
The current Jupiter DEX swap path exposes final wallet amounts, so a partial exit no longer ends at an estimated quote.
The Meta-Aggregator order response identifies
outAmount, the chosen router and the platform fee before the wallet signs. After execution, its receipt separates
outputAmountResult
from
totalOutputAmount. The former is route output before an output-side fee, while the latter is the final amount reflected in the wallet. It likewise separates
inputAmountResult
from
totalInputAmount
when the fee uses the input mint. Record the two total fields when measuring the partial exit because they describe wallet movement rather than internal route accounting. That distinction matters during later reconciliation.
The winning router can be Metis, JupiterZ, Dflow or OKX. Metis may split execution across Raydium, Orca and Meteora liquidity, yet the user receives one atomic Solana transaction outcome. A single signature therefore represents one completed balance transition.
Fees That Change the Exit Receipt
Jupiter swap fees change delivered output, so read the quoted fee mint and basis-point rate before every partial exit. The platform schedule assigns 0 basis points to purchases of JUP, JLP or jupSOL from SOL or stablecoins, 0 to pegged-asset pairs, 2 to SOL-stable pairs, 5 to liquid-staked-token-stable pairs, 10 to other pairs and 50 to tokens within their first 24 hours. Pool trading fees and Solana execution fees remain separate cost drivers.
How Much of the Holding Should You Enter?
A partial exit starts from the source token's on-chain balance, then applies the percentage or raw amount you intend to sell. Use token units for wallet entry and base units for API or RPC work.
One token unit equals 10 raised to the mint's decimals. JUP and Solana USDC use 6 decimals, so 1 displayed token corresponds to 1,000,000 base units for either mint. Wrapped SOL uses 9 decimals, making 1 SOL equal to 1 billion lamports. A 25% exit multiplies the raw balance by one quarter, while a 50% exit uses one half. Round down to a whole base unit. For a 100% exit, use the account's full raw amount. This preserves a known remainder and prevents a decimal conversion from selecting more than the account contains.
Phantom, Solflare and Jupiter Wallet may also display a fiat valuation. Size the sale from the token quantity tied to the correct mint, because a changing valuation does not define the spendable balance.
Quote Output and the Protected Minimum
The quote output estimates destination tokens, while the protected minimum defines the lowest acceptable settlement for that signed route. These numbers answer different operating questions.
One basis point equals 0.01%, and 100 basis points equal 1%. For an exact-input swap, the source amount remains fixed while the protected output falls as tolerance widens. Price impact measures how the trade itself changes execution across available liquidity; slippage tolerance governs how far execution may move after quoting. A smaller input consumes less liquidity on its selected path, although the routing engine may choose a different pool combination.
Read the quoted output as a forecast and the protected minimum as an execution boundary. The confirmed destination balance supplies the receipt that belongs in your position record.
Execution Status Before a Second Exit
A second partial exit should wait until the first swap reports success and confirmed token balances reflect that settlement.
Signing authorizes the transaction, submission gives it a signature and settlement changes the accounts. Jupiter's managed execution response uses
Success
or
Failed, with code
0
representing success. A signature alone identifies the attempt rather than its outcome.
The corresponding notes are kept in Jupiter DEX walkthrough.
Solana exposes three standard commitment labels:
processed,
confirmed
and
finalized. A wallet normally updates after confirmation, while finalized provides the strongest completed state. At the transaction level,
meta.err
equal to
null
indicates successful execution. The
preTokenBalances
and
postTokenBalances
arrays then show the balance transition by mint, owner and account index. This evidence separates a settled swap from a quote that was merely signed or submitted.
A recent blockhash typically remains usable for 150 slots. After expiry, the transaction cannot change balances, so request a fresh route and recalculate the next slice from the settled source balance.
Seven Records That Verify Received Output
Received output is best verified by matching Jupiter's execution receipt with Solana transaction metadata and the destination token account.
In the same way, Jupiter fields explain route accounting, while Solana Explorer, Solscan and wallet interfaces expose the resulting on-chain state. Each record answers a narrower question.
| Record | Location | What It Proves | Main Failure Mode |
|---|---|---|---|
outAmount
|
Jupiter order | Expected route output before slippage | Mistaken for settled output |
totalOutputAmount
|
Jupiter execution | Final output reflected in the wallet | Ignored when the fee uses output mint |
outputAmountResult
|
Jupiter execution | Route output before an output-side fee | Confused with final receipt |
status
and code
0
|
Jupiter execution | Managed execution succeeded | Signature treated as success |
meta.err
|
Solana transaction metadata |
null
means execution succeeded
|
Read before metadata is available |
| Pre/post token balances | Solana transaction metadata | Raw balance delta by account | Account index mapped to wrong mint |
| Token balance | Wallet or RPC | Human-readable remaining or received amount | Cached interface state |
The strongest audit trail pairs
totalOutputAmount
with the destination account's post-transaction change. It also records the source account's reduction, transaction slot and signature. Each Solana transaction signature is a 64-byte Ed25519 signature, giving the balance event one durable identifier. If the wallet groups several accounts for one mint, use the aggregate amount across those accounts rather than one visible row.
That paired record makes the next adjustment start from settled state rather than an estimate.
Token Account Precision and Aggregated Remainders
Solana token account precision determines the true remainder, even when a wallet rounds the visible number for compact display.
The original SPL Token Program and Token-2022 both store an account amount as an unsigned 64-bit integer. Its maximum is 18,446,744,073,709,551,615 base units. A mint and owner normally map to one deterministic Associated Token Account through the Associated Token Program, but wallets can also control auxiliary token accounts for the same mint. Solana public keys are 32 bytes, so the mint address is the exact identity to match when aggregating those balances.
Token-2022 extensions add another display consideration. Scaled UI Amount changes the presented amount without changing the raw account amount. TransferFeeConfig reduces a transfer by its configured fee and tracks the withheld portion on the destination account. The execution receipt and raw balance delta remain the authoritative pair for a partial exit.
Fresh Quotes for Every Remaining Slice
Every remaining slice needs a new Jupiter quote built from the settled source balance and the market state at that moment.
Do not reuse the first serialized transaction or project its output. Aggregator routes carry a
lastValidBlockHeight
that provides a hard expiry, while JupiterZ Request for Quote orders carry an
expireAt
timestamp set by the market maker. Their routing inputs also change as Raydium, Orca and Meteora pools update. The newly requested quote must therefore own its amount, route, fee fields and execution boundary.
Compare a 50% quote with a separately requested 25% quote when deciding between one exit and two. Two smaller slices do not inherit the first route, so their combined output must be read from their own receipts.
Maintenance After the Final Exit
A completed exit cycle ends with reconciled balances, an archived signature and a deliberate decision about zero-balance token accounts.
After the last sale, check that the source
postTokenBalances
entry reaches
0, the destination increase matches the final receipt and
meta.err
remains
null. Aggregate all accounts belonging to the source mint before treating the holding as closed.
A standard SPL Token account can be closed after its balance reaches 0, returning its rent lamports to the chosen destination. The Associated Token Account can be created again if the wallet later receives that mint. Wrapped SOL has a related rule: closing its token account returns the underlying lamports as native SOL. Temporary wrapped SOL setup and cleanup may already occur inside a Jupiter route, so inspect the final native and token balances before taking a separate account action.
Keep the input mint, output mint, raw amounts, decimals, slot and signature together. Those fields preserve enough context to verify the exit later and size any future re-entry from on-chain state.
Key questions about Jupiter DEX
Is SOL required to sell only part of a token holding?
SOL is required when the connected wallet pays the Solana base fee, priority fee and any new token-account rent. Jupiter also supports gasless execution in eligible flows, where another payer covers those costs and the user receives less output. Keep SOL available when possible because the standard base fee is 5000 lamports per signature before any optional priority fee.
When does a partial exit create a new output token account?
A new output token account is created when the receiving wallet lacks an account for that mint and token program. The route can include an Associated Token Account creation instruction in the same atomic transaction. Its rent requirement adds to the SOL funding need unless gasless execution supplies the payer. Later partial exits reuse that account while it remains open.
Would a Trigger order fit a planned partial exit better than an instant swap?
A Trigger order fits a partial exit tied to a future USD price condition, while an instant swap fits execution at the available route now. Jupiter Trigger V2 deposits the order amount into a vault and later records states such as open, executing and filled. Its output is not fixed in advance because routing occurs when the price condition is reached.
Can a partial Jupiter exit send output to a different wallet?
A programmatic Jupiter Meta-Aggregator order can set a receiver address that differs from the taker. The taker remains the source wallet that signs and supplies input tokens, while the receiver gets output tokens. Record both addresses during reconciliation because the source reduction and destination increase occur under different owners. This option belongs to integrations that supply the receiver parameter when requesting the order.
Does the Jupiter PnL view replace the swap receipt?
No. The Jupiter PnL view summarizes portfolio performance, while the swap receipt records token movement for one settled transaction. Use totalInputAmount, totalOutputAmount and Solana pre-token and post-token balances to reconcile the partial exit. Fiat valuation changes after settlement, so it cannot replace the raw source reduction, destination increase, mint addresses and transaction signature for later account auditing.