The News Sentiment API exposes the platform’s FinBERT-powered NLP pipeline as three focused endpoints. Under the hood, the system uses theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/najmulhossainnj/Hedge-fund-backend/llms.txt
Use this file to discover all available pages before exploring further.
ProsusAI/finbert model from HuggingFace Transformers, loaded lazily and cached in process memory so repeated inference calls within a worker session do not reload weights from disk. Article-level scores are additionally cached in Redis by SHA-256 content hash (7-day TTL) so large daily universe runs avoid redundant inference on articles that appeared the previous day. The pipeline produces four scores per article — positive, negative, neutral, and an uncertainty value derived from the Shannon entropy of the softmax distribution — which directly align to the feature columns consumed by the Feature Engine.
Score Raw Texts
/api/v1/news/score
ArticleScore per input text. This endpoint is stateless — no database, feature store, or market data is involved. Empty or whitespace-only strings are automatically replaced with "neutral" before scoring.
The model processes inputs in batches of 16 and truncates each article to 512 tokens (the BERT maximum). For very large batches, expect proportionally longer latency; there is no async streaming on this endpoint.
Request Body
List of news strings to score. Minimum 1 item, maximum 500 items. Each string is truncated to 512 BERT tokens internally.
Response
One score object per input text, in the same order as the request.
Count of articles successfully scored. Equals the length of the
scores list.Aggregate Daily Sentiment
/api/v1/news/aggregate
NaN scores and an article_volume of 0.
This is the same pipeline invoked internally by the news.finbert_sentiment and news.sentiment_momentum feature plugins during automated research sessions.
Request Body
Instrument ticker symbol (e.g.
"AAPL", "TSLA").ISO 8601 start datetime for the data window.
ISO 8601 end datetime for the data window.
Column name in the news DataFrame that contains the article text to score. Override if your Market Data connector uses a different column name (e.g.
"title" or "body").Column name in the news DataFrame that contains the publication timestamp. The pipeline coerces this column to UTC-aware datetimes and normalises to trade date.
Response
The ticker symbol that was requested.
Number of trading day rows in the
data array.Array of daily sentiment records, one per trading day in the requested range.
List News Feature Plugins
/api/v1/news/features
news.* namespace in the platform’s feature registry. These are the same keys the FeatureDiscoveryAgent resolves when it detects "sentiment" or "news" in a research query.
The plugin keys returned here are identical to those available in feature generation requests via the Feature Engine. Pass them in the
plugin_key field of a Feature creation request, or reference them directly in a research query (e.g. "use news.finbert_sentiment for TSLA").Response
List of fully-qualified news feature plugin key strings (e.g.
"news.finbert_sentiment", "news.sentiment_momentum").