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.
wss://{eu,us,ap}.data.titanbuilder.xyz/ws/pamm_quote_stream_v2stateOverride in eth_call state-override formattitan_getPammVenues (JSON-RPC)stateOverridewss://{eu,us,ap}.data.titanbuilder.xyz/ws/pamm_price_levels_v2, titan_getPammBookstitan_getPammQuote, titan_getPammQuoteVenueSome makers' streams need a Titan API key, sent in the Authorization header. Full reference: Titan propAMM docs for takers.
Quote and execute
- 1.Quote with the update applied. Pass the pool's latest
stateOverrideto youreth_callofMetricOmmSwapQuoter(see Via smart contracts) or toeth_simulateV1. The quote then reflects the price that lands with the next update. - 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.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
Relatick