Body
application/json
Response
200 - application/json
Successfully retrieved quote with pricing and execution details
The response is of type object
.
curl --request POST \
--url https://quotes.eco.com/api/v3/quotes/getQuote \
--header 'Content-Type: application/json' \
--data '{
"dAppID": "my-dapp",
"quoteRequest": {
"sourceChainID": 1,
"destinationChainID": 42161,
"sourceToken": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
"destinationToken": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
"sourceAmount": "1000000",
"funder": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"refundRecipient": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"recipient": "0x8Ba1c0a8B4A4b9e8A9f1a6B7c8d9e0F1234567890"
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
},
"gaslessIntentData": {
"permit3": {
"chainId": 1,
"permitContract": "0x1234567890123456789012345678901234567890",
"owner": "0x0987654321098765432109876543210987654321",
"salt": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b",
"deadline": "1234567890",
"timestamp": 1234567890,
"leafs": [
"0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
"0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321"
],
"allowanceOrTransfers": [
{
"chainID": 1,
"modeOrExpiration": 0,
"token": "0xA0b86a33E6441B8Ec2c8C7E5b0d77D5FdDa0c4E4",
"account": "0x742d35cc6634c0532925a3b8b0eff6a2db3b51a",
"amountDelta": "1000000000000000000"
}
]
},
"allowPartial": false
}
}'
{
"quoteResponse": {
"intentExecutionType": "SELF_PUBLISH",
"sourceChainID": 1,
"destinationChainID": 42161,
"sourceToken": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
"destinationToken": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
"sourceAmount": "1000000",
"destinationAmount": "995000",
"funder": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"refundRecipient": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"recipient": "0x8Ba1c0a8B4A4b9e8A9f1a6B7c8d9e0F1234567890",
"fees": [
{
"name": "Solver Fee",
"description": "Fee paid to the solver for executing the cross-chain swap",
"token": {
"address": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
"decimals": 6,
"symbol": "USDC"
},
"amount": "1000"
}
],
"deadline": 1672531200,
"estimatedFulfillTimeSec": 300
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
}
}
Retrieve a quote from solvers for a cross-chain token swap. Returns detailed pricing, fees, contract addresses, and estimated fulfillment time for the requested swap.
curl --request POST \
--url https://quotes.eco.com/api/v3/quotes/getQuote \
--header 'Content-Type: application/json' \
--data '{
"dAppID": "my-dapp",
"quoteRequest": {
"sourceChainID": 1,
"destinationChainID": 42161,
"sourceToken": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
"destinationToken": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
"sourceAmount": "1000000",
"funder": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"refundRecipient": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"recipient": "0x8Ba1c0a8B4A4b9e8A9f1a6B7c8d9e0F1234567890"
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
},
"gaslessIntentData": {
"permit3": {
"chainId": 1,
"permitContract": "0x1234567890123456789012345678901234567890",
"owner": "0x0987654321098765432109876543210987654321",
"salt": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b",
"deadline": "1234567890",
"timestamp": 1234567890,
"leafs": [
"0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
"0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321"
],
"allowanceOrTransfers": [
{
"chainID": 1,
"modeOrExpiration": 0,
"token": "0xA0b86a33E6441B8Ec2c8C7E5b0d77D5FdDa0c4E4",
"account": "0x742d35cc6634c0532925a3b8b0eff6a2db3b51a",
"amountDelta": "1000000000000000000"
}
]
},
"allowPartial": false
}
}'
{
"quoteResponse": {
"intentExecutionType": "SELF_PUBLISH",
"sourceChainID": 1,
"destinationChainID": 42161,
"sourceToken": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
"destinationToken": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
"sourceAmount": "1000000",
"destinationAmount": "995000",
"funder": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"refundRecipient": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
"recipient": "0x8Ba1c0a8B4A4b9e8A9f1a6B7c8d9e0F1234567890",
"fees": [
{
"name": "Solver Fee",
"description": "Fee paid to the solver for executing the cross-chain swap",
"token": {
"address": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
"decimals": 6,
"symbol": "USDC"
},
"amount": "1000"
}
],
"deadline": 1672531200,
"estimatedFulfillTimeSec": 300
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
}
}
Successfully retrieved quote with pricing and execution details
The response is of type object
.