sleeyax / voltra

Cross-market volatile cryptocurrency trading bot
GNU General Public License v3.0
38 stars 5 forks source link

Use in USA #37

Open SamHobbsOrg opened 1 week ago

SamHobbsOrg commented 1 week ago

I mainly just want clarification. Is binance.us (for people in the USA) a different market? Is a different Market interface required to support binance.us?

I am a programmer but I do not understand the Go language. I assume that if a new Market interface is required for binance.us and if I cannot figure out how to create it then I can request that it be created. I have searched the code and I do not find binance.com being specified anywhere,

sleeyax commented 1 week ago

The project currently targeting binance EU only. I'm not sure if just changing the domain works. It could work if the API is the exact same.

I'm not a US citizen myself so I won't be able to work on the feature request because I can't test it. Go is a very simple language, I suggest you look into the basics + https://golangdocs.com/interfaces-in-golang and then try to implement a custom interface yourself. I'll happily accept a PR with your contribution!

sleeyax commented 1 week ago

We use the following binance API wrapper library: https://github.com/adshao/go-binance

They don't really mention a different config or something being required for the US either. Have you tried to run this project yet? Perhaps the target market is simply determined based on your secret key and has nothing to do with the domain name.

In conclusion, this might be a non-issue. Try it out and let me know.

SamHobbsOrg commented 1 week ago

Thank you for clarifying that it is not currently intended to support binance.us,

I have been programming for half a century. I can probably figure out Go enough. I am confused however since I am unable to see how it knows to use binance.com. If the source code that does that is somewhere else then that explains why I did not find it.

Yes I did try it before posting here. I got a message that was unclear to me. I used Binance chat support. They said the error was the result of using binance.com instead of binance.us. I assume that means it accepted my access and secret key and that my location is the issue. The error message (from Binance I assume) did say location but was unclear.

Therefore it is an issue.

sleeyax commented 1 week ago

The API domain is set here:

https://github.com/adshao/go-binance/blob/a836b57116022e8221034e240bc60e9f4278fff5/v2/client.go#L125-L128

And according to the binance docs you do indeed need to change the domain to binance.us:

image

I suggest you forward your issue to the maintainers of the go-binance lib so they can implement it: https://github.com/adshao/go-binance/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen.

sleeyax commented 1 week ago

As soon as support for US market gets added to the go-binance library we can add it to voltra. Feel free to try and contribute the feature to the library yourself (assuming they will accept it, best create an issue first).

SamHobbsOrg commented 5 days ago

I created binance.us · Issue #629 · adshao/go-binance.