I want to find the trading volume to do some trend analysis.But I can't find
2Trading or transaction volume? For the transaction volume just query for the TXID list for each block of interest from a Bitcoin server.– James C.Jan 25, 2019 at 11:36
I am assuming you are asking for trading volume across exchanges.
Brave New Coin (BLX) provides a good API to get volume weighed average across major exchanges: https://bravenewcoin.com/data-and-charts/indices/blx
You can also see their chart with volume on Trading View (look for BLX ticker): https://www.tradingview.com/chart/?symbol=BNC:BLX