Open jsimoes opened 10 years ago
From the code: def initialize(api_key=nil, api_secret=nil, options={}) @api_key = api_key || YAML.load_file("key.yml")["key"] @api_secret = api_secret || YAML.load_file("key.yml")["secret"] @api_version = options[:version] ||= '1' @base_uri = options[:base_uri] ||= 'api.hitbtc.com' end
if you get an error: No such file or directory @ rb_sysopen key.yml
it means the code is looking for key.yml because either ENV['HITBTC_KEY'] is nil or secret is nil ?
Did you check that those parameters are not nil ?
Didi you resolve your issue ?
I'm going to close this ticket
When I try to initialise the client I get the following error:
/Users/jsimoes/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:463:in
initialize': No such file or directory @ rb_sysopen - key.yml (Errno::ENOENT) from /Users/jsimoes/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:463:in
open' from /Users/jsimoes/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:463:inload_file' from /Users/jsimoes/.rvm/gems/ruby-2.1.0/gems/hitbtc-0.1.3/lib/hitbtc/client.rb:12:in
initialize' from /Users/jsimoes/Code/bit-arbitrage/lib/rbtc_arbitrage/clients/hitbtc_client.rb:60:innew' from /Users/jsimoes/Code/bit-arbitrage/lib/rbtc_arbitrage/clients/hitbtc_client.rb:60:in
interface'The code I am using is the following:
@interface ||= Hitbtc::Client.new(ENV['HITBTC_KEY'], secret)
Any hints?