News & Events API
Stay informed with real-time financial news, earnings announcements, insider trading data, and comprehensive market events.
Available Endpoints
Financial News
Get the latest financial news and market updates.
Query Parameters:
symbol
(optional): Filter news by stock symbol
category
(optional): News category (earnings
, merger
, dividend
, general
)
limit
(optional): Number of articles (default: 20, max: 100)
from
(optional): Start date (YYYY-MM-DD)
to
(optional): End date (YYYY-MM-DD)
Example Request:
curl -X GET "https://api.financialcontext.com/api/news?symbol=AAPL&limit=10" \
-H "X-API-Key: your-api-key"
Response:
{
"success" : true ,
"data" : {
"articles" : [
{
"id" : "news_123456" ,
"title" : "Apple Reports Record Q4 Earnings" ,
"summary" : "Apple Inc. reported better-than-expected quarterly earnings..." ,
"content" : "Full article content..." ,
"url" : "https://example.com/news/apple-earnings" ,
"source" : "Reuters" ,
"author" : "John Smith" ,
"publishedAt" : "2024-01-15T14:30:00Z" ,
"symbols" : [ "AAPL" ],
"category" : "earnings" ,
"sentiment" : {
"score" : 0.75 ,
"label" : "positive"
},
"impact" : "high"
}
],
"pagination" : {
"total" : 150 ,
"page" : 1 ,
"limit" : 10 ,
"hasNext" : true
}
}
}
Earnings Data
Get comprehensive earnings information and announcements.
GET /api/earnings/{symbol}
Query Parameters:
period
(optional): annual
or quarterly
(default: quarterly
)
limit
(optional): Number of periods (default: 4)
Example Request:
curl -X GET "https://api.financialcontext.com/api/earnings/AAPL?period=quarterly&limit=8" \
-H "X-API-Key: your-api-key"
Response:
{
"success" : true ,
"data" : {
"symbol" : "AAPL" ,
"earnings" : [
{
"fiscalQuarter" : "Q1" ,
"fiscalYear" : 2024 ,
"reportDate" : "2024-02-01" ,
"actualEPS" : 2.18 ,
"estimatedEPS" : 2.10 ,
"surprise" : 0.08 ,
"surprisePercent" : 3.81 ,
"actualRevenue" : 119575000000 ,
"estimatedRevenue" : 117910000000 ,
"revenueGrowth" : 2.1 ,
"epsGrowth" : 13.9 ,
"guidance" : {
"nextQuarterEPS" : {
"low" : 1.95 ,
"high" : 2.05
},
"nextQuarterRevenue" : {
"low" : 89000000000 ,
"high" : 93000000000
}
}
}
],
"upcomingEarnings" : {
"date" : "2024-05-02" ,
"timeOfDay" : "after-market" ,
"confirmed" : true
}
}
}
Insider Trading
Track insider trading activities and SEC filings.
GET /api/insider-trades/{symbol}
Query Parameters:
limit
(optional): Number of transactions (default: 20)
transactionType
(optional): buy
, sell
, or all
(default: all
)
from
(optional): Start date (YYYY-MM-DD)
Example Request:
curl -X GET "https://api.financialcontext.com/api/insider-trades/AAPL?limit=15&transactionType=buy" \
-H "X-API-Key: your-api-key"
Response:
{
"success" : true ,
"data" : {
"symbol" : "AAPL" ,
"transactions" : [
{
"id" : "insider_789012" ,
"filingDate" : "2024-01-10" ,
"transactionDate" : "2024-01-08" ,
"insider" : {
"name" : "Timothy D. Cook" ,
"title" : "Chief Executive Officer" ,
"relationship" : "Officer"
},
"transaction" : {
"type" : "sale" ,
"shares" : 511884 ,
"pricePerShare" : 185.92 ,
"totalValue" : 95189876.48 ,
"sharesOwnedAfter" : 3279726
},
"secForm" : "4" ,
"secUrl" : "https://sec.gov/Archives/edgar/data/..."
}
],
"summary" : {
"totalTransactions" : 45 ,
"buyTransactions" : 12 ,
"sellTransactions" : 33 ,
"netShares" : -2150000 ,
"netValue" : -398750000
}
}
}
Market Timeline
Get chronological market events and corporate actions.
GET /api/timeline/{symbol}
Query Parameters:
eventTypes
(optional): Comma-separated event types
from
(optional): Start date (YYYY-MM-DD)
to
(optional): End date (YYYY-MM-DD)
limit
(optional): Number of events (default: 50)
Example Request:
curl -X GET "https://api.financialcontext.com/api/timeline/AAPL?eventTypes=earnings,dividend,split" \
-H "X-API-Key: your-api-key"
Event Types
Corporate Events
Earnings Announcements : Quarterly and annual results
Dividend Declarations : Dividend payments and dates
Stock Splits : Forward and reverse splits
Spin-offs : Corporate restructuring events
Mergers & Acquisitions : M&A announcements and completions
Regulatory Events
SEC Filings : 10-K, 10-Q, 8-K, and other forms
Insider Trading : Form 4 filings and transactions
Proxy Statements : Shareholder meeting information
Registration Statements : New security offerings
Market Events
Index Changes : S&P 500, NASDAQ additions/removals
Analyst Ratings : Upgrades, downgrades, initiations
Conference Calls : Earnings calls and investor events
Product Launches : Major product announcements
News Sentiment Analysis
Positive Sentiment Score: 0.5 to 1.0 - Bullish news and positive developments
Negative Sentiment Score: -1.0 to -0.5 - Bearish news and negative developments
Neutral Sentiment Score: -0.5 to 0.5 - Balanced or factual reporting
Impact Assessment High, Medium, Low - Potential market impact rating
Real-Time News Monitoring
class NewsMonitor {
constructor ( apiKey ) {
this . apiKey = apiKey ;
this . baseUrl = 'https://api.financialcontext.com' ;
this . watchlist = new Set ();
}
addToWatchlist ( symbol ) {
this . watchlist . add ( symbol );
}
async getLatestNews ( symbols = null ) {
const targetSymbols = symbols || Array . from ( this . watchlist );
const newsPromises = targetSymbols . map ( symbol =>
this . fetchSymbolNews ( symbol )
);
const results = await Promise . all ( newsPromises );
return this . aggregateNews ( results );
}
async fetchSymbolNews ( symbol ) {
const response = await fetch (
` ${ this . baseUrl } /api/news?symbol= ${ symbol } &limit=5` ,
{ headers: { 'X-API-Key' : this . apiKey } }
);
return response . json ();
}
aggregateNews ( results ) {
const allNews = results . flatMap ( r => r . data . articles );
return allNews
. sort (( a , b ) => new Date ( b . publishedAt ) - new Date ( a . publishedAt ))
. slice ( 0 , 20 );
}
filterByImpact ( news , minImpact = 'medium' ) {
const impactLevels = { low: 1 , medium: 2 , high: 3 };
const threshold = impactLevels [ minImpact ];
return news . filter ( article =>
impactLevels [ article . impact ] >= threshold
);
}
}
// Usage
const monitor = new NewsMonitor ( 'your-api-key' );
monitor . addToWatchlist ( 'AAPL' );
monitor . addToWatchlist ( 'MSFT' );
const latestNews = await monitor . getLatestNews ();
const highImpactNews = monitor . filterByImpact ( latestNews , 'high' );
Earnings Calendar Integration
import requests
from datetime import datetime, timedelta
def get_earnings_calendar ( start_date = None , end_date = None ):
if not start_date:
start_date = datetime.now().strftime( '%Y-%m- %d ' )
if not end_date:
end_date = (datetime.now() + timedelta( days = 7 )).strftime( '%Y-%m- %d ' )
# Get earnings for multiple symbols
symbols = [ 'AAPL' , 'MSFT' , 'GOOGL' , 'AMZN' , 'TSLA' ]
earnings_data = []
for symbol in symbols:
url = f "https://api.financialcontext.com/api/earnings/ { symbol } "
headers = { 'X-API-Key' : 'your-api-key' }
response = requests.get(url, headers = headers)
data = response.json()
if 'upcomingEarnings' in data[ 'data' ]:
upcoming = data[ 'data' ][ 'upcomingEarnings' ]
if start_date <= upcoming[ 'date' ] <= end_date:
earnings_data.append({
'symbol' : symbol,
'date' : upcoming[ 'date' ],
'time' : upcoming[ 'timeOfDay' ],
'confirmed' : upcoming[ 'confirmed' ]
})
return sorted (earnings_data, key = lambda x : x[ 'date' ])
# Get this week's earnings
earnings_calendar = get_earnings_calendar()
for earning in earnings_calendar:
print ( f " { earning[ 'symbol' ] } : { earning[ 'date' ] } ( { earning[ 'time' ] } )" )
Event-Driven Trading Signals
function generateTradingSignals ( newsData , earningsData , insiderData ) {
const signals = [];
// News sentiment signal
const avgSentiment = newsData . reduce (( sum , article ) =>
sum + article . sentiment . score , 0 ) / newsData . length ;
if ( avgSentiment > 0.6 ) {
signals . push ({
type: 'NEWS_BULLISH' ,
strength: avgSentiment ,
description: 'Positive news sentiment detected'
});
}
// Earnings surprise signal
const latestEarnings = earningsData [ 0 ];
if ( latestEarnings . surprisePercent > 5 ) {
signals . push ({
type: 'EARNINGS_BEAT' ,
strength: Math . min ( latestEarnings . surprisePercent / 10 , 1 ),
description: `Earnings beat by ${ latestEarnings . surprisePercent } %`
});
}
// Insider trading signal
const recentInsiderBuys = insiderData . filter ( trade =>
trade . transaction . type === 'buy' &&
new Date ( trade . transactionDate ) > new Date ( Date . now () - 30 * 24 * 60 * 60 * 1000 )
);
if ( recentInsiderBuys . length > 2 ) {
signals . push ({
type: 'INSIDER_BUYING' ,
strength: Math . min ( recentInsiderBuys . length / 5 , 1 ),
description: ` ${ recentInsiderBuys . length } insider buy transactions in 30 days`
});
}
return signals ;
}
Data Sources & Quality
News Sources : Reuters, Bloomberg, AP, MarketWatch, SEC filings
Update Frequency : Real-time during market hours
Historical Coverage : Up to 10 years of archived news and events
Language Support : English (primary), with sentiment analysis
Accuracy : 99.5% uptime with redundant data sources
News sentiment scores are generated using advanced NLP models trained on financial text. Sentiment analysis should be used as one factor among many in investment decisions.
Insider trading data is sourced from SEC filings and may have reporting delays. Always verify critical information with official SEC databases.