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['putCallRatio'] = item2['putCallRatio']
|
||||||
item['total_open_interest'] = item2['total_open_interest']
|
item['total_open_interest'] = item2['total_open_interest']
|
||||||
item['changesPercentageOI'] = item2.get('changesPercentageOI',None)
|
item['changesPercentageOI'] = item2.get('changesPercentageOI',None)
|
||||||
except:
|
except Exception as e:
|
||||||
pass
|
print(e)
|
||||||
|
|
||||||
if 'changesPercentage' in item:
|
if 'changesPercentage' in item:
|
||||||
res_list.append(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())
|
historical_data = orjson.loads(file.read())
|
||||||
|
|
||||||
res_list = add_data(data,historical_data)
|
res_list = add_data(data,historical_data)
|
||||||
|
|
||||||
save_json(res_list, symbol, directory_path)
|
save_json(res_list, symbol, directory_path)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ headers = {
|
|||||||
"Authorization": api_key
|
"Authorization": api_key
|
||||||
}
|
}
|
||||||
|
|
||||||
#total_symbols = ['NVDA']
|
total_symbols = ['NVDA']
|
||||||
|
|
||||||
counter = 0
|
counter = 0
|
||||||
for symbol in tqdm(total_symbols):
|
for symbol in tqdm(total_symbols):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user