- Topic:
trade/{market_addr} - Stream: Public (
wss://api.ekiden.fi/ws/public)
Subscribe
Events
Messages arrive withop: "event", topic: "trade/{addr}", and data containing trades.
Example:
priceandsizeare scaled integers (int64). They match private streams and on-chain representation.seqis the max sequence among fills aggregated into the trade;timestampis the latest fill timestamp (seconds).- There is no top-level
tsin the trade event payload.
AggregatedTrades, Trade.
Trade ID
Fieldid is a 64‑bit unsigned integer, stable for a given aggregated trade and unique within a market. It is derived from a hash of (market_addr, price, side, seq, timestamp) after aggregation:
- Multiple fills at the same
price&sideinside the same execution window collapse into one aggregated trade sharing a singleid. - Identical (price, side, seq, timestamp) on different markets produce different IDs (market included in hash).
- If the same batch is replayed (e.g. recovery) the
idremains stable, aiding client deduplication.
id + market_addr as a primary key. Do not assume ordering by id; rely on provided seq and ts.