Skip to content

API Reference parrot_tools.massive.models

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.massive.models

View source

Pydantic models for MassiveToolkit.

Input models define the schema for agent tool calls. Output models define the structured response format with derived metrics.

Class AnalystAction

Single analyst rating action.

Fields:

Field Type Default Description
date str Action date YYYY-MM-DD
analyst str | None Analyst name
firm str Firm name
action str Action type: upgrade, downgrade, initiate, reiterate
rating_prior str | None Prior rating
rating_current str Current rating
price_target_prior float | None Prior price target
price_target_current float | None Current price target

Class AnalystRatingsDerived

Derived metrics for analyst ratings.

Fields:

Field Type Default Description
upgrades_30d int Number of upgrades in last 30 days
downgrades_30d int Number of downgrades in last 30 days
net_sentiment Literal['positive', 'neutral', 'negative'] | None Net sentiment based on upgrade/downgrade ratio
target_upside_pct float | None Upside to mean target from current price
recent_momentum Literal['improving', 'stable', 'deteriorating'] | None Recent momentum based on action trend

Class AnalystRatingsInput

Input model for get_analyst_ratings tool.

Fields:

Field Type Default Description
symbol str Stock ticker symbol
action Literal['upgrade', 'downgrade', 'initiate', 'reiterate'] | None Filter: 'upgrade', 'downgrade', 'initiate', 'reiterate'
date_from str | None Start date YYYY-MM-DD
limit int Max results
include_consensus bool Also fetch consensus summary

Class AnalystRatingsOutput

Output model for get_analyst_ratings.

Fields:

Field Type Default Description
symbol str Stock ticker symbol
recent_actions list[AnalystAction] Recent analyst actions
consensus ConsensusRating | None Consensus rating summary
derived AnalystRatingsDerived Derived metrics
source str Data source identifier
cached bool Whether data was served from cache
error str | None Error message if request failed
fallback str | None Fallback suggestion on error

Class ConsensusRating

Consensus rating summary.

Fields:

Field Type Default Description
buy int Number of buy ratings
hold int Number of hold ratings
sell int Number of sell ratings
strong_buy int Number of strong buy ratings
strong_sell int Number of strong sell ratings
mean_target float | None Mean price target
high_target float | None Highest price target
low_target float | None Lowest price target
consensus_rating str | None Consensus rating (e.g. 'Buy', 'Hold', 'Sell')

Class EarningsDataInput

Input model for get_earnings_data tool.

Fields:

Field Type Default Description
symbol str | None Filter by ticker
date_from str | None Start date YYYY-MM-DD
date_to str | None End date YYYY-MM-DD
importance int | None Filter by importance (0-5)
limit int Max results

Class EarningsDerived

Derived metrics for earnings.

Fields:

Field Type Default Description
beat_rate_4q float | None Beat rate last 4 quarters (0.0-1.0)
avg_eps_surprise_4q float | None Average EPS surprise % last 4 quarters
avg_revenue_surprise_4q float | None Average revenue surprise % last 4 quarters
trend Literal['consistent_beater', 'mixed', 'consistent_misser'] | None Earnings trend classification

Class EarningsOutput

Output model for get_earnings_data.

Fields:

Field Type Default Description
symbol str | None Stock ticker symbol (if filtered)
earnings list[EarningsRecord] Historical earnings data
next_earnings NextEarnings | None Next scheduled earnings
derived EarningsDerived Derived metrics
source str Data source identifier
cached bool Whether data was served from cache
error str | None Error message if request failed
fallback str | None Fallback suggestion on error

Class EarningsRecord

Single earnings record.

Fields:

Field Type Default Description
date str Earnings date YYYY-MM-DD
time str | None BMO (Before Market Open) or AMC (After Market Close)
period str | None Reporting period (e.g. 'Q1 2026')
eps_estimate float | None EPS estimate
eps_actual float | None EPS actual
eps_surprise_pct float | None EPS surprise percentage
revenue_estimate float | None Revenue estimate
revenue_actual float | None Revenue actual
revenue_surprise_pct float | None Revenue surprise percentage

Class GreeksData

Greeks data for an options contract.

Fields:

Field Type Default Description
delta float | None Delta
gamma float | None Gamma
theta float | None Theta
vega float | None Vega

Class NextEarnings

Next scheduled earnings.

Fields:

Field Type Default Description
date str Next earnings date YYYY-MM-DD
time str | None BMO or AMC
eps_estimate float | None EPS estimate
revenue_estimate float | None Revenue estimate

Class OptionsChainInput

Input model for get_options_chain_enriched tool.

Fields:

Field Type Default Description
underlying str Underlying ticker symbol (e.g. 'AAPL')
expiration_date_gte str | None Min expiration date YYYY-MM-DD
expiration_date_lte str | None Max expiration date YYYY-MM-DD
strike_price_gte float | None Min strike price
strike_price_lte float | None Max strike price
contract_type Literal['call', 'put'] | None 'call', 'put', or None for both
limit int Max contracts per page (API max: 250)

Class OptionsChainOutput

Output model for get_options_chain_enriched.

Fields:

Field Type Default Description
underlying str Underlying ticker symbol
underlying_price float | None Current underlying price
timestamp str | None Data timestamp ISO 8601
contracts_count int Number of contracts returned
contracts list[OptionsContract] List of option contracts
source str Data source identifier
cached bool Whether data was served from cache
error str | None Error message if request failed
fallback str | None Fallback suggestion on error

Class OptionsContract

Single options contract with Greeks and pricing.

Fields:

Field Type Default Description
ticker str Option ticker (e.g. 'O:AAPL250321C00185000')
strike float Strike price
expiration str Expiration date YYYY-MM-DD
contract_type str 'call' or 'put'
greeks GreeksData Greeks data
implied_volatility float | None Implied volatility
open_interest int | None Open interest
volume int | None Daily volume
bid float | None Bid price
ask float | None Ask price
midpoint float | None Midpoint price
last_trade_price float | None Last trade price
break_even_price float | None Break-even price

Class ShortInterestDerived

Derived metrics for short interest.

Fields:

Field Type Default Description
short_interest_change_pct float | None Percentage change vs previous period
trend Literal['increasing', 'decreasing', 'stable'] | None Short interest trend
days_to_cover_zscore float | None Days to cover z-score vs 12-month history

Class ShortInterestInput

Input model for get_short_interest tool.

Fields:

Field Type Default Description
symbol str Stock ticker symbol
limit int Number of settlement periods to return
order Literal['asc', 'desc'] 'asc' or 'desc' by date

Class ShortInterestOutput

Output model for get_short_interest.

Fields:

Field Type Default Description
symbol str Stock ticker symbol
latest ShortInterestRecord | None Most recent short interest data
history list[ShortInterestRecord] Historical short interest data
derived ShortInterestDerived Derived metrics
source str Data source identifier
cached bool Whether data was served from cache
error str | None Error message if request failed
fallback str | None Fallback suggestion on error

Class ShortInterestRecord

Single short interest record.

Fields:

Field Type Default Description
settlement_date str Settlement date YYYY-MM-DD
short_interest int Total shares short
avg_daily_volume int | None Average daily volume
days_to_cover float | None Days to cover

Class ShortVolumeDerived

Derived metrics for short volume.

Fields:

Field Type Default Description
avg_short_ratio_5d float | None 5-day average short volume ratio
avg_short_ratio_20d float | None 20-day average short volume ratio
current_vs_20d Literal['above_average', 'normal', 'below_average'] | None Current ratio vs 20-day average
trend_5d Literal['increasing', 'decreasing', 'stable'] | None 5-day trend direction

Class ShortVolumeInput

Input model for get_short_volume tool.

Fields:

Field Type Default Description
symbol str Stock ticker symbol
date_from str | None Start date YYYY-MM-DD
date_to str | None End date YYYY-MM-DD
limit int Number of trading days

Class ShortVolumeOutput

Output model for get_short_volume.

Fields:

Field Type Default Description
symbol str Stock ticker symbol
data list[ShortVolumeRecord] Short volume data
derived ShortVolumeDerived Derived metrics
source str Data source identifier
cached bool Whether data was served from cache
error str | None Error message if request failed
fallback str | None Fallback suggestion on error

Class ShortVolumeRecord

Single short volume record.

Fields:

Field Type Default Description
date str Date YYYY-MM-DD
short_volume int Short volume
short_exempt_volume int | None Short exempt volume
total_volume int Total volume
short_volume_ratio float Short volume / total volume

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally