Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow calling binance API through a proxy #15

Open
tiendo1011 opened this issue Feb 22, 2023 · 4 comments · May be fixed by #16
Open

Allow calling binance API through a proxy #15

tiendo1011 opened this issue Feb 22, 2023 · 4 comments · May be fixed by #16
Labels
enhancement New feature or request

Comments

@tiendo1011
Copy link

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)

@aisling-2 aisling-2 added the enhancement New feature or request label Mar 10, 2023
@tiendo1011
Copy link
Author

@2pd what do you think about this?

@blackjid
Copy link

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

@tiendo1011
Copy link
Author

@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.

@blackjid
Copy link

Agree 👍

@blackjid blackjid linked a pull request May 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants