Skip to main content
POST
/
api
/
swaps
/
quote
Swap quote
curl --request POST \
  --url https://api.walletsuite.io/api/swaps/quote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "chain": "<string>",
  "fromAddress": "<string>",
  "sellToken": "<string>",
  "buyToken": "<string>",
  "sellAmount": 123,
  "slippageBps": 123,
  "provider": "ZERO_X"
}
'
{
  "ok": true,
  "code": "<string>",
  "message": "<string>",
  "data": {
    "chain": "<string>",
    "provider": "ZERO_X",
    "quoteId": "<string>",
    "sellToken": "<string>",
    "buyToken": "<string>",
    "sellAmount": 123,
    "buyAmount": 123,
    "minBuyAmount": 123,
    "price": 123,
    "issues": [
      "<string>"
    ],
    "expiresAt": "2023-11-07T05:31:56Z",
    "priceImpactBps": 123,
    "estimatedGas": 123
  }
}

Authorizations

x-api-key
string
header
required

API key provided by WalletSuite team

Body

application/json
chain
string
required
fromAddress
string
required
sellToken
string
required
buyToken
string
required
sellAmount
integer
required
slippageBps
integer<int32>
required
provider
enum<string>
Available options:
ZERO_X,
ONE_INCH,
PANCAKE_SWAP,
QUICK_SWAP,
FLUID_SWAP,
BALANCER,
CURVE_FINANCE_SWAP,
UNISWAP,
WOOFI,
INTERNAL

Response

200 - */*

OK

ok
boolean
required
code
string
required
message
string
required
data
object