Skip to main content
POST
/
api
/
v3
/
quotes
/
getQuote
Get Quote
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"
  }
}

Body

application/json
dAppID
string
required

Unique identifier for the client application making the request

Example:

"my-dapp"

quoteRequest
object
required

Cross-chain token swap request details including source/destination tokens and addresses

contracts
object

Optional contract addresses to use for the cross-chain swap (will use defaults if not specified)

gaslessIntentData
object

Optional gasless intent data containing permit signatures for token approvals and execution configuration

Response

200 - application/json

Successfully retrieved quote with pricing and execution details

quoteResponse
object
required

Detailed quote information including tokens, amounts, fees, and timing

contracts
object
required

Contract addresses required for executing this cross-chain swap