bugfixing
This commit is contained in:
parent
79cb70f97c
commit
c1139bcad0
@ -71,8 +71,8 @@ def add_data(data, historical_data):
|
||||
item['putCallRatio'] = item2['putCallRatio']
|
||||
item['total_open_interest'] = item2['total_open_interest']
|
||||
item['changesPercentageOI'] = item2.get('changesPercentageOI',None)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
if 'changesPercentage' in item:
|
||||
res_list.append(item)
|
||||
@ -100,7 +100,6 @@ def prepare_data(data, symbol, directory_path, sort_by = "date"):
|
||||
historical_data = orjson.loads(file.read())
|
||||
|
||||
res_list = add_data(data,historical_data)
|
||||
|
||||
save_json(res_list, symbol, directory_path)
|
||||
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ headers = {
|
||||
"Authorization": api_key
|
||||
}
|
||||
|
||||
#total_symbols = ['NVDA']
|
||||
total_symbols = ['NVDA']
|
||||
|
||||
counter = 0
|
||||
for symbol in tqdm(total_symbols):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user