talkytrend.handler.tradingview.TradingviewHandler#
- class talkytrend.handler.tradingview.TradingviewHandler(**kwargs)[source]#
Bases:
ClientInitialize the object with the given keyword arguments.
- Parameters:
kwargs – keyword arguments
- Returns:
None
Methods
fetch([interval])Fetches the signal for a given interval.
fetch_tv_data(asset_id, exchange, screener, ...)Fetches from Trading View the analysis of a given asset from a specified exchange and screener at a specified interval.
get_news()Asynchronously retrieves the latest news from various sources based on the configured settings.
monitor()Asynchronously monitors the system and retrieves various data sources based on the configured settings.
- async fetch_tv_data(asset_id, exchange, screener, interval)[source]#
Fetches from Trading View the analysis of a given asset from a specified exchange and screener at a specified interval. Utilizes asynchronous handling to improve efficiency. more info: AnalyzerREST/python-tradingview-ta
- Parameters:
asset_id (str) – The ID of the asset.
exchange (str) – The exchange on which the asset is traded.
screener (str) – The screener used for analysis.
interval (str) – The interval at which the analysis is performed.
- Returns:
The recommendation based on the analysis. Can be one of the following:
’BUY’: “🔼”
’STRONG_BUY’: “⏫”
’SELL’: “🔽”
’STRONG_SELL’: “⏬”
Any other value: “▶️”
- Return type:
str
- async fetch(interval='4h')[source]#
Fetches the signal for a given interval.
- Parameters:
interval (str) – The interval for which
"4h". (to fetch the signal. Defaults to)
- Returns:
The signal table as a string or HTML formatted
- Return type:
str
- async monitor()[source]#
Asynchronously monitors the system and retrieves various data sources based on the configured settings. Cover Events, Feed, and Signal.
- Returns:
- A string containing the concatenated results
of the retrieved data sources.
- Return type:
str
- async get_news()#
Asynchronously retrieves the latest news from various sources based on the configured settings.
- Returns:
- A string containing the concatenated
results of the retrieved news sources.
- Return type:
str