Skip to content
SwapKit is a powerful suite of tools for building blockchain applications.

/v3/swap

POST
/v3/swap
object
routeId
required

The ID of the route to swap

string
sourceAddress
required

Address to send asset from

string
destinationAddress
required

Recipient address to send asset to

string
disableBalanceCheck

Whether to disable balance check

boolean
disableEstimate

Whether to disable estimate gas

boolean
allowSmartContractSender

Whether to allow smart contract sender

boolean
allowSmartContractReceiver

Whether to allow smart contract receiver

boolean
disableSecurityChecks

Whether to disable security checks

boolean
overrideSlippage

Whether to override slippage validation on quote refresh

boolean

Default Response

object
sellAsset
required

Asset to sell

string
sellAmount
required

Sell amount

string
buyAsset
required

Asset to buy

string
buyAmount

Buy amount

string
buyAmountMaxSlippage

Buy amount max slippage

string
expectedBuyAmount

Expected Buy amount

string
expectedBuyAmountMaxSlippage

Expected Buy amount max slippage

string
fees
required
Array<object>
object
type
required
string
Allowed values: liquidity network inbound outbound affiliate service tax priority
amount
required
string
asset
required
string
chain
required
string
protocol
required
string
Allowed values: CHAINFLIP CHAINFLIP_STREAMING MAYACHAIN MAYACHAIN_STREAMING ONEINCH PANCAKESWAP PANGOLIN_V1 SUSHISWAP_V2 THORCHAIN THORCHAIN_STREAMING TRADERJOE_V2 UNISWAP_V2 UNISWAP_V3 CAVIAR_V1 JUPITER CAMELOT_V3 OCISWAP_V1 OPENOCEAN_V2 OKX NEAR GARDEN HARBOR
routeId
required

Route ID

string
providers
required
Array<string>
Allowed values: CHAINFLIP CHAINFLIP_STREAMING MAYACHAIN MAYACHAIN_STREAMING ONEINCH PANCAKESWAP PANGOLIN_V1 SUSHISWAP_V2 THORCHAIN THORCHAIN_STREAMING TRADERJOE_V2 UNISWAP_V2 UNISWAP_V3 CAVIAR_V1 JUPITER CAMELOT_V3 OCISWAP_V1 OPENOCEAN_V2 OKX NEAR GARDEN HARBOR
expiration

Expiration

string
estimatedTime
object
inbound

Time to receive inbound asset in seconds

number
swap

Time to swap assets in seconds

number
outbound

Time to receive outbound asset in seconds

number
total
required

Total time in seconds

number
totalSlippageBps
required

Total slippage in bps

number
legs
required
Array<object>
object
provider
required
string
Allowed values: CHAINFLIP CHAINFLIP_STREAMING MAYACHAIN MAYACHAIN_STREAMING ONEINCH PANCAKESWAP PANGOLIN_V1 SUSHISWAP_V2 THORCHAIN THORCHAIN_STREAMING TRADERJOE_V2 UNISWAP_V2 UNISWAP_V3 CAVIAR_V1 JUPITER CAMELOT_V3 OCISWAP_V1 OPENOCEAN_V2 OKX NEAR GARDEN HARBOR
sellAsset
required

Asset to sell

string
sellAmount
required

Sell amount

string
buyAsset
required

Asset to buy

string
buyAmount

Buy amount

string
buyAmountMaxSlippage

Buy amount max slippage

string
expectedBuyAmount

Expected Buy amount

string
expectedBuyAmountMaxSlippage

Expected Buy amount max slippage

string
fees
required
Array<object>
object
type
required
string
Allowed values: liquidity network inbound outbound affiliate service tax priority
amount
required
string
asset
required
string
chain
required
string
protocol
required
string
Allowed values: CHAINFLIP CHAINFLIP_STREAMING MAYACHAIN MAYACHAIN_STREAMING ONEINCH PANCAKESWAP PANGOLIN_V1 SUSHISWAP_V2 THORCHAIN THORCHAIN_STREAMING TRADERJOE_V2 UNISWAP_V2 UNISWAP_V3 CAVIAR_V1 JUPITER CAMELOT_V3 OCISWAP_V1 OPENOCEAN_V2 OKX NEAR GARDEN HARBOR
warnings
required
Array<object>
object
code
required
string
Allowed values: highSlippage highPriceImpact noSourceAddressToBuildTransaction affiliateFeeTooSmallSoRemoved unableToApplyReferralProgram insufficientBalance unableToBuildTransaction unableToEstimateGas
display
required
string
tooltip
string
sourceAddress
required

Source address

string
destinationAddress
required

Destination address

string
targetAddress

Target address

string
inboundAddress

Inbound address

string
memo

Memo to include in the transaction

string
txType
string
Allowed values: PSBT EVM COSMOS RADIX SOLANA RIPPLE TRON NEAR SUI zcash-unsigned
tx
Any of:
object
to
required

Address of the recipient

string
from

Address of the sender

string
gas

Gas limit

string
gasPrice

Gas price

string
value
required

Value to send

string
data
required

Data to send

string
meta
required
object
assets
Array<object>
object
asset
required

Asset name

string
price
required

Price in USD

number
image
required

Asset image

string
tags
required
Array<string>
Allowed values: CHEAPEST FASTEST RECOMMENDED
streamingInterval
number
maxStreamingQuantity
number
referrer
string
priceImpact

Price impact

number
approvalAddress

Approval address for swap

string
affiliate
string
affiliateFee
string
txType
string
Allowed values: PSBT EVM COSMOS RADIX SOLANA RIPPLE TRON NEAR SUI zcash-unsigned
chainflip
object
destinationAddress
required
string
sellAsset
required
object
chain
required
string
asset
required
string
buyAsset
required
object
chain
required
string
asset
required
string
channelMetadata
object
ccmAdditionalData
string
gasBudget
string
message
string
cfParameters
string
affiliateFees
Array<object>
object
brokerAddress
required
string
feeBps
required
number
refundParameters
object
minPrice
string
refundAddress
string
retryDuration
number
dcaParameters
object
chunkInterval
number
numberOfChunks
number
brokerCommissionBps
number
maxBoostFeeBps
number
near
object
destinationAddress
required
string
sellAsset
required
string
buyAsset
required
string
sourceAddress
required
string
sellAmount
required
string
affiliateFees
object
nearId
required
string
feeBps
required
number
slippage
required
number
garden
object
destinationAddress
required
string
sellAsset
required
string
buyAsset
required
string
buyAmount
required
string
sellAmount
required
string
sourceAddress
required
string
affiliateFees
object
address
required
string
asset
required
string
fee
required
number
slippage
required
number
isFastQuote
boolean
isRefreshed

Indicates if the quote was refreshed

boolean
swapId
required

The unique swap ID for tracking

string
approvalTx

Optional approval transaction if ERC-20 approval is required before swap

object
to
required

Token contract address

string
from
required

User wallet address

string
value
required

ETH value (always ‘0’ for approvals)

string
data
required

Encoded approval call data

string
gasLimit

Estimated gas limit

string
gasPrice

Current gas price

string

Default Response

object
message
required
string
error
required
string
data

Default Response

object
message
required
string
error
required
string
data

Default Response

object
message
required
string
error
required
string
data