Skip to main content
POST
/
swap
/
quote
Get swap quote
curl --request POST \
  --url https://api.zet.money/v1/swap/quote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "fromToken": "USDC",
  "toToken": "ETH",
  "amount": "100",
  "fromChain": "base",
  "toChain": "base",
  "slippage": 0.5
}
'
{
  "success": true,
  "data": {
    "quoteId": "qt_01H8X5...",
    "fromToken": "USDC",
    "toToken": "ETH",
    "fromChain": "base",
    "toChain": "base",
    "fromAmount": "100",
    "toAmount": "0.0285",
    "rate": "3508.77",
    "isCrossChain": false,
    "fees": {
      "platformFee": "0.013",
      "platformFeeFiat": "20",
      "bridgeFee": "0",
      "totalFee": "0.013"
    },
    "route": {
      "steps": 1,
      "estimatedTime": "30 seconds",
      "providers": [
        "Uniswap V3"
      ]
    },
    "expiresAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

x-api-key
string
header
required

Your Zet API key. Contact zetdotmoney@gmail.com to obtain your keys.

Body

application/json
fromToken
string
required

Token symbol to swap from.

Example:

"USDC"

toToken
string
required

Token symbol to swap to.

Example:

"ETH"

amount
string
required

Amount of fromToken to swap.

Example:

"100"

fromChain
enum<string>
default:base

Primary chains where Zet-managed wallets operate

Available options:
base,
bsc
toChain
enum<string>
default:base

Target chain. If different from fromChain, this becomes a cross-chain swap.

Available options:
base,
bsc
slippage
number
default:0.3

Maximum slippage tolerance as a percentage.

Example:

0.5

Response

Swap quote with route details.

success
boolean
Example:

true

data
object