Skip to main content
POST
/
api
/
v3
/
quotes
/
exactIn
Get Exact In Quotes
curl --request POST \
  --url https://quotes.eco.com/api/v3/quotes/exactIn \
  --header 'Content-Type: application/json' \
  --data '{
  "dAppID": "my-dapp",
  "intentExecutionTypes": [
    "SELF_PUBLISH"
  ],
  "quoteRequest": {
    "sourceChainID": 1,
    "destinationChainID": 42161,
    "sourceToken": "0xA0b86a33E6441e45C3b9d1C3D6a0b5be4b7b5b5a",
    "destinationToken": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
    "sourceAmount": "1000000",
    "funder": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
    "refundRecipient": "0x742d35Cc6527C92b4A1F3a2a8b1c9b3e8c4c5b2a",
    "recipient": "0x8Ba1c0a8B4A4b9e8A9f1a6B7c8d9e0F1234567890"
  },
  "contracts": {
    "sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
    "destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
    "prover": "0xabcdef1234567890abcdef1234567890abcdef12"
  }
}'
{
  "data": [
    {
      "quoteID": "<string>",
      "solverID": "<string>",
      "receiveSignedIntentUrl": "<string>",
      "quoteData": {
        "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,
          "encodedRoute": "0x00000000000000000000000000000000000000000000000000000000000000202810ea6d0860ce5315ef2b62b1b580f2b4ef158b76a6ea8f8982600c130e55e70000000000000000000000000000000000000000000000000000000068e56fa2000000000000000000000000b5e58a8206473dc3ab9b8d4d3b0f84c0ba68f8b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000833589fcd6edb6e082dc7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000004bd61000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044a9059cbb0000000000000000000000002b2c52b1b63c4bfc7f16910a1734641d8e34de6200000000000000000000000000000000000000000000000000000000004bd61000000000000000000000000000000000000000000000000000000000"
        },
        "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"

intentExecutionTypes
enum<string>[]
required

Array of intent execution types to fetch quotes for

Example:
["SELF_PUBLISH"]
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)

Response

201 - application/json

Successfully retrieved exact in quotes from solvers

data
object[]
required

Array of solver quote responses

I