nolim1t / btcmarkets-gem

BTCMarkets Ruby Gem for querying Market API data (Trading coming soon)
https://rubygems.org/gems/nl-btcmarkets
1 stars 5 forks source link

Failure authenticating with the Ruby Gem #4

Open matthewbretherton opened 6 years ago

matthewbretherton commented 6 years ago

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 matthew@bretherton.id.au

matthewbretherton commented 6 years ago

This is a duplicate of the entry on the master etc GitHub page

I feel that BTC support do not support the Ruby Gem so posted here

Suspect I doing something unusually dumb and not seeing it :)

Documentation update looks good : )

Thx M

nolim1t commented 6 years ago

I can't reproduce the authentication failure issue with account balances.

However certain things (such as creating trades using POST) actually doesn't work when I did it last time - I'm passing the exact same headers so I suspect theres some issues with their API.

matthewbretherton commented 6 years ago

Thanks for response Justin - would it be OK to take this discussion to email and I will post a summary

I am kind of wondering how best to go about debugging this issue etc

Or maybe read some of the code that is known to work - like the python example ( just uncomfortable working with python as ruby much more fun )

matthew@bretherton.id.au

M

nolim1t commented 6 years ago

I think its better to post the summary here so its all in one thread.

nolim1t commented 6 years ago

Though this issue itself about getting the account issue I can't reproduce.

matthewbretherton commented 6 years ago

A comment I found in the python section and I think this is relevant

In the python-btcmarkets section ref https://github.com/adversary-org/python-btcmarkets

It feel like, Ben McGinnes has written

" Anonymous connections (i.e. the tickers) work without any real issues. API calls requiring authentication presently do not work as the current API expects POST requests to list variables in an explicit order, whereas Python does not assign an explicit order when constructing a POST URL from dict/JSON data. This adversely affects the output of the digital signature on the authentication request and subsequently causes the authentication step to fail. “

I'll post to the main forum but also look to trying all the possible orders within your gem

Matthew

matthewbretherton commented 6 years ago

I just realised

I cannot get the 'GET' account_balance to authenticate . . .

Nothing to do with post parameters order or issues

I copied the api key and secret faithfully from the BTC Markets Accounts->APIkey tab

Just checking can you get the account balance get request to work ???

Matthew