Recent swaps / pool events (log polling)
blazar_recent_eventsRead recent onchain events by log polling: BlazarFeeRouter AggregatedSwap (trader, tokens, amounts, USD) or one BlazarSwap pair's Swap + Sync (reserves and price). Returns nextFromBlock to poll again. Up to 5,000 blocks per call (about 2 hours).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "blazar_recent_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | No | BlazarSwap pair address (source=pair). From blazar_pools. | |
| blocks | No | Blocks to scan, max 5000. Default 900 (~30 min). | |
| source | Yes | feeRouter: AggregatedSwap events. pair: Swap + Sync on one BlazarSwap pair. | |
| fromBlock | No | Start block (use nextFromBlock from the last call). Default: head - blocks + 1. |