protocol icon indicating copy to clipboard operation
protocol copied to clipboard

feat(polymarket-notifier): configurable time-based look-back for OrderFilled events

Open md0x opened this issue 7 months ago • 3 comments

Changes proposed in this PR:

  • Adds fillEventsLookbackSeconds to MonitoringParams and uses it to derive fromBlock for OrderFilled queries, limiting how old orders are checked relative to notification time.

md0x avatar Apr 30 '25 16:04 md0x

whats the point of this, so we dont alert for things that are older than some time?

daywiss avatar May 01 '25 12:05 daywiss

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.

md0x avatar May 01 '25 13:05 md0x