ceicke / tradebot

A trading bot for Coinbase
4 stars 1 forks source link

Coinbase wallet TypeError in 'hexdigest' #1

Open Zahnstochermann opened 6 years ago

Zahnstochermann commented 6 years ago

Hi, I'm getting this Error with the coinbase gem. My API Keys are valid and activated.

Traceback (most recent call last): 5: from ./bot.rb:27:in <main>' 4: from /Users/Jan/.rvm/gems/ruby-2.5.1/gems/coinbase-4.2.0/lib/coinbase/wallet/api_client.rb:142:inprimary_account' 3: from /Users/Jan/.rvm/gems/ruby-2.5.1/gems/coinbase-4.2.0/lib/coinbase/wallet/api_client.rb:651:in get' 2: from /Users/Jan/.rvm/gems/ruby-2.5.1/gems/coinbase-4.2.0/lib/coinbase/wallet/adapters/net_http.rb:27:inhttp_verb' 1: from /Users/Jan/.rvm/gems/ruby-2.5.1/gems/coinbase-4.2.0/lib/coinbase/wallet/client.rb:19:in auth_headers' /Users/Jan/.rvm/gems/ruby-2.5.1/gems/coinbase-4.2.0/lib/coinbase/wallet/client.rb:19:inhexdigest': no implicit conversion of nil into String (TypeError)

ceicke commented 6 years ago

Looks to me like your ENV variables might not be setup correctly? Please try to put a binding.pry directly after line 26 in bot.rb and try to print out the ENV['COINBASE_API_KEY'] and the ENV['COINBASE_API_SECRET'] and checking that they are set correctly.

Zahnstochermann commented 6 years ago

Yes! Turns out they are nil indeed. But how do i set them correctly?