Skip to Content
V4 APIEndpointsQuotesCreate Quote

Create Quote

POST/v4/quotes

Description

Create a quote for a swap between two assets. The API automatically finds the best available rate by combining multiple providers and strategies.

Quote Expiration: Quotes expire after a short period. Make sure to use the quote ID to create an order before it expires.

Header Parameters

NameDescriptionRequiredExample
App-NameApp-Name for the authorizationyesacme-inc
App-VersionApp-Version for the authorizationno23.5.5
ForwardedIf you are proxying requests to the API, you must include the "Forwarded" header with the original request IP address. This is used for geolocation availability purposes.no
User-AgentUser-Agent for the authorizationnoAgentName/1.0.0

Request Body

NameDescriptionRequiredDefault
pairIdPair identifier in CAIP-19 format (e.g., eip155:1/slip44:60_eip155:137/erc20:0x2791...)yes
amountAmount to swap in standard units (e.g., "1" for 1 ETH, not wei)yes
swapModeExactIn (swap exact input) or ExactOut (swap to get exact output)yes
fromAddressSource address for the swapno
toAddressDestination address for the swapno
slippagePercentage of slippage tolerance (0-100)no0.5

Response

SUCCESSFUL QUOTE
{
  "id": "quote_abc123xyz",
  "pair": "eip155:1/slip44:60_eip155:137/erc20:0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
  "amount": "1",
  "expires": "2024-01-15T10:30:00Z"
}

Response fields:

  • id - Quote identifier. Use this ID to create an order
  • pair - Pair identifier in CAIP-19 format
  • amount - Amount you’ll receive in standard units (e.g., “1” for 1 ETH)
  • expires - ISO 8601 timestamp when the quote expires
Last updated on