Closed jet-c-21 closed 9 months ago
But I don't want the rating of "Technical Rating", I want to find the rating of "Analyst Rating", like the rating in the stock forecast page
@jet-c-21 Sorry I misunderstood your initial question. I did some digging and I found the fields you are looking for:
cols = [
'recommendation_over',
'recommendation_total',
'recommendation_sell',
'recommendation_under',
'recommendation_hold',
'recommendation_mark',
'recommendation_buy',
]
_, df = Query().select( *cols).set_tickers('NASDAQ:AAPL').get_scanner_data()
df.to_dict('records')
[{'ticker': 'NASDAQ:AAPL',
'recommendation_over': 5,
'recommendation_total': 44,
'recommendation_sell': 2,
'recommendation_under': 1,
'recommendation_hold': 14,
'recommendation_mark': 1.5,
'recommendation_buy': 22}]
And you can use the formatter from above for the recommendation_mark
column. cheers
I want to select the symbol is in strong buy rating