API

SuperSwap API Overview

The SuperSwap API allows you to access SuperSwap's swap functionality programmatically, without needing to interact with the user interface. With this API, you can:

  • Generate a Quote:

Get an atomic quote for swapping between assets, allowing you to check the price of a trade before committing to it.

  • Execute a Swap:

Receive the necessary call data to execute the swap directly from the API, without having to manually assemble the transaction.

This API provides a seamless, efficient way to check quotes and execute swaps, whether you're building a trading bot, integrating swaps into your platform, or simply wanting to check prices without interacting with the UI. It can also be used to anonymously check quotes, ensuring privacy.

Generate Quote

post

Quote a path for swapping between assets atomically. This can be used programmatically to check for a quoted price of a given trade without needing to wait for an assembled transaction to be created and provided. It can also be used to anonymously check quotes.

Body

Public facing path request schema

tokenInstringRequired

Token address to swap from (NATIVE for eth).

Example: NATIVE
tokenOutstringRequired

Token address to swap to (NATIVE for eth).

Example: 0xbf0cAfCbaaF0be8221Ae8d630500984eDC908861
slippageintegerRequired

Slippage (%).

Example: 0.05
amountInintegerRequired

Amount of token to swap in Float.

Example: 1
tostringRequired

Address of wallet to receive swap

Example: 0x830bf0a3F01E493C3335E26dC2a3EA964C3CC4D8
Responses
200

Successful Response

application/json
post
POST /api/quote HTTP/1.1
Host: api.superswap.ink
Content-Type: application/json
Accept: */*
Content-Length: 155

{
  "tokenIn": "NATIVE",
  "tokenOut": "0xbf0cAfCbaaF0be8221Ae8d630500984eDC908861",
  "slippage": 0.05,
  "amountIn": 1,
  "to": "0x830bf0a3F01E493C3335E26dC2a3EA964C3CC4D8"
}
{
  "tokenIn": "text",
  "amountIn": "text",
  "tokenOut": "text",
  "amountOutMin": "text",
  "slippage": 1,
  "fee": 1,
  "calldata": "text",
  "value": "text"
}

Rate Limits

To ensure fair usage and prevent abuse, the SuperSwap API enforces the following rate limits:

  • Free & Open Tier: Up to 30 requests per minute

  • Custom Limits: For higher request limits, please contact us at team@superswap.ink

If you exceed the allowed limits, your requests may be temporarily blocked. To prevent disruptions, consider implementing retry logic with exponential backoff.

Last updated