app/models/tda/stock.rb in iron_warbler-2.0.7.28 vs app/models/tda/stock.rb in iron_warbler-2.0.7.29
- old
+ new
@@ -11,17 +11,19 @@
end
## tickers = "GME"
## tickers = "NVDA,GME"
def self.get_quotes tickers
+ profile = Wco::Profile.find_by email: 'piousbox@gmail.com'
+
path = "/quotes"
headers = {
accept: 'application/json',
- Authorization: "Bearer #{::SCHWAB_DATA[:access_token]}",
+ Authorization: "Bearer #{profile.schwab_access_token}",
}
inns = self.get path, { headers: headers, query: { symbols: tickers } }
inns = inns.parsed_response
- # puts! inns, 'parsed response'
+ puts! inns, 'parsed response'
if [ NilClass, String ].include?( inns.class )
return []
end
inns.each do |k, v|
\ No newline at end of file