File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ def show_options(product, equities_selection=None):
1414 product (string)
1515 Gives all data for a specific product which can be
1616 cryptocurrencies, currencies, equities, etfs or funds.
17-
17+ equities_selection (string)
18+ Gives a sub selection fo the possibilities for equities which can be
19+ countries, sectors or industries.
1820 Output
1921 ----
2022 json_data (dictionary)
@@ -35,6 +37,13 @@ def show_options(product, equities_selection=None):
3537 product = 'equities'
3638
3739 try :
40+ if product == 'equities' and equities_selection is None :
41+ json_data = {}
42+ for option in ['countries' , 'sectors' , 'industries' ]:
43+ json_file = URL + product .lower () + '_' + option + '.json'
44+ request = requests .get (json_file )
45+ json_data [option ] = json .loads (request .text )
46+ return json_data
3847 if equities_selection :
3948 json_file = URL + product .lower () + '_' + equities_selection + '.json'
4049 else :
You can’t perform that action at this time.
0 commit comments