JKorf / Binance.Net

A C# .netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Binance.Net/
MIT License
1.04k stars 429 forks source link

Q: A way to get coin codes and names #1125

Closed Kiryuumaru closed 2 years ago

Kiryuumaru commented 2 years ago

Hi,

Thank you for developing this great library 💖. I would like to know if this API endpoint is supported https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data I will use this to get every coin code and name (BTC, Bitcoin) without using the API key and API secret. Or is there any other way to get every Binance coin code and name without credentials? I am creating a simple list of all available coins in binance with their name

JKorf commented 2 years ago

Hi, that endpoint is supported, but it's not a public one. Which means that requesting that endpoint will always need an API key/secret. I don't see a way of retrieving the coin name available in the API other than the call you linked.

You could use binanceClient.SpotApi.ExchangeData.GetProductsAsync() which will contain the data you're looking for. However; this is not an 'official' endpoint, which means it could be changed or removed without any prior notice.

Kiryuumaru commented 2 years ago

Hi,

Thank you for the fast reply 💪. I see, that endpoint still needs credentials. I thought it is a public one. thank you for the clarification.

Kiryuumaru commented 2 years ago

Hi,

For those who have the same problem as me, you can get all the names of the coin using the CoinGecko open API endpoint https://api.coingecko.com/api/v3/coins/list And for the Binance icons, you can use the CDN maintained by @VadimMalykhin here https://github.com/VadimMalykhin/binance-icons