Coinmarketcap shows trading volume for the last 24 hour. Where can I find trading volume for the last x hour/minute? Or How can I calculate it myself programmatically?
The cheapest way to do this yourself would be to read the API docs of each exchange and write your own code for downloading minutely price data and that will also include volume data. You can then resample later according your needs.