I am trying to get trading volume data for a couple of cryptocurrencies accross exchanges. So I am collecting for example data on BTC-USDT on Binance, FTX, Coinbase and Kraken. To aggregate that data it must be measured all in the same denomination currency.
Unfortunately, Coinbase seems to give me the data only in the base currency BTC and not converted to USDT. I am using the endpoint: “Get product candles”
Is there any possibility or strategy to get 24h trading volume data denominated in USDT? Generally I would like to get volume data in base and denomination currency terms.
Hello @MoritzH! Welcome to the forum! For the details regarding getting the trading volume data in quote currency(USDT), we will check on this for you with our team. We will get back to you once we have more information.
As for your concern on how to get the 24hr trading volume data, you will need to set the value of the granularity (Query Parameter) to 86400. You may also check our api documentation for more information.
thanks Riza. So if I want the volume in USDT or USD I need to convert the data myself? Are there volume weighted prices available to convert BTC volumes into USDT or USD?
Hello @MoritzH. Unfortunately, the values returned in the /stats and /ticker endpoints are in terms of cryptocurrencies only. If you would like the volume to be in USDT, then the base currency should be in USDT as well. For example, in https://api.exchange.coinbase.com/products/USDT-USD/stats or https://api.exchange.coinbase.com/products/USDT-USD/ticker, it will return USDT values whereas the USD is just used for the price. Hence, in the {product_id}, the base currencies are the values being returned while the quote currencies are just used for the price.
To be able to convert crypto to fiat, we recommend you to use the Conversions endpoint. However, as of now, this endpoint only supports the USDC <-> USD pair.
To be able to convert crypto to crypto, we recommend you to use the Orders endpoint.