Update database_caller.py
This commit is contained in:
parent
f569f9ed1e
commit
62e30970de
@ -148,9 +148,14 @@ def updateStocksPrePost(api_key, logf):
|
||||
'prechange': '%.2f' % stock['preMarketChange'],
|
||||
'prepercent': '%.2f' % stock['preMarketChangePercent']}
|
||||
except:
|
||||
stock_info[stock['symbol']]['Pre-market'] = {'preprice': '%.2f' % stock['regularMarketPrice'],
|
||||
'prechange': '%.2f' % 0,
|
||||
'prepercent': '%.2f' % 0}
|
||||
try:
|
||||
stock_info[stock['symbol']]['Pre-market'] = {'preprice': '%.2f' % stock['postMarketPrice'],
|
||||
'prechange': '%.2f' % 0,
|
||||
'prepercent': '%.2f' % 0}
|
||||
except:
|
||||
stock_info[stock['symbol']]['Pre-market'] = {'preprice': '%.2f' % stock['regularMarketPrice'],
|
||||
'prechange': '%.2f' % 0,
|
||||
'prepercent': '%.2f' % 0}
|
||||
try:
|
||||
stock_info[stock['symbol']]['Post-market'] = {'postprice': '%.2f' % stock['postMarketPrice'],
|
||||
'postchange': '%.2f' % stock['postMarketChange'],
|
||||
|
Loading…
Reference in New Issue
Block a user