Closed mchalise closed 6 years ago
Is it only for certain API keys? Could you provide more code for context?
yes. For certain API keys. Some are working and some are not using this gem. And if I take that same not working key and use it from other wrappers like python or normal CURL it works. I don't know what's the matter. @craysiii
About code you requested.
client = Binance::Client::REST.new(
api_key: 'some api key',
secret_key: 'some secret key'
)
client.account_info
should give me account detail. Instead its giving me
{"code"=>-2015, "msg"=>"Invalid API-key, IP, or permissions for action."}
Hmm. Very interesting. Not much I could do without taking a closer look at the HTTP requests and responses, and being that it would include sensitive information, I both think that wouldn't be doable.
I would check to ensure that you're typing the API and secret key correctly, that the keys do have the proper permissions set, and that somehow your IP isn't being changed by a proxy/vpn or something.
By the way, which version of the gem are you using?
Binance::Client::REST.new(token, secret)
I don't know why but it's not working for some Binance API keys. But if the same key is used using CURL it works. Is there any fault in GEM? Output:
{"code"=>-2015, "msg"=>"Invalid API-key, IP, or permissions for action."}