tedchou12 / webull

Unofficial APIs for Webull.
MIT License
597 stars 183 forks source link

API Access to Watchlists #239

Closed BigDaddyBastonkadonkz closed 2 years ago

BigDaddyBastonkadonkz commented 3 years ago

Anyone come up with a way to create/modify/retrieve watchlists?

manojjenago commented 3 years ago

Hi,

I have came up with this code to get some watchlist , not a professional code snippet , but does the work . This might be helpful


accountid= wb.get_account_id()
watlist = wb.get_watchlists()
print(watlist)

wlt = pd.DataFrame(watlist)
df2 = wlt.set_index("name", drop = False)
df2 = df2.loc["ElectronicVechile", : ]
df2 = df2['tickerList']
df3 = pd.DataFrame(df2)

df3 = df3['symbol']
print(df3)
for i in df3.items():

    print(df3.iloc[:-1])```