Skip to main content
POST
/
quote
Get a quote
curl --request POST \
  --url https://api.example.com/quote \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "EXACT_INPUT",
  "from": {
    "chain": {
      "kind": "<string>"
    },
    "token": {
      "kind": "<string>",
      "decimals": 1
    }
  },
  "to": {
    "chain": {
      "kind": "<string>"
    },
    "token": {
      "kind": "<string>",
      "decimals": 1
    }
  },
  "amount": "<string>",
  "slippageBps": 5000
}
'
{
  "mode": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fees": {
    "totalUsd": 123,
    "preswap": {
      "amount": "<string>",
      "currency": {
        "chain": {
          "kind": "<string>"
        },
        "token": {
          "kind": "<string>",
          "decimals": 1
        }
      },
      "usd": 123
    },
    "rift": {
      "network": {
        "amount": "<string>",
        "currency": {
          "chain": {
            "kind": "<string>"
          },
          "token": {
            "kind": "<string>",
            "decimals": 1
          }
        },
        "usd": 123
      },
      "liquidity": {
        "amount": "<string>",
        "currency": {
          "chain": {
            "kind": "<string>"
          },
          "token": {
            "kind": "<string>",
            "decimals": 1
          }
        },
        "usd": 123
      },
      "protocol": {
        "amount": "<string>",
        "currency": {
          "chain": {
            "kind": "<string>"
          },
          "token": {
            "kind": "<string>",
            "decimals": 1
          }
        },
        "usd": 123
      }
    },
    "postswap": {
      "amount": "<string>",
      "currency": {
        "chain": {
          "kind": "<string>"
        },
        "token": {
          "kind": "<string>",
          "decimals": 1
        }
      },
      "usd": 123
    }
  },
  "expiresAt": "2023-11-07T05:31:56Z",
  "from": {
    "currency": {
      "chain": {
        "kind": "<string>"
      },
      "token": {
        "kind": "<string>",
        "decimals": 1
      }
    },
    "expected": "<string>"
  },
  "to": {
    "currency": {
      "chain": {
        "kind": "<string>"
      },
      "token": {
        "kind": "<string>",
        "decimals": 1
      }
    },
    "expected": "<string>",
    "minimum": "<string>"
  }
}

Body

application/json

Request for a swap quote

type
enum<string>
required

Whether the amount specified is input or output

Available options:
EXACT_INPUT,
EXACT_OUTPUT
from
object
required

Currency is defined as a chain and token identifier

to
object
required

Currency is defined as a chain and token identifier

amount
string
required

Unsigned 256-bit integer as a base-unit decimal string (no decimals)

Minimum string length: 1
Pattern: ^[0-9]+$
slippageBps
number
required

Slippage tolerance in basis points (1% = 100)

Required range: 0 <= x <= 10000

Response

200 - application/json

Quote response

Quote response with pricing and fees

mode
string
required
Allowed value: "exact_input"
id
string<uuid>
required

Quote ID - use this when creating a swap

fees
FeeBreakdown · object
required

Complete fee breakdown by swap leg

expiresAt
string<date-time>
required

Quote expiration time (ISO 8601)

from
object
required

Exact amount specified by user

to
object
required

Calculated output amount with optional minimum after slippage