What does tradeAmount, buyAmount, and sellAmount actually mean?

I want to get the total token inflow and outflow volume and was wondering how I should do that. I moved to buyAmount and sellAmount and used those as the inflow and outflow but I was wondering if that was correct or I should be doing something else.