Create Quote
POST/v4/quotesDescription
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
| Name | Description | Required | Example |
|---|---|---|---|
| App-Name | App-Name for the authorization | yes | acme-inc |
| App-Version | App-Version for the authorization | no | 23.5.5 |
| Forwarded | If 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-Agent | User-Agent for the authorization | no | AgentName/1.0.0 |
Request Body
| Name | Description | Required | Default |
|---|---|---|---|
| pairId | Pair identifier in CAIP-19 format (e.g., eip155:1/slip44:60_eip155:137/erc20:0x2791...) | yes | |
| amount | Amount to swap in standard units (e.g., "1" for 1 ETH, not wei) | yes | |
| swapMode | ExactIn (swap exact input) or ExactOut (swap to get exact output) | yes | |
| fromAddress | Source address for the swap | no | |
| toAddress | Destination address for the swap | no | |
| slippage | Percentage of slippage tolerance (0-100) | no | 0.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 orderpair- Pair identifier in CAIP-19 formatamount- Amount you’ll receive in standard units (e.g., “1” for 1 ETH)expires- ISO 8601 timestamp when the quote expires
Last updated on