Skip to main content
Use the Eco API v1 at https://api.eco.com to quote a transfer, inspect its route, and obtain a funding transaction. This guide follows an exact-input USDC transfer from Base to OP Mainnet. Quote availability depends on the chain, token pair, amount, and available liquidity.

Prerequisites

  • A server-side API key enabled for v1. Contact Eco to request access.
  • A source-chain wallet with USDC and enough ETH for approval and funding transactions
  • An OP Mainnet recipient address and source-chain RPC access
  • Node.js 22.18 or later and viem for the example below
  • The current supported chains and tokens
Keep your API key on the server. Set ECO_API_KEY, ECO_FUNDER, and ECO_RECIPIENT in your environment; never include the key in browser or mobile code.

Discover chains and tokens

Read GET /v1/chains for supported chains, Portal addresses, and each chain’s quoteSigner. Read GET /v1/tokens for token addresses, decimals, and supported gasless standards. Cache discovery responses with a refresh policy so that configuration changes reach your integration. A listed token or chain does not guarantee a quote for every request.

Request a quote

Install the dependency with npm install viem. Save the example as request-quote.ts, set the environment variables above, and run node request-quote.ts with Node.js 22.18 or later. The example uses native fetch, checks HTTP errors, and prints the API response without funding it. Replace the environment values with addresses you intend to use.
A successful request returns 200 with a signed quote. The quote reference includes full success and error examples. Use exact-out to specify destination.amount, or custom to supply destination calls. See the quote reference for the required fields for each type.

Verify before funding

Verify the quote signature against the source chain’s quoteSigner. Reject expired quotes. Signature verification alone does not verify every JSON field or the funding transaction: recompute intent hashes from the decoded intent data and check the transaction and delivery route against your request. The reference script implements these checks for supported EVM and Solana route shapes and reports when it cannot verify the recipient.

Fund the quote

For an EVM source, verify that the transaction targets the expected Portal. Check the source token allowance, approve the required amount if needed, and wait for a successful approval receipt. Estimate gas, recheck quote expiry, then send the returned execution.transaction from source.funder. Check that the funding receipt succeeded.For a Solana source, execution.transaction.type is svm and the response carries feePayer and instructions. The reference script shows both transaction formats.

Track delivery

Use GET /v1/intents/status to track the delivery intent. For a direct transfer, this is the quote’s intentHash. For routes with multiple intents, inspect the roles in steps[].intents[]; the funded source intent may complete before the recipient is paid. See Intent types. Use bounded polling and preserve identifiers if your client times out. A client timeout does not cancel a funded intent.

Troubleshooting

  • 400: correct the request fields reported in the error.
  • 401 or 403: verify key access. A submit error saying the request could not be attributed to an authorized key requires Eco to check the partner mapping.
  • 422 chain-not-supported: select a supported chain.
  • 502 solver-error: the service did not return a usable quote. Check the pair and amount, then retry with a bounded delay.
  • Network errors or an uncertain submit result: inspect the existing job or transaction before authorizing another payment.
No requests-per-second quota is published. Handle 429 with backoff and honor Retry-After when present. See Errors and retries.

Next steps