Relatick
Integrate

Via Titan propAMM streams

Quote keeper-priced Relatick pools on Ethereum from the latest streamed update

On Ethereum, many Relatick pools are priced by market-maker updates that are pushed just in time. A participating builder includes an update only in a block that contains a trade against the pool, and places it before that trade (see Freshness and ordering). Between trades, the onchain price can be old, so a quote from onchain state at the latest block can revert with FeedStalled or use an outdated price.

Quote these pools from the latest streamed update instead, from either:

  • the Relatick API, which serves the latest streamed quotes (see Via API), or
  • Titan's propAMM streams, described below.

Titan streams

Titan publishes market-maker updates, Relatick's included, for takers. All endpoints are on Titan's regional data hosts: eu, us and ap.

Endpoint
What it returns
wss://{eu,us,ap}.data.titanbuilder.xyz/ws/pamm_quote_stream_v2
Each maker update as it arrives, with a stateOverride in eth_call state-override format
titan_getPammVenues (JSON-RPC)
A snapshot of every venue you can access, each with its stateOverride
wss://{eu,us,ap}.data.titanbuilder.xyz/ws/pamm_price_levels_v2, titan_getPammBooks
Bid and ask levels per maker and market
titan_getPammQuote, titan_getPammQuoteVenue
The best quote across makers, or a quote from one maker

Some makers' streams need a Titan API key, sent in the Authorization header. Full reference: Titan propAMM docs for takers.

Quote and execute

  1. 1.Quote with the update applied. Pass the pool's latest stateOverride to your eth_call of MetricOmmSwapQuoter (see Via smart contracts) or to eth_simulateV1. The quote then reflects the price that lands with the next update.
  2. 2.Send through participating builders. In blocks they build, the update is placed before your trade. A trade in another builder's block meets whatever price is onchain, and reverts if that price is too old. Keep a fallback route for that case.
  3. 3.Use multi-candidate bundles if you can. Titan evaluates each candidate at build time and re-evaluates it on every new update until inclusion.

A successful quote does not guarantee execution. Before sending, simulate the actual transaction with your real from address.

Last updated 29 days ago