ccjr / alpaca-trade-api

MIT License
32 stars 28 forks source link

NoMethodError when calling .bars #19

Closed fluffyx closed 3 years ago

fluffyx commented 3 years ago

Running v0.8.0 of the gem, I get this error:

NoMethodError (undefined method `BigDecimal' for #<Alpaca::Trade::Api::Bar:0x00007fae6b0bb078>)

when calling

require 'alpaca/trade/api'

Alpaca::Trade::Api.configure do |config|
  config.endpoint = 'https://paper-api.alpaca.markets'
  config.key_id = 'id goes here'
  config.key_secret = 'secret goes here'
end

client =  Alpaca::Trade::Api::Client.new
client.bars '1Min', ['AAPL']
ccjr commented 3 years ago

What is your Ruby version?

fluffyx commented 3 years ago

Never mind, my ruby version was too low. It works in 2.6.5 =)