I have a Python Dataframe with cryptocurrency data that has three columns: time, 24hr volume and price.
The time is the time at which the data was received from the exchange, price is the last price of the currency at that time and volume is the total traded volume from that point in time back until 24hrs ago.
I would like to be able to find what the volume is for sampled period such as: total volume of a minute
Here is what I think needs to be done:
Lets say I want to sample my data to 1 minute volume bars.
Take the volume at the close of the bar and subtract it by the volume from 24hrs ago. Then take the volume at the open and subtract it by the volume from 24 hours ago. then I find the difference of the two numbers I have just obtained and that would be my volume traded over the minute?
Is this the proper way to do it? unfortunately a lot of cryptocurrency exchanges only give you what the 24hr cumulative volume was, but volume is more useful over sample periods such as 1,5 or 10 minutes.
Is there a standard way of doing this?