Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Use in USA #37

Open
SamHobbsOrg opened this issue Nov 4, 2024 · 6 comments
Open

Use in USA #37

SamHobbsOrg opened this issue Nov 4, 2024 · 6 comments
Labels
feature New feature or request question Further information is requested

Comments

@SamHobbsOrg
Copy link

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,

@SamHobbsOrg SamHobbsOrg added the feature New feature or request label Nov 4, 2024
@sleeyax
Copy link
Owner

sleeyax commented Nov 4, 2024

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
Copy link
Owner

sleeyax commented Nov 4, 2024

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
Copy link
Author

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
Copy link
Owner

sleeyax commented Nov 5, 2024

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 sleeyax added the question Further information is requested label Nov 5, 2024
@sleeyax
Copy link
Owner

sleeyax commented Nov 5, 2024

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants