alpaca-trade-api icon indicating copy to clipboard operation
alpaca-trade-api copied to clipboard

Example config returning TypeError

Open mrbme opened this issue 2 years ago • 1 comments

When using this from the example

require 'alpaca/trade/api'

Alpaca::Trade::Api.configure do |config|
  config.endpoint = 'https://paper-api.alpaca.markets'
  config.key_id = 'xxxxxxxx'
  config.key_secret = 'xxxxx'
end

client =  Alpaca::Trade::Api::Client.new
puts client.orders.last.inspect

It returns

/Users/name/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/alpaca-trade-api-0.8.0/lib/alpaca/trade/api/asset.rb:11:in initialize': no implicit conversion of String into Integer (TypeError)`

mrbme avatar Jan 22 '23 01:01 mrbme

Make sure you're using the right key_id and key_secret

CommanderOutpost avatar Mar 22 '24 10:03 CommanderOutpost