Based on your explanation it seems like you don't need:
RANGE BETWEEN INTERVAL '60' SECOND PRECEDING AND CURRENT ROW
Or am I missing a requirement here?
If you eliminate this in your query, it will compute the running total per row it sees, despite the duplicates.
SELECT timestamp, SUM(volume) OVER (
PARTITION BY ID
ORDER BY timestamp
) AS total_volume
FROM YourTable;
The results:
timestamp total_volume
2024-11-16 08:00:00.00 10
2024-11-16 08:00:00.00 20
2024-11-16 08:01:00.00 30
2024-11-16 08:02:00.00 40
2024-11-16 08:02:00.00 50