Moving 24h window sum of changes

I am using telegraf to collect some balance data every 10s and influxdb as the data source. I would like to plot a graph that shows a sum of the total changes in a sliding window of 24h. so if over a 24h period, I recieved 12 payments of $10 the graph point would be $120 as soon as the oldest payment slides out of the window, it drops to $110.

I have tried using derivative, but it just shows a spike for each payment. How do I sum them within a window?

sum with group by 24h?