Allow calling binance API through a proxy
I see you guys use Faraday to make a request, which supports calling through a proxy. Can you expose that functionality to the user?
I think allowing it through the Binance::Spot.new interface is one of the ways to go, users can set it just like they set the key & secret. It'll look like this: Binance::Spot.new(key: key, secret: secret, proxy_url: proxy_url)
@2pd what do you think about this?
I haven't tried this, but you should be able to add the http_proxy and/or https_proxy env variable.
The library used under the covers is faraday, and it should honor that env variable standard. https://github.com/binance/binance-connector-ruby/blob/master/lib/binance/session.rb#L87-L94
https://lostisland.github.io/faraday/usage/customize#Proxy:~:text=sort_params%20%3D%20false-,Proxy,-Faraday%20will%20try
@blackjid yeah, I know that. That can be used as a workaround, but supporting proxy officially through the param will provide a much better experience to the lib user.
Agree 👍