Closed thammo4 closed 4 months ago
quotes.get_quote_day('GE') symbol description exch type last change volume open high low ... prevclose week_52_high week_52_low bidsize bidexch bid_date asksize askexch ask_date root_symbols 0 GE GE Aerospace N stock 161.92 -3.5 4315417 165.19 165.68 161.79 ... 165.42 170.8 84.16343 3 P 1720728546000 1 P 1720728546000 GE,GE1,GE2
[1 rows x 27 columns]
quotes.get_quote_day('WHOOPS') No quote data for: WHOOPS. Empty DataFrame Columns: [] Index: [] quotes.get_quote_day(1234567) 'Symbol needs to be a string (duh?)' quotes.get_quote_day([]) 'Symbol needs to be a string (duh?)' quotes.get_quote_day('') 'API Request Failed: 400 Client Error: for url: https://sandbox.tradier.com/v1/markets/quotes?symbols=&greeks=false.'
Quotes.get_quote_day works fine so long as a valid symbol is passed. When a non-existent symbol is provided, it throws an error because we need to check for the existence of the json in r.json()
[1 rows x 27 columns]