Skip to main content
GET
/
api
/
v1
/
trade
/
quote
Get a quote for buying or selling any ERC20 token
curl --request GET \
  --url https://api.fuse.io/api/v1/trade/quote
{
  "price": "<string>",
  "guaranteedPrice": "<string>",
  "to": "<string>",
  "data": "<string>",
  "value": "<string>",
  "gasPrice": "<string>",
  "gas": "<string>",
  "estimatedGas": "<string>",
  "protocolFee": "<string>",
  "minimumProtocolFee": "<string>",
  "buyAmount": "<string>",
  "sellAmount": "<string>",
  "sources": [
    {
      "name": "<string>",
      "proportion": "<string>"
    }
  ],
  "buyTokenAddress": "<string>",
  "sellTokenAddress": "<string>",
  "allowanceTarget": "<string>",
  "fees": {
    "zeroExFee": {
      "feeType": "<string>",
      "feeToken": "<string>",
      "feeAmount": "<string>",
      "billingType": "<string>"
    }
  },
  "grossPrice": "<string>",
  "grossBuyAmount": "<string>",
  "grossSellAmount": "<string>",
  "sellTokenToEthRate": "<string>",
  "buyTokenToEthRate": "<string>",
  "expectedSlippage": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.fuse.io/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

apiKey
string
required

Your Public API key.

sellToken
string
required

The ERC20 token address of the token you want to sell.

buyToken
string
required

The ERC20 token address of the token you want to receive.

sellAmount
string

The amount of sellToken (in sellToken base units) you want to send.

buyAmount
string

The amount of buyToken (in buyToken base units) you want to receive.

slippagePercentage
string

The maximum acceptable slippage percentage.

gasPrice
string

The target gas price for the swap transaction.

takerAddress
string

The address which will fill the quote.

excludedSources
string

Liquidity sources to exclude from the quote.

includedSources
string

Liquidity sources to include in the quote.

skipValidation
boolean

Skip validation of the quote.

feeRecipient
string

The address that should receive affiliate fees.

buyTokenPercentageFee
string

The percentage of the buyAmount attributed as affiliate fees.

enableSlippageProtection
boolean

Enable slippage protection.

priceImpactProtectionPercentage
string

Allowed price impact percentage.

feeRecipientTradeSurplus
string

The recipient address of any trade surplus fees.

shouldSellEntireBalance
boolean

Sell the entirety of the caller's takerToken balance.

Response

Successful response with the quote details

price
string
guaranteedPrice
string
to
string
data
string
value
string
gasPrice
string
gas
string
estimatedGas
string
protocolFee
string
minimumProtocolFee
string
buyAmount
string
sellAmount
string
sources
object[]
buyTokenAddress
string
sellTokenAddress
string
allowanceTarget
string
fees
object
grossPrice
string
grossBuyAmount
string
grossSellAmount
string
sellTokenToEthRate
string
buyTokenToEthRate
string
expectedSlippage
string