Get price in USD, 24h volume, market cap for all cryptocurrencies via websocket

There is a task to get three parameters for all cryptocurrencies (BTC, ETH, USDT, BNB and others):

  • price in USD;
  • 24h volume;
  • market cap

I get general information via websocket (javascript):

var socket = new WebSocket(‘wss://stream.binance.com:9443/ws/!ticker@arr’)

but there comes information only regarding cryptocurrency pairs, BTC / USDT, etc.

I think that the value of BTC in dollars is not the value of BTC/USDT.

I am not an expert in the field of cryptocurrencies, but I need to receive information via websocket as in this table:

I will be glad to help the community)

  1. current price can be found from ticker stream
  2. 24h volume from the stream is the volume in Binance.com
  3. market cap is not available.

Thank you for your reply!

  1. Do you mean that the price in USD of a BTC can be found from a pair BTC/USDT from ticker stream? Are price BTC/USD and price BTC/USDT the same thing?

  2. 24h volume BTC/USDT from ticker is 385892.41605000

    s: “BTCUSDT”
    v: “385892.41605000”

    but on Markets page 24h BTC volume is 29,920.79M
    How can I get 24h volume like on Market page (Cryptocurrency Market | Coin Prices & Market Cap | Binance)?