trade records one row per Buy or Sell event on a bonding curve and, on chains that index the PoolManager, one row per Swap in a graduated launch’s pool. It is the source of the trade list on the token page and of launch.volumeQuote and tradeCount.
Fields
Indexes:
(launch, timestamp), trader, timestamp. Filter on launch or trader and order by timestamp for the cheap paths.
The curve emits
Buy and Sell with the post-trade tokensSold and realQuote; the indexer uses those to update the launch row and the candles with the spot price after the trade, while priceQuote here is the average price the trade actually got.Examples
Latest trades of a launch, cursor paginated:quoteAmount is a bigint, so the threshold is a string in quote units; this is 1,000 units of the launch currency):
curl:
Units that matter here
quoteAmount,feeand the_gtethresholds are quote units: the launch’s quote asset scaled to 18 decimals. Divide by1e18for a human amount of the currency, whateverquoteDecimalsis.priceQuote / 1e18is the price per whole token in the launch currency;priceUsd / 1e18is the same in USD at the rate current when the trade was indexed.- Sum
quoteAmountover a window for volume; the buy rows include the fee and the sell rows exclude it, matching whatlaunch.volumeQuoteaccumulates. - On Robinhood Chain there are no
swaprows, because the shared officialPoolManageris not indexed there. The testnets do record swaps. See how the data is produced.