Replies: 1 comment 1 reply
-
Hi, Yes, your query is correct. To use the Screener, you just have to pass it as the parameter in setting default body and call query=yf.EquityQuery('lt', ['lastclosemarketcap.lasttwelvemonths',1000000000000])
screener = yf.Screener()
screener.set_default_body(query)
print(screener.body) # to view the rest of the request body
print(screener.response) # to view the response for the request This will print the below:
I'll work on further examples for the documentation! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I want to use a custom query and then the screener but I' m suck.
I believe that I have set the query correctly. As an example, the code below sets the query for very large companies:
query=yf.EquityQuery('lt', ['lastclosemarketcap.lasttwelvemonths',1000000000000])
But how do I parse this query into the screener and get the companies I' m looking for?
PS: I saw that you work on the documentation here (https://ranaroussi.github.io/yfinance/reference/yfinance.sector_industry.html) but unfortunately I need some further support.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions