Skip to main content
POST
/
api
/
swaps
/
quote
Swap quote — fans out to all providers, returns ranked best route
curl --request POST \
  --url https://api.walletsuite.io/api/swaps/quote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "srcChain": "ethereum",
  "dstChain": "ethereum",
  "srcToken": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "dstToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "srcAmount": 10000000000000000,
  "fromAddress": "0xYourEvmWalletHere",
  "toAddress": "0xYourEvmWalletHere",
  "slippageBps": 100,
  "srcSymbol": "WETH",
  "dstSymbol": "USDC",
  "srcDecimals": 18,
  "dstDecimals": 6,
  "provider": "oneinch",
  "excludeProviders": [
    "odos"
  ]
}
'
{
  "ok": true,
  "code": "<string>",
  "message": "<string>",
  "data": {
    "request": {
      "srcChain": "<string>",
      "dstChain": "<string>",
      "srcToken": "<string>",
      "dstToken": "<string>",
      "srcAmount": 123,
      "fromAddress": "<string>",
      "toAddress": "<string>",
      "slippageBps": 123,
      "feeBps": 123,
      "integratorTag": "<string>",
      "excludeProviders": [],
      "timeoutMs": 123,
      "srcDecimals": 123,
      "dstDecimals": 123,
      "srcSymbol": "<string>",
      "dstSymbol": "<string>",
      "feeRecipient": "<string>",
      "onlyProviders": []
    },
    "ranked": [
      {
        "rank": 123,
        "netDstAmount": 123,
        "integratorFeeInDstAmount": 123,
        "quote": {
          "srcChain": "<string>",
          "dstChain": "<string>",
          "srcToken": "<string>",
          "dstToken": "<string>",
          "srcAmount": 123,
          "dstAmount": 123,
          "minDstAmount": 123,
          "rawProviderRef": "<string>",
          "expiresAt": "2023-11-07T05:31:56Z",
          "fees": {
            "integratorBps": 123,
            "total": 123,
            "totalBps": 123,
            "integratorAmount": 123,
            "protocolBps": 123,
            "protocolAmount": 123,
            "gasBaseFee": 123,
            "outboundFee": 123,
            "liquidityFee": 123,
            "priceImpactBps": 123,
            "feeAsset": "<string>"
          },
          "warnings": [
            "<string>"
          ],
          "priceImpactBps": 123,
          "estimatedGas": 123,
          "gasUsd": 123,
          "estimatedDurationSec": 123,
          "approvalSpender": "<string>",
          "tx": {
            "chain": "<string>",
            "from": "<string>",
            "to": "<string>",
            "approvalRequired": true,
            "chainId": 123,
            "data": "<string>",
            "valueWei": 123,
            "gasLimit": 123,
            "maxPriorityFeePerGas": 123,
            "maxFeePerGas": 123,
            "gasPrice": 123,
            "nonce": 123,
            "memo": "<string>",
            "approvalSpender": "<string>",
            "approvalToken": "<string>",
            "approvalAmount": 123,
            "solanaTransactionBase64": "<string>",
            "depositAddress": "<string>",
            "depositExpiresAt": "2023-11-07T05:31:56Z"
          },
          "notes": "<string>"
        }
      }
    ],
    "errors": [
      {
        "code": "<string>",
        "message": "<string>",
        "durationMs": 123
      }
    ],
    "quotedAt": "2023-11-07T05:31:56Z",
    "expiresAt": "2023-11-07T05:31:56Z",
    "quoteId": "<string>",
    "winner": {
      "srcChain": "<string>",
      "dstChain": "<string>",
      "srcToken": "<string>",
      "dstToken": "<string>",
      "srcAmount": 123,
      "dstAmount": 123,
      "minDstAmount": 123,
      "rawProviderRef": "<string>",
      "expiresAt": "2023-11-07T05:31:56Z",
      "fees": {
        "integratorBps": 123,
        "total": 123,
        "totalBps": 123,
        "integratorAmount": 123,
        "protocolBps": 123,
        "protocolAmount": 123,
        "gasBaseFee": 123,
        "outboundFee": 123,
        "liquidityFee": 123,
        "priceImpactBps": 123,
        "feeAsset": "<string>"
      },
      "warnings": [
        "<string>"
      ],
      "priceImpactBps": 123,
      "estimatedGas": 123,
      "gasUsd": 123,
      "estimatedDurationSec": 123,
      "approvalSpender": "<string>",
      "tx": {
        "chain": "<string>",
        "from": "<string>",
        "to": "<string>",
        "approvalRequired": true,
        "chainId": 123,
        "data": "<string>",
        "valueWei": 123,
        "gasLimit": 123,
        "maxPriorityFeePerGas": 123,
        "maxFeePerGas": 123,
        "gasPrice": 123,
        "nonce": 123,
        "memo": "<string>",
        "approvalSpender": "<string>",
        "approvalToken": "<string>",
        "approvalAmount": 123,
        "solanaTransactionBase64": "<string>",
        "depositAddress": "<string>",
        "depositExpiresAt": "2023-11-07T05:31:56Z"
      },
      "notes": "<string>"
    }
  }
}

Authorizations

x-api-key
string
header
required

API key provided by WalletSuite team

Body

application/json

Quote request: returns the best route across all enabled providers.

srcChain
string
required

Source chain key (lowercase).

Example:

"ethereum"

dstChain
string
required

Destination chain key (lowercase).

Example:

"ethereum"

srcToken
string
required

Source token address (EVM hex / Solana mint), native, or the EVM EEEE sentinel.

Example:

"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"

dstToken
string
required

Destination token address.

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

srcAmount
integer
required

Source amount in raw base units (wei, lamports, sats).

Example:

10000000000000000

fromAddress
string
required

Sender address on srcChain.

Example:

"0xYourEvmWalletHere"

toAddress
string

Recipient address on dstChain. Defaults to fromAddress.

Example:

"0xYourEvmWalletHere"

slippageBps
integer<int32>
default:100

Slippage tolerance in basis points (10 = 0.1%).

Example:

100

srcSymbol
string

Optional source token symbol (required for THORChain ERC-20 pools).

Example:

"WETH"

dstSymbol
string

Optional destination token symbol.

Example:

"USDC"

srcDecimals
integer<int32>

Source token decimals (required for non-EVM aggregator routing).

Example:

18

dstDecimals
integer<int32>

Destination token decimals.

Example:

6

provider
string

Restrict the fanout to a single provider id.

Example:

"oneinch"

excludeProviders
string[]

Provider ids to skip during fanout.

Example:
["odos"]

Response

200 - */*

OK

ok
boolean
required
code
string
required
message
string
required
data
object