feat(polymarket-notifier): configurable time-based look-back for OrderFilled events
Changes proposed in this PR:
- Adds
fillEventsLookbackSecondstoMonitoringParamsand uses it to derivefromBlockforOrderFilledqueries, limiting how old orders are checked relative to notification time.
whats the point of this, so we dont alert for things that are older than some time?
whats the point of this, so we dont alert for things that are older than some time?
Yes, exactly. Previously, we only had checkBeforeExpirationSeconds, which is set to 30 minutes by default and determines how far in advance of the challenge window’s end we check a proposal. It looked at the orderbook 30 minutes before the end, along with any orders placed during the challenge window.
Now, fillEventsLookbackSeconds introduces a similar filter, but for filled orders. It allows us to limit the lookback period for fills (e.g., to only consider fills from the last 30 minutes) so we avoid triggering alerts for older fills.