tedchou12 / webull

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

Bid Ask Prices #340

Open cmay10 opened 1 year ago

cmay10 commented 1 year ago

Is there a way to get the bid/ask prices of a stock? They used to be returned in the get_quote() method but they don't appear there anymore. I checked the requests log and it seems there is a request made to 'https://quotes-gw.webullfintech.com/api/stock/tickerRealTime/getDepth?tickerId=XXXXXX' to get the bid/asks. I tried making a request to this url with all the same headers that were used, but it doesn't return the bid/asks for some reason.

ICANTFINDAUSERNAMEATALL commented 1 year ago

the get_quote() methord works.

I used this to get the ask/bid:

print(wb.get_quote("SPY")['askList']) print(wb.get_quote("SPY")['bidList'])

I didn't modify the class so it should work for you.