External trigger after each continuous aggregate finished?

I watched the new “Timecale for Finance” webinar episodes on youtube. :+1:
In connection with the hierarchical continuous aggregates, I had the following question: Let’s assume I continuously write trades into the TimescaleDB and let the continuous aggregates run automatically. So far everything is clear.

Now I would like to trigger a trading algorithm with the latest data, lets say, every 15 minutes, 1 hour, 1 day, etc., just as an example. Is there any way in TimescaleDB to trigger an external application, webhook, message queue, notification etc. after each continuous aggregate successfully finished?

1 Like

Hi @Franky1, glad that you watched it!

You can build it in several ways. As the time is global, you can also think about triggering your systems independently knowing your data will be already processed.

If you want to start with something inside postgresql, I’d say that broadcasting the message through NOTIFY/LISTEN would be a great start to stream the candlesticks.

Another idea that maybe useful: sql-snippets/notify.sql at master · jonatas/sql-snippets · GitHub

1 Like