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

/quote

POST
/quote
object
sellAsset
required

Asset to sell

string
buyAsset
required

Asset to buy

string
sellAmount
required
string
providers
Array<string>
sourceAddress

Address to send asset from

string
destinationAddress

Address to send asset to

string
slippage
number
<= 100
cfBoost

Set to true to enable CF boost to speed up Chainflip swaps. BTC only.

boolean
referrer
string
affiliate

Affiliate thorname

string
affiliateFee
number
<= 1000
allowSmartContractSender

Allow smart contract as sender

boolean
allowSmartContractReceiver

Allow smart contract as recipient

boolean
disableSecurityChecks

Disable security checks

boolean
includeTx

Set to true to include an transaction object (EVM only)

boolean

Default Response

object
quoteId
required

Quote ID

string
routes
required
Array<object>
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
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
sourceAddress
required

Source address

string
destinationAddress
required

Destination address

string
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
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
warnings
required
Array<object>
object
code
required
string
Allowed values: highSlippage highPriceImpact noSourceAddressToBuildTransaction affiliateFeeTooSmallSoRemoved unableToApplyReferralProgram insufficientBalance unableToBuildTransaction unableToEstimateGas
display
required
string
tooltip
string
targetAddress

Target address

string
inboundAddress

Inbound address

string
memo

Memo

string
txType
string
Allowed values: PSBT EVM COSMOS RADIX SOLANA RIPPLE
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
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
error

Error message

string
providerErrors
Array<object>
object
provider
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
errorCode
string
Allowed values: invalidApiVersion isSanctionedAddress unknownError test_error providerDetailsError blockHeaderNotFound blockHashNotFoundAtHeight blockHashNotFoundAtHash blackListAsset txHashMissing assetValueMissingInfo invalidAsset blockIsRequired currentBlockHeaderNotFound failedToRetrieveBalance failedToRetrieveBlock failedToRetrieveFees notImplementedBCH notImplementedDoge noPoolsFound noVaultsFound noTxFound noInputCoinFound noBlockDataFound multipleCosmosMessages heightOrHashNotProvided priceTooVolatile unknownDenom invalidBlockHeight timestampExtrinsicNoArgumentsForBlock timestampExtrinsicNoTimestampForBlock noTimestampExtrinsicForHash timestampExtrinsicNoArgumentsForHash txMemoUndefined txMemoIncorrect txTypeNotFound txNoMessage txNotFound txReceiptNotFound txParsingError txLogsParsingError txSaveTrackResultError blockNotFound balanceNotFound configError synthSwapDisallowed providerQuoteTimeout noQuoteResponse noPoolAssetsFound noThorchainPools noMayachainPools noThorchainNetworkInfo invalidAffiliateFee invalidBuyAssetAddress invalidSellAssetAddress invalidSourceAddress invalidDestinationAddress invalidParam sourceAddressIsSmartContract destinationAddressIsSmartContract invalidChainId invalidChain unsupportedChainId unsupportedEVMChainId unsupportedMethod unsupportedProvider unsupportedProgram unsupportedEvent invalidParamsForMethod unsupportedAdapter noWhitelistTokens failedFetchGasPrice chainflipBrokerApiUnavailable affiliateNotRegistered failedToCreateDepositChannel failedToRegisterAccount failedToRegisterAffiliate failedToWithdrawAffiliate noProviderDetailsFound noTokenListsFound tokenNotFound tokenPriceNotFound tokenPriceFailedToUpdate swapAmountTooSmall legsArrayIsEmpty failedToFetchQuoteForLeg noBlockHeaderFound failedToSimulateSwap swapHalted addressScreeningFailed missingScreeningConfig noLiquidtyProvidersFound insufficientLiquidity noSaversFound noInbounDataFound noInboundAddressesFound noInboundAddressFoundForChain noLastBlocksFound noVersionFound noConstantsFound noMimirsFound noRoutesFound quoteNotFound ledgerSignFailed ledgerWrongPayload ledgerFetchSwapFailed failedToFetchTx failedBuildTransactionDetails noLegsForRoute noRouterAddressFound noAggregatorAddressFound noContractInstanceFound noContractAddressFound invalidAffiliate invalidAffiliateName thornameNotFound thornameAffiliate No provider found No Record found Slippage too low tradingHalted mayanameNotFound noWrappedGasAsset aggregatorAddressNotFound routerAddressNotFound dummyAddressNotFound trackerError thorchainPoolUnavailable noOhlcvDataFound noTradingPairs missingState ledgerSwapNotFound ledgerSwapNotReadyForTracking ledgerInvalidParsingMode errorEstimatingGas apiKeyInvalid apiKeyFailedToUpdate apiKeyExpired unauthorized failedToCreateMemo radixIncorrectInstructions radixTxMissedParam radixTxMissedAccount radixManifestParseError radixManifestBuildError invalidAddressForChain riskyAddress noRoutesToProcess sellAssetAmountTooSmall sellAssetAmountTooLarge missingPrivateKey noMemoPriceProtection nodeMethodNotFound nodeRpcNotFound thirdPartyProviderNotFound quoteUnavailable targetInstructionNotFound referrerExist referrerNotFound invalidReferrer invalidReferralProgramAffiliate quoteLogicError missingDecimal noGasInfoInDB quoteError valueOverflow missingChainflipMeta contractAndMethodRequired tokenImageError fileNotFound fileFormatError ipError failedToSaveLedgerSwap missingValue missingDBQueryParam unableEstimateTxTime affiliateStatsMissingDate affiliateStatsMissingNextFilter affiliateStatsNoActions sdkError unsupportedNotificationEvent unsupportedNotificationChannel serverStateNotFound apiRequestFailed invalidActionStep providerIsRequired rateLimitExceeded depositChannelNotFound
message
string

Default Response

object
message
required
string
error
required
string
data

Default Response

object
message
required
string
error
required
string
data