Introduction

Our API aggregates several key providers and protocols, offering access to an extensive range of chains and tokens without the complexity of managing multiple integrations. It is designed to integrate cross-chain swaps into your application with ease in addition to in-chain dex aggregation for single-chain swaps.

The latest version of our API is version 3, and the endpoints to use it are currently using v3 in the call. In represents a new flow that clearly separates the responsabilities of a swap into two different calls: fetching a price and building the swap transaction.

On top of that, SwapKit's fees are reduced from a fixed 0.20% on all swaps to:

  • 0.15% on swaps between $0 and $500k.

  • 0.12% on swaps between $500k and $1M.

  • 0.10% on swaps above $1M.

  • 0.01% on stablecoin to stablecoin swaps.

How to use SwapKit's API

To get the most out of SwapKit's API we recommend going through the endpoints in the following order:

  1. /providers - Retrieve a list of available providers and their supported chains.

  2. /tokens - Fetch a list of supported tokens across different chains and providers.

  3. /v3/quote - Price discovery only. Returns available routes with expected amounts, fees and execution times. Quotes are cached for one minute.

  4. /v3/swap - Transaction execution. Takes a routeId from a quote and builds a ready-to-broadcast transaction.

  5. /track - Track the status of a swap to monitor its progress and completion.

However, /providers and /tokens don't change often, and you can directly request a quote once you have everything set up. As an alternative you can use the /swapTo endpoint to find the swap connections between tokens, similar to the cross-chain trading matrix. Every address involved in a /v3/swap call is validated for AML compliance. An address could receive a valid quote but be refused on this step.

Read our recommended implementation flow here in our documentation. Register for an API key in our dashboard and try it yourself at https://api.swapkit.dev/docs/ . Check out our transaction tracking interface at https://track.swapkit.dev/.

Last updated