Pass a pre-defined "plain text list name" or a GUID, returns a list of symbols.
Interface:
service.symbol_list.get_symbols()
Sample Calling Method
service.symbol_list.get_symbols('Banks-Midwest')
Name | Type | Default | Information |
---|---|---|---|
Guid or pre-defined "plain text list name" | string | required | See Lists |
service.symbol_list.get_symbols(string)
ie
service.symbol_list.get_symbols('S&P 500')
service.symbol_list.get_symbols('5af64352-6bc4-47cf-a73d-09925dab62bb') # GUID for "S&P 100"
See bottom of documentation front page for a list of available symbol lists and their names or the lists documentation pages
ReturnsA list which you can iterate through or use symbol in list
Working Example: from cloudquant.interfaces import Strategy
class get_symbols_service_demo_code(Strategy):
@classmethod
def on_strategy_start(cls, md, service, account): #
print(service.symbol_list.get_symbols('S&P 500'))
print(service.symbol_list.get_symbols('5af64352-6bc4-47cf-a73d-09925dab62bb')) # GUID for "S&P 100"
print(service.symbol_list.get_symbols('Banks-Midwest'))
print "AGN" in service.symbol_list.get_symbols('S&P 500')
sp100list = service.symbol_list.get_symbols('S&P 100')
for mysymb in sp100list:
print mysymb
Console
set(['AGN', 'EOG', 'CPB', ... 'PFG', 'SPGI', 'DXC'])
set(['AGN', 'AXP', 'NFLX', ... 'MCD', 'CSCO', 'BKNG'])
set(['MFNC', 'HWBK', 'CIVB', ... 'EQBK', 'UMBF', 'FMNB'])
True
AGN
AXP
NFLX
...
MCD
CSCO
BKNG
"Dow 30"
"500K - 1M"
"AMEX Listed"
"ARCA Listed"
"Beta Negative"
"Beta Neutral"
"Beta Positive"
"CANSLIM"
"Closed Ended Fund"
"Closed Near High"
"Closed Near Low"
"Earnings 2 Days Ago After"
"Earnings 2 Days Ago Before"
"Earnings 2 Days Ago During"
"Earnings 2 Days From Now After"
"Earnings 2 Days From Now Before"
"Earnings 2 Days From Now During"
"Earnings 3 Days Ago After"
"Earnings 3 Days Ago Before"
"Earnings 3 Days Ago During"
"Earnings 3 Days From Now After"
"Earnings 3 Days From Now Before"
"Earnings 3 Days From Now During"
"Earnings 4 Days Ago After"
"Earnings 4 Days Ago Before"
"Earnings 4 Days Ago During"
"Earnings 4 Days From Now After"
"Earnings 4 Days From Now Before"
"Earnings 4 Days From Now During"
"Earnings 5 Days Ago After"
"Earnings 5 Days Ago Before"
"Earnings 5 Days Ago During"
"Earnings 5 Days From Now After"
"Earnings 5 Days From Now Before"
"Earnings 5 Days From Now During"
"Earnings Today After"
"Earnings Today Before"
"Earnings Today During"
"Earnings Today Undefined"
"Earnings Tomorrow After"
"Earnings Tomorrow Before"
"Earnings Tomorrow During"
"Earnings Tomorrow Undefined"
"Earnings Yesterday After"
"Earnings Yesterday Before"
"Earnings Yesterday During"
"Earnings Yesterday Undefined"
"Easy To Borrow"
"ETFs"
"ETNs"
"Imbalance Close Buy"
"Imbalance Close Sell"
"Imbalance Open Buy"
"Imbalance Open Sell"
"IPOs Last 5 Days"
"IPOs Today"
"Master Limited Partnership"
"MidCap"
"NASDAQ"
"NASDAQ Capital Market"
"NASDAQ Global Market"
"News 1 Hour, Primary Symbol"
"News 1 Hour, Secondary Symbols"
"News 1 Hours, Related Symbols"
"News 12 Hour, Secondary Symbols"
"News 12 Hours, Primary Symbol"
"News 12 Hours, Related Symbols"
"News 15 Minutes, Primary Symbol"
"News 15 Minutes, Related Symbols"
"News 15 Minutes, Secondary Symbols"
"News 24 Hour, Secondary Symbols"
"News 24 Hours, Primary Symbol"
"News 24 Hours, Related Symbols"
"NYSE Listed"
"NYSE/AMEX combined"
"Over 1M"
"Preferred"
"Recent IPOs"
"Recent Reverse Splits"
"Russell 3000"
"S&P 100"
"S&P 400"
"S&P 500"
"S&P 600"
"Sector Basic Material"
"Sector Capital Equipment"
"Sector Consumer Cyclical"
"Sector Consumer Staple"
"Sector Energy"
"Sector Financial"
"Sector Health Care"
"Sector Retail"
"Sector Technology"
"Sector Transportation"
"Sector Utility"
"Series"
"Splits Today"
"Under 500K"
"Warrants"
"When Distributed"
"When Issued"
"ADRs"
"Argentina"
"Australia"
"Belgium"
"Brazil"
"Britain"
"Cayman Islands"
"Chile"
"China"
"Colombia"
"Cyprus"
"Denmark"
"Finland"
"France"
"Germany"
"Great Britain"
"Greece"
"Hong Kong"
"India"
"Indonesia"
"Ireland"
"Israel"
"Italy"
"Japan"
"Jersey"
"Luxembourg"
"Mexico"
"Netherlands"
"Norway"
"Panama"
"Peru"
"Philippines"
"Portugal"
"Russia"
"South Africa"
"South Korea"
"Spain"
"Sweden"
"Switzerland"
"Taiwan"
"Turkey"