Skip to main content
GET
https://crestgateway.up.railway.app
/
meta-api
/
v1
/
quote
/
get-quote
Get Quote
curl --request GET \
  --url https://crestgateway.up.railway.app/meta-api/v1/quote/get-quote \
  --header 'X-Api-Key: <x-api-key>'
{
  "allProviders": [
    {
      "providerName": "Relay",
      "inputAmount": "1000000000000000000",
      "outputAmount": "3314477406",
      "inputToken": "WETH",
      "outputToken": "USDC",
      "inputChain": "1",
      "outputChain": "42161",
      "steps": [
        {
          "description": "Depositing funds to the relayer to execute the swap for USDC",
          "type": "transaction",
          "tx": {
            "data": "0xa9059cbb000000000000000000000000f70d...776970",
            "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "value": "0",
            "gas": "461493799"
          },
          "message": null
        }
      ],
      "errorMessage": null
    },
    {
      "providerName": "Aori",
      "inputAmount": "1000000000000000000",
      "outputAmount": "3309011752",
      "inputToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "outputToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "inputChain": "1",
      "outputChain": "42161",
      "steps": [
        {
          "description": null,
          "type": "signature",
          "tx": null,
          "message": "QW9yaXwweDc3NGM0YjY5NDcwM2E1MGVkOTVhNDYwZTExOWJjODlkMWUwODFhN2IyYWNhMTQxYjk2ZjFiM2YyZDk3ZTg0ZDY=.wpLEdfkS8cqXDty5xbHwzhDk2NZgQW12uTARvaEMcq4="
        }
      ],
      "errorMessage": null
    },
    {
      "providerName": "Enso",
      "inputAmount": "1000000000000000000",
      "outputAmount": "3313420510",
      "inputToken": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "outputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "inputChain": "1",
      "outputChain": "42161",
      "steps": [
        {
          "description": null,
          "type": "transaction",
          "tx": {
            "data": "0xf52e33f50000000000000000000000000000000000000000000000000000000000000040...",
            "to": "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf",
            "value": "31819560453476",
            "gas": "810853"
          },
          "message": null
        }
      ],
      "errorMessage": null
    }
  ],
  "providerName": "Relay",
  "inputAmount": "1000000000000000000",
  "outputAmount": "3314477406",
  "inputToken": "WETH",
  "outputToken": "USDC",
  "inputChain": "1",
  "outputChain": "42161",
  "steps": [
    {
      "description": "Depositing funds to the relayer to execute the swap for USDC",
      "type": "transaction",
      "tx": {
        "data": "0xa9059cbb000000000000000000000000f70d...776970",
        "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "value": "0",
        "gas": "461493799"
      },
      "message": null
    }
  ],
  "errorMessage": null
}

Endpoint

GET https://crestgateway.up.railway.app/meta-api/v1/quote/get-quote
The Crest Meta API aggregates on-chain liquidity sources and relayers to provide the best executable quote for a swap or bridge. The response returns every provider that produced a quote plus the recommended provider with the full list of actions (transactions or signatures) your app must perform.

Authentication

Include your project key in the request header:
X-Api-Key: <YOUR_API_KEY>

Query Parameters

sender
string
required
Wallet address that will send the input tokens. Must be a valid Ethereum address.
receiver
string
required
Address that should receive the output tokens. Can match sender for same-wallet swaps.
inputToken
string
required
Symbol or contract address of the input (source) token.
outputToken
string
required
Symbol or contract address of the output (destination) token.
inputChain
number
required
Chain ID of the source network (e.g., 1 for Ethereum, 42161 for Arbitrum).
outputChain
number
required
Chain ID of the destination network.
inputAmount
string
required
Amount of the input token in the smallest unit (wei for ETH-based tokens).Example: "1000000000000000000" for 1 WETH.

Headers

X-Api-Key
string
required
Crest API key used to authorize the request.Paste your key here to test the endpoint through the playground.

Example Request

curl --location 'https://crestgateway.up.railway.app/meta-api/v1/quote/get-quote?sender=0xF2Cb17DD766D8522E7eD0e265f761219e1249893&receiver=0xF2Cb17DD766D8522E7eD0e265f761219e1249893&inputToken=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&outputToken=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&inputChain=1&outputChain=42161&inputAmount=1000000000000000000' \
  --header 'X-Api-Key: key_test001'

Response

providerName
string
Provider that produced the recommended quote.
inputAmount
string
Amount of the input token in base units for the selected quote.
outputAmount
string
Estimated output amount in base units.
inputToken
string
Symbol or contract address of the input token.
outputToken
string
Symbol or contract address of the output token.
inputChain
string
Source chain ID (stringified).
outputChain
string
Destination chain ID (stringified).
steps
array
Ordered actions required to execute the quote.
errorMessage
string
Null when the quote succeeded, otherwise contains provider-specific errors.
allProviders
array
Quotes returned by every upstream provider (including the recommended one).
{
  "allProviders": [
    {
      "providerName": "Relay",
      "inputAmount": "1000000000000000000",
      "outputAmount": "3314477406",
      "inputToken": "WETH",
      "outputToken": "USDC",
      "inputChain": "1",
      "outputChain": "42161",
      "steps": [
        {
          "description": "Depositing funds to the relayer to execute the swap for USDC",
          "type": "transaction",
          "tx": {
            "data": "0xa9059cbb000000000000000000000000f70d...776970",
            "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "value": "0",
            "gas": "461493799"
          },
          "message": null
        }
      ],
      "errorMessage": null
    },
    {
      "providerName": "Aori",
      "inputAmount": "1000000000000000000",
      "outputAmount": "3309011752",
      "inputToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "outputToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "inputChain": "1",
      "outputChain": "42161",
      "steps": [
        {
          "description": null,
          "type": "signature",
          "tx": null,
          "message": "QW9yaXwweDc3NGM0YjY5NDcwM2E1MGVkOTVhNDYwZTExOWJjODlkMWUwODFhN2IyYWNhMTQxYjk2ZjFiM2YyZDk3ZTg0ZDY=.wpLEdfkS8cqXDty5xbHwzhDk2NZgQW12uTARvaEMcq4="
        }
      ],
      "errorMessage": null
    },
    {
      "providerName": "Enso",
      "inputAmount": "1000000000000000000",
      "outputAmount": "3313420510",
      "inputToken": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "outputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "inputChain": "1",
      "outputChain": "42161",
      "steps": [
        {
          "description": null,
          "type": "transaction",
          "tx": {
            "data": "0xf52e33f50000000000000000000000000000000000000000000000000000000000000040...",
            "to": "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf",
            "value": "31819560453476",
            "gas": "810853"
          },
          "message": null
        }
      ],
      "errorMessage": null
    }
  ],
  "providerName": "Relay",
  "inputAmount": "1000000000000000000",
  "outputAmount": "3314477406",
  "inputToken": "WETH",
  "outputToken": "USDC",
  "inputChain": "1",
  "outputChain": "42161",
  "steps": [
    {
      "description": "Depositing funds to the relayer to execute the swap for USDC",
      "type": "transaction",
      "tx": {
        "data": "0xa9059cbb000000000000000000000000f70d...776970",
        "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "value": "0",
        "gas": "461493799"
      },
      "message": null
    }
  ],
  "errorMessage": null
}

Error Codes

CodeDescription
INVALID_PARAMETERSRequest parameters are invalid or missing
INVALID_TOKENToken address or symbol is not recognized
TOKEN_NOT_FOUNDToken does not exist on the specified chain
UNSUPPORTED_CHAINBlockchain network is not supported
INSUFFICIENT_LIQUIDITYNo available liquidity for the trading pair
AMOUNT_TOO_LOWSwap amount is below the minimum threshold
AMOUNT_TOO_HIGHSwap amount exceeds maximum threshold
RATE_LIMIT_EXCEEDEDToo many requests, please slow down
INTERNAL_ERRORInternal server error, please try again

Notes

Timing Fields: Internal fields like elapsedAll, startTime, endTime, and estimatedTime are experimental signals that may appear in sandbox environments but should be ignored in production integrations.
Step Execution: Execute the returned steps sequentially using a Web3 library (ethers.js, viem, wagmi, etc.). Transactions and signatures should be prompted in the same order they appear.
Slippage & Reverts: Provider transactions already encode the required slippage controls. Any modification to calldata may remove those protections and cause the swap to revert.
Cross-Chain Swaps: When inputChain and outputChain differ, expect a bridge or relayer transaction in the steps array. Delivery time depends on the selected provider.