Is there a way to get the market cap or market cap rank of a coin using the Binance API?

Viewed 6932

I checked all the functions I can think of but I don't see anything for this in the Binance C# API: https://github.com/JKorf/Binance.Net

All I want is to list the coins I am showing in a list view in the order of their market cap rank, if possible.

2 Answers

There is no "legal" way to get this data. This is how I do that:

https://www.binance.com/exchange-api/v2/public/asset-service/product/get-products

GET this endpoint. It used for Binance SPA and does not mention in their documentation. data is an array that contains all trading Binance pairs. For example:

"s":"BTCUSDT",
"st":"TRADING",
"b":"BTC",
"q":"USDT",
"ba":"฿",
"a":"",
"I":"0.00000100",
"ts":"0.01",
"an":"Bitcoin",
"qn":"TetherUS",
"o":"46915.84",
"h":"47499.43",
"l":"44961.09",
"c":"46791.85",
"v":"91500.82",
"qv":"4248420233.17226301",
"y":0,
"as":91500.81462400,
"pm":"FIAT",
"pn":"FIAT",
"cs":18620881,
"tags":["pow","mining-zone"],
"pom":false,
"pomt":null,
"etf":false

You need to take the field cs and multiply it to the current asset price. In this case, it will be field c

18620881 * 46791.85 = 871,305M

So it's current BTC market cap

Related