Privacy Enabled Swaps
Request a swap whose trade details aren't exposed publicly while it executes. Set usePrivacyMode on the quote, then execute the routeId as usual.
A normal cross-chain swap is public end to end: anyone watching the provider's explorer can see what was sold, what was bought, and where the proceeds went. A privacy enabled swap keeps those trade details out of public view while the swap executes.
Today privacy mode is fulfilled through NEAR Intents' Confidential Intents, so a private route is always a NEAR route. The parameter describes the capability rather than any one provider, so further providers can be added behind it without changing your integration.
How it works
Privacy is decided once, at quote time, and carried through to execution:
/v3/quotewithusePrivacyMode: truereturns only routes that are private end to end, and asks those providers for their private variant.The quote's
routeIdremembers the choice./v3/swapre-prices thatrouteIdwith privacy still on, and returns the deposit details for the user to fund.
Your wallet signs and sends the deposit the same way it does for any NEAR route. There is no extra signing step and no different transaction format.
Requesting a private quote
Add usePrivacyMode: true to an otherwise ordinary /v3/quote request:
curl -X 'POST' \
'https://api.swapkit.dev/v3/quote' \
-H 'Content-Type: application/json' \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"sellAsset": "ETH.ETH",
"buyAsset": "BTC.BTC",
"sellAmount": "0.5",
"sourceAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destinationAddress": "357a3So9CbsNfBBgFYACGvxxS6tMaDoa1P",
"usePrivacyMode": true
}'usePrivacyMode
boolean
No
Set to true to only receive routes on which every provider supports a privacy mode. Default: false.
Every other quote parameter behaves as usual. The response has the normal /v3/quote shape, with every route's providers limited to privacy-capable ones — today, ["NEAR"].
It's a filter, not a preference
Every provider on a route must support a privacy mode, not just the first leg. A route whose second hop is public exposes the trade just as thoroughly as a fully public one, so partial privacy is treated as no privacy and the route is dropped.
In practice this means:
Only single-provider
NEARroutes are returned today. Multi-provider routes that pass through a public DEX or bridge are removed, even when they'd price better.Pair coverage narrows to what NEAR Intents supports. A pair that quotes fine publicly may have no private route at all.
The best private price may be worse than the best public one. The filter runs before routes are ranked, so you're comparing private routes with each other, not against the public market.
providersstill applies. If you also pass aproviderslist, a route must satisfy both — passing one withoutNEARleaves nothing to return.
When there's no private route
Because privacy filters rather than falls back, usePrivacyMode: true can leave you with no routes on a pair that quotes fine without it. You'll see one of:
404 noRoutesFound, or200with an emptyroutesarray and a populatedproviderErrors.
The flag isn't echoed back
The response doesn't tell you a route was quoted privately. If your UI needs to show it — a badge on the confirmation screen, a field in your order history — record it on your side against the routeId when you make the request.
/quote (v2)
The legacy /quote endpoint accepts the same usePrivacyMode field with the same filtering behaviour. New integrations should use /v3/quote; see API Migration to v3.
Executing a private swap
Call /v3/swap with the routeId from the private quote, exactly as you would for any other route:
Privacy is inherited from the quote
/v3/swap re-prices the route on every call, and that fresh quote is requested with the same privacy mode the original quote used. You can't set or change privacy here:
There's no
usePrivacyModeparameter on/v3/swap. Sending one has no effect — it's ignored rather than rejected.A public
routeIdcan't be made private at execution, and a private one can't be made public. To change mode, request a new quote.routeIds are cached for 5 minutes, as usual. After that therouteIdisn't recognised; request a new quote withusePrivacyMode: true.
What you send
A private swap settles through a NEAR deposit channel: the user sends the sell asset to a one-time deposit address, and the swap runs from there. The response is the normal NEAR /v3/swap response:
tx— the transaction to sign and broadcast, as for anyNEARroute. Its format depends on the sell chain; see Transaction Formats by txType. WithdisableBuildTx: true, send the sell asset to the deposit address yourself.meta.providerDepositChannelId— the channel's id. Store it: it lets you follow the swap with/trackwithout a transaction hash.meta.depositChannelExpiration— unix seconds after which the channel stops accepting a deposit. Drive any deposit countdown from this, never fromexpiration. See Deposit-channel fields inmeta.memo— on sell chains that need one, the same as on a publicNEARroute.
Screening, balance checks, slippage settings, refundAddress and every other /v3/swap behaviour are unchanged — privacy mode doesn't bypass any of them.
Tracking a private swap
Track a private swap with /track the same way as any other: by depositChannelId, depositAddress, or hash and chainId. The difference is what you get back.
By default, you only see the inbound leg. The deposit is already public on the source chain, so /track shows it. Everything after it is hidden:
legsis the deposit leg, then a placeholderswapleg with a blank hash and amounts. Any legs after the swap, such as the payout, are dropped, so even the number of steps is hidden. Before the deposit has been seen there is no deposit leg to show, andlegsis the placeholder on its own.The destination asset, amount and address are
"".The provider and fees are omitted.
status and trackingStatus are still reported, so you can poll a redacted swap until it completes. You just can't see what it paid out. These responses carry meta.redacted: true and a meta.redactionReason of notOwner, tokenExpired or tokenInvalid.
Trimmed to the fields that matter here.
Your API key unlocks the rest. Call /track with the same x-api-key you used on /v3/swap:
You get the full swap back, plus a root meta.explorerUrl — a SwapKit Explorer link carrying an access token in its t parameter. See Explorer.
Trimmed to the fields that matter here. There's no meta.redacted on a full view.
The full list of redacted fields, and how to pass a token to /track directly, are under Confidential swaps on the /track page.
Explorer
Open meta.explorerUrl in a browser and the SwapKit Explorer shows the whole swap — every leg, the destination and the amount received. The token in the link does the authorising, so no API key is needed: hand it to your user, your support team, or anyone else who needs to follow the swap.
The Explorer renders each redacted field as a row of asterisks. Over the API those same fields come back as empty strings — same redaction, different presentation.


t= — the whole swapThe link has the form https://track.swapkit.dev/?hash=<hash>&chainId=<chainId>&t=<token>. The token is tied to that one swap, so it can't unlock any other.
Links expire 24 hours after they're issued. After that, the Explorer falls back to public mode and shows the redacted swap — the same view as anyone without a token, with meta.redactionReason: "tokenExpired".
To get a fresh link, call /track with your API key again. Every call made with your key mints a new token. Opening or sharing a link doesn't extend it, so fetch explorerUrl when you need to show it rather than storing it.
Questions
Talk to your SwapKit contact if you need privacy on a pair that returns no private route, or want to confirm whether your key's requests are reaching the privacy-capable providers.
Last updated

