alpaca-trade-api
alpaca-trade-api copied to clipboard
Example config returning TypeError
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)`
Make sure you're using the right key_id and key_secret