niXman / binapi

Binance API C++ implementation
Apache License 2.0
252 stars 85 forks source link

Coin based exchange_info requests #46

Closed red-angry-bird closed 2 years ago

red-angry-bird commented 2 years ago

Hey niXman, first of all. Thanks for this really well designed library!

I have just a small feature request. When using the function binapi::rest::api::exchange_info we need to parse a huge json response. This could be much easier if we use the symbol based approach like here https://binance-docs.github.io/apidocs/spot/en/#exchange-information. For example with a list of symbols: curl -g GET 'https://api.binance.com/api/v3/exchangeInfo?symbols=["BTCUSDT","BNBBTC"]'.

What do you think?

niXman commented 2 years ago

hi,

initially this code was written by me for my trading bot, and for the bot architecture /api/v3/exchangeInfo request was executed only once when the bot started. which is why I have no other overloads of that function. but you're right, in some situations those overloads may be necessary.

ok, I'll do it!

niXman commented 2 years ago

done: https://github.com/niXman/binapi/commit/62574674e6a0f2f5735feab257001c9611f8f189

please test and report.

red-angry-bird commented 2 years ago

works as expected 👍 Thank you very much!