talkytrend.handler.finnhub.FinnhubHandler#

class talkytrend.handler.finnhub.FinnhubHandler(**kwargs)[source]#

Bases: Client

Finnhub API client

documentation: https://finnhub.io/docs/api

Initialize the object with the given keyword arguments.

Parameters:

kwargs – keyword arguments

Returns:

None

Methods

fetch()

Asynchronously fetches data from the source using the configured settings.

get_news()

Asynchronously retrieves news articles from the Finnhub API based on the specified category and API key.

monitor()

Asynchronously monitors the system and retrieves various data sources based on the configured settings.

async get_news()[source]#

Asynchronously retrieves news articles from the Finnhub API based on the specified category and API key.

Returns:

A string containing HTML formatted news summaries

linked to their respective URLs. Returns None if an error occurs while retrieving the news.

async fetch()#

Asynchronously fetches data from the source using the configured settings.

Returns:

A string containing the concatenated results

of the retrieved data sources.

Return type:

str

async monitor()#

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