For the complete documentation index, see llms.txt. This page is also available as Markdown.

๐ŸงฎQuoter API

The routing API that powers swaps on Ekubo's websites

The Quoter API is hosted at:

https://prod-api-quoter.ekubo.org

It returns block-pinned split routes for exact-input and exact-output Ekubo Protocol swaps โ€” the same routes the interface executes through the Yul Router. Because quotes simulate actual pool state (including extension behavior), the quoter is the easiest way for aggregators and integrators to price Ekubo liquidity without implementing the pool math.

The API is self-described by an OpenAPI 3.1 document at https://prod-api-quoter.ekubo.org/openapi.json, usable with any REST explorer.

Endpoints

Each operation below is rendered from the OpenAPI specification โ€” expand one for its full request/response schemas, or use Test it to send a request to the live API directly from this page. (GET /openapi.json serves the specification itself.)

Get an exact-input or exact-output swap route quote

get

All amounts are base-unit decimal strings. For an exact-input swap X to Y, amount is positive, specifiedToken is X, and otherToken is Y. For an exact-output swap X to Y, amount is the negative desired output, specifiedToken is Y, and otherToken is X. The response preserves the signed amounts consumed by Ekubo router SDKs.

Path parameters
chainIdstringRequired

Decimal chain identifier used by the Ekubo token list and quoter gateway

Example: 1Pattern: ^[0-9]+$
amountstringRequired

Positive exact-input amount or negative exact-output amount, denominated in specifiedToken

Example: {"summary":"Exact input","value":"100000000000000000"}Pattern: ^-?[0-9]*[1-9][0-9]*$
specifiedTokenstringRequired

EVM or Starknet token address encoded as hexadecimal

Example: 0x0000000000000000000000000000000000000000Pattern: ^0x[0-9a-fA-F]+$
otherTokenstringRequired

EVM or Starknet token address encoded as hexadecimal

Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48Pattern: ^0x[0-9a-fA-F]+$
Responses
200

A block-pinned executable split-route quote

application/json
block_numberintegerRequired
block_hashstringRequiredPattern: ^0x[0-9a-fA-F]+$
estimated_gas_costintegerRequired

Routing execution-resource estimate. Transaction preparation should separately estimate the complete transaction.

price_impactnumber ยท nullableRequired

Estimated fractional price impact. null means a reverse quote could not be produced and should be treated as a risk warning.

total_calculatedstringRequired

Total output for exact input or total input for exact output. Exact-output values are negative.

Pattern: ^-?[0-9]+$
get/{chainId}/{amount}/{specifiedToken}/{otherToken}

Read the indexed chain head

get
Path parameters
chainIdstringRequired

Decimal chain identifier used by the Ekubo token list and quoter gateway

Example: 1Pattern: ^[0-9]+$
Responses
200

Latest block indexed by this quoter instance

application/json
block_numberintegerRequired
block_hashstringRequired
latest_block_timestampintegerRequired
last_event_idstringRequired
base_fee_per_gasstringRequired
get/{chainId}/health

Discover the quoter service

get
Responses
200

Service metadata and canonical integration URLs

application/json
namestringRequired
descriptionstringRequired
versionstringRequired
openapi_urlstring ยท uriRequired
token_list_urlstring ยท uri-templateRequired
router_sdk_urlstring ยท uriRequired
quote_urlstring ยท uri-templateRequired
health_urlstring ยท uri-templateRequired
capabilitiesstring[]Required
get/

Notes:

  • All token amounts are base-unit decimal strings; a negative amount requests an exact-output quote.

  • Resolve token addresses and decimals through the Ekubo API token list before requesting a quote.

  • Quotes are pinned to a block, so route calldata should be encoded and submitted promptly (see Swapping for executing the returned route).

Last updated

Was this helpful?