Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fuseio/fuse-docs/llms.txt

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

The Trade API gives you programmatic access to decentralized exchange (DEX) functionality on the Fuse network, powered by Voltage Finance. It is split into two versions: V1 provides price feeds and historical statistics, while V2 adds real-time indicative prices, swap quotes with slippage controls, and liquidity source discovery. Both versions are available under the same base URL and use a shared API key.

Base URL

https://api.fuse.io
Endpoint paths are versioned independently:
  • V1 endpoints: /api/v0/trade/...
  • V2 endpoints: /api/v1/trade/...

Authentication

Pass your public API key as a query parameter on every request:
?apiKey=YOUR_PUBLIC_API_KEY

V1 endpoints — price feeds and statistics

GET /api/v0/trade/price/

Returns the latest USD price for a token.

Request parameters

tokenAddress
string
required
The ERC-20 token contract address to price.
apiKey
string
required
Your public API key.

Example

curl "https://api.fuse.io/api/v0/trade/price/0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5?apiKey=YOUR_API_KEY"
{
  "data": "1.0002"
}

GET /api/v0/trade/pricechange/

Returns the price change percentage for a token over the last 24 hours.

Request parameters

tokenAddress
string
required
The token contract address.
apiKey
string
required
Your public API key.

POST /api/v0/trade/pricechange/

Returns the price change for a token over a custom time duration specified in the request body.

Request parameters

tokenAddress
string
required
The token contract address.
apiKey
string
required
Your public API key.

Request body

duration
object
required
A duration object specifying the time window. For example: { "days": 7 }.

GET /api/v0/trade/pricechange/interval//

Returns price change data for a token over a standard interval.

Request parameters

timeFrame
string
required
Interval for price change. One of: ALL, MONTH, WEEK, DAY, HOUR.
tokenAddress
string
required
The token contract address.
apiKey
string
required
Your public API key.

GET /api/v0/trade/stats/

Returns historical OHLCV statistics for a token.

Request parameters

tokenAddress
string
required
The token contract address.
apiKey
string
required
Your public API key.
limit
number
Number of historical data points to return.

V2 endpoints — swap quotes and liquidity

GET /api/v1/trade/price

Returns an indicative (non-binding) price for a potential swap. Use this to show users an estimated price before committing to a transaction.

Request parameters

apiKey
string
required
Your public API key.
sellToken
string
required
The contract address of the token to sell.
buyToken
string
required
The contract address of the token to buy.
sellAmount
string
Amount to sell in the token’s base unit (wei). Provide either sellAmount or buyAmount, not both.
buyAmount
string
Amount to buy in the token’s base unit (wei). Provide either buyAmount or sellAmount, not both.
slippagePercentage
string
Maximum acceptable slippage as a decimal fraction (e.g., "0.01" for 1%).
takerAddress
string
The address that will execute the trade. Used for validation.
excludedSources
string
Comma-separated list of liquidity source names to exclude.
gasPrice
string
Gas price in wei. Defaults to a safe estimate if omitted.

Example

curl "https://api.fuse.io/api/v1/trade/price?apiKey=YOUR_API_KEY&sellToken=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&buyToken=0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5&sellAmount=1000000000000000000"

GET /api/v1/trade/quote

Returns a firm quote for buying or selling any ERC-20 token. The response includes calldata that can be submitted directly to the network to execute the swap.

Request parameters

apiKey
string
required
Your public API key.
sellToken
string
required
The contract address of the token to sell.
buyToken
string
required
The contract address of the token to buy.
sellAmount
string
Amount to sell in base units. Provide either sellAmount or buyAmount.
buyAmount
string
Amount to buy in base units. Provide either buyAmount or sellAmount.
slippagePercentage
string
Maximum slippage tolerance as a decimal (e.g., "0.005" for 0.5%).
takerAddress
string
The address executing the trade. Required for on-chain validation.
feeRecipient
string
Address to receive protocol fees, if applicable.
buyTokenPercentageFee
string
Percentage of the buy token amount to send to feeRecipient as a decimal (e.g., "0.01" for 1%).
shouldSellEntireBalance
boolean
When true, the quote uses the taker’s entire balance of the sell token.

Example

curl "https://api.fuse.io/api/v1/trade/quote?apiKey=YOUR_API_KEY&sellToken=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&buyToken=0x620fd5fa44BE6af63715Ef4E65DDFA0387aD13F5&sellAmount=1000000000000000000&takerAddress=0x1234567890abcdef1234567890abcdef12345678"

GET /api/v1/trade/sources

Lists all liquidity sources (AMMs and routing pools) currently enabled on the Fuse DEX.

Request parameters

apiKey
string
required
Your public API key.

Example

curl "https://api.fuse.io/api/v1/trade/sources?apiKey=YOUR_API_KEY"
{
  "sources": [
    { "name": "Voltage_Finance", "proportion": "1" }
  ]
}

Error responses

StatusDescription
400Bad request — check required parameters like sellToken, buyToken, and amount fields
401Unauthorized — invalid API key
403Forbidden — missing API key

Build docs developers (and LLMs) love