TradeEvent logs. Each transaction can contain more than one trade event.
Save the quickstart helper as stream.mts in the same directory. These examples use the same environment variables and dependencies.
Install the decoder and IDL
Decode updates
pump-trades.mts
Interpret trade events
EventParser follows the program invocation stack, so another program’s data logs are not treated as Pump.fun events. Missing or truncated logs can still leave a transaction without a decoded event. Track decode errors and reconcile against transaction history when completeness matters.
Keep raw amounts as strings. Apply the decimals of each mint when displaying values. Use signature plus event index for event-level deduplication; one signature can contain several fills. This example observes trades and does not submit swaps.