Skip to main content
GET
/
api
/
v1
/
trade
/
price
Get an indicative price for a transaction
curl --request GET \
  --url https://api.fuse.io/api/v1/trade/price
{
  "price": "<string>",
  "grossPrice": "<string>",
  "estimatedPriceImpact": "<string>",
  "value": "<string>",
  "gasPrice": "<string>",
  "gas": "<string>",
  "estimatedGas": "<string>",
  "protocolFee": "<string>",
  "minimumProtocolFee": "<string>",
  "buyAmount": "<string>",
  "grossBuyAmount": "<string>",
  "sellAmount": "<string>",
  "grossSellAmount": "<string>",
  "sources": [
    {
      "name": "<string>",
      "proportion": "<string>"
    }
  ],
  "buyTokenAddress": "<string>",
  "sellTokenAddress": "<string>",
  "allowanceTarget": "<string>",
  "sellTokenToEthRate": "<string>",
  "buyTokenToEthRate": "<string>",
  "expectedSlippage": "<string>",
  "fees": {
    "zeroExFee": {
      "feeType": "<string>",
      "feeToken": "<string>",
      "feeAmount": "<string>",
      "billingType": "<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.

Response

Indicative price for the transaction

price
string

Price of buyToken in sellToken and vice versa.

grossPrice
string

Price with fees removed.

estimatedPriceImpact
string

Estimated change in price due to price impact.

value
string

Amount of ether (in wei) to be sent with the transaction.

gasPrice
string

Gas price (in wei) for the transaction.

gas
string

Estimated gas limit for the transaction.

estimatedGas
string

Estimate of the actual gas used in the transaction.

protocolFee
string

Maximum ether paid towards the protocol fee (in wei).

minimumProtocolFee
string

Minimum ether paid towards the protocol fee (in wei).

buyAmount
string

Amount of buyToken that would be bought in this swap.

grossBuyAmount
string

BuyAmount with fees removed.

sellAmount
string

Amount of sellToken that would be sold in this swap.

grossSellAmount
string

SellAmount with fees removed.

sources
object[]

Distribution of buyAmount or sellAmount between liquidity sources.

buyTokenAddress
string

ERC20 token address of the token you want to receive.

sellTokenAddress
string

ERC20 token address of the token you want to sell.

allowanceTarget
string

Target contract address for which the user needs to have an allowance.

sellTokenToEthRate
string

Rate between ETH and sellToken.

buyTokenToEthRate
string

Rate between ETH and buyToken.

expectedSlippage
string

Expected slippage used in routing calculations for the quote.

fees
object

Fees that would be charged, including 0x fee details.