-
Notifications
You must be signed in to change notification settings - Fork 30
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
Authentication failure within ruby gem #117
Comments
In the python-btcmarkets section ref https://github.com/adversary-org/python-btcmarkets It feel like, Ben McGinnes has written " I feel that this may also explain my issues in getting the ruby modules to work Is this comment still appropriate and relevant for the BTC markets API Is this order documented ? If its adequately documented can you please supply a link or reference to that documentation If it is not documented this order be documented? The error message is not uninformative. I appreciate that it is best practices to supply minimal information on authentication and this is to frustrate brute force attacks. However this also makes initial development more difficult and means the documentation and examples become more important Matthew |
Hi @matthewbretherton , In the current iteration of the API, the order of variables in the POST request body must match exactly the order documented in the sample requests provided on the various wiki pages. I understand that some languages will not necessarily construct POST request data in an order that the user specifies. To get around this, I'd suggest creating the object first with the variables in the correct order, and then turning it into a string. Use that string in both your signature and the body of the POST request. If your chosen language does not allow for this approach either, then you will have to manually construct a string with your desired arguments that matches the format of the example requests. Please let me know if you've tried this approach. Regards, |
Thanks for the clarity of response Justin I have included that in my post 121 and asked for the wiki page on authentication to be updated Unfortunately I still cannot get the account/balance get request to work I get Authentication failed and I cannot work it out I have pulled the https://github.com/nolim1t/btcmarkets-gem/blob/master/lib/nl-btcmarkets.rb gem apart and looked in detail at every step on the way . . . I am confident it is passing headers correctly as if I bastardise the nonce/timestamp I get told that the timestamp is invalid I feel comfortable as the signature ends in an == ( with the newline removed ) Non authentication requests work I am at a loss as to how to debug further Any assistance appreciated |
I have downloaded the ruby code btcmarkets-gem. I can access the market information through that code but get an authentication failed (error code 1 ) on private function. I am using the secret and api key as copied from the >account>api key tab on the btc web site
session log as follows
puts b.get_account_balance
=> "{"success":false,"errorCode":1,"errorMessage":"Authentication failed."}"
ENV['btcm_access_key']
=> "567c...c3811"
ENV['btcm_access_secret']
=> "CDa6....QnQ=="
exactly as copied from web page
Rgds
[email protected]
The text was updated successfully, but these errors were encountered: