Closed optional12 closed 9 months ago
So whats happening here is that you are selecting a slice (0 to 50) and sometimes the ticker appears there, and other times it doesn't. This happens because there is a default limit of 50.
Now I'm sure that your first thought is to extend the limit, for example to set it to 100k:
(Query()
.select('name', 'close', 'earnings_release_date', 'earnings_release_next_date')
.limit(100_000)
.get_scanner_data())
But this is not a good idea for two reasons:
Not to mention that its very inefficient to process all that data locally to just find one single ticker (or even a few ...).
It would be both more performant and efficient to use the set_tickers()
method:
(Query()
.select('name', 'close', 'earnings_release_date', 'earnings_release_next_date')
.set_tickers('NASDAQ:CRUS')
.get_scanner_data())
(1,
ticker name close earnings_release_date earnings_release_next_date
0 NASDAQ:CRUS CRUS 93.25 1707339780 1714564800)
Hope this solves your issue.
Yes that helps. Final question: Is there a way to determine the ticker when just the name/symbol is known? In my example I asked for name/symbol CRUS and you provided the query to use for ticker NASDAQ:CRUS.
Sorry, just found it. There is a function get_all_symbols() :-)
Is there a way to determine the ticker when just the name/symbol is known?
Generally I would just google the exchange. But you can also do this:
(Query()
.where(Column('name') == 'CRUS')
.get_scanner_data())
(1,
ticker name close volume market_cap_basic
0 NASDAQ:CRUS CRUS 93.06 725539 5019189676)
Oh yeah. Sure. Thank you. Sometimes I do not see the trees in Front of a Forrest 😊
Btw: Do you know how to create a screener based ON protected indicators? The values are available in Objekt & Data tree But TV Screener does Not provide this capability. Are these values accessible via the Database?
"Shneor E." @.***> schrieb am 11.02.2024:
Is there a way to determine the ticker when just the name/symbol is known?
Generally I would just google the exchange. But you can also do this:
(Query() .where(Column('name') == 'CRUS') .get_scanner_data())
(1, ticker name close volume market_cap_basic 0 NASDAQ:CRUS CRUS 93.06 725539 5019189676)
-- Diese Nachricht wurde mit K-@ Mail gesendet. ------10998CU6AQPH2Y2Y1RV4GTSIMU757C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
Oh yeah. Sure. Thank you.Is there a way to determine the ticker when just the name/symbol is known?
Generally I would just google the exchange. But you can also do this:
(Query() .where(Column('name') == 'CRUS') .get_scanner_data())(1, ticker name close volume market_cap_basic 0 NASDAQ:CRUS CRUS 93.06 725539 5019189676)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.
------10998CU6AQPH2Y2Y1RV4GTSIMU757C--
protected indicators
No worries. If you mean closed-source indicators then no, it's not possible to my knowledge.
I observed that not always data gets returned. _, df = Query().select('name', 'close', 'earnings_release_date',, 'earnings_release_next_date').get_scanner_data()
On 07. Feb 2024 for eaxmple for CRUS: df[df.name == 'CRUS'][['name', 'close', 'earnings_release_date', 'earnings_release_next_date']] Empty DataFrame Columns: [name, close, earnings_release_date, earnings_release_next_date] Index: []
but on TradingView Earnings View/Screener page they are listed for today after Market
Why is this? Anything else required to retrieve the data?