Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add has method #31

Closed
wants to merge 1 commit into from
Closed

Conversation

agent00jackson
Copy link

I needed this to search for common stock.

Sample Query:

query = (Query()
             .select('name', 'market', 'sector', 'industry', 'indexes.tr', 'isin', 'country')
             .where(Column('type') ==  'stock',
                    Column('typespecs').has(['common']),
                    Column('country') == 'United States',
                    Column('exchange').isin(['NASDAQ', 'NYSE'])))

@agent00jackson agent00jackson changed the base branch from staging to master June 16, 2024 02:37
@shner-elmo
Copy link
Owner

Hey Jackson, thanks for the PR.
I actually already implemented that method in the staging branch, along with a few others, that I want to merge this week.

In the meantime, you can replace the expression inside the where function with the dictionary returned by the method to make it work.

@shner-elmo
Copy link
Owner

If you want, add the remaining methods that I added to the Query object, to the PR, and I will merge it

@shner-elmo
Copy link
Owner

I added this method in the latest version of the package.
https://shner-elmo.github.io/TradingView-Screener/tradingview_screener/query.html#Column.has

@shner-elmo shner-elmo closed this Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants