Skip to content

Add missing endpoints and sync with OpenAPI spec - #1056

Merged
justinpolygon merged 7 commits into
masterfrom
jw/add-docs-coverage-endpoints
Nov 12, 2026
Merged

justinpolygon merged 7 commits into
masterfrom
jw/add-docs-coverage-endpoints

Conversation

@justinpolygon

@justinpolygon justinpolygon commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Adds endpoints documented on massive.com that the client was missing, and syncs existing methods with the OpenAPI spec.

New endpoints

  • list_options_open_interest — /options/v1/open-interest
  • list_options_unusual_trades — /options/v1/unusual-trades
  • list_stocks_insider_activity — /stocks/insiders/vX/activity
  • list_stocks_insider_holdings — /stocks/insiders/vX/holdings

Synced with the OpenAPI spec

  • *_all_of filters are now sent as .all_of
  • Forex snapshot last_quote ask/bid prices are now populated
  • Added response fields the models were dropping
  • Added missing query params (additive, no breaking changes)

Tested against the live API, including pagination.

@justinpolygon
justinpolygon force-pushed the jw/add-docs-coverage-endpoints branch from 48ef2e5 to 733bcf7 Compare November 11, 2026 06:04
@justinpolygon
justinpolygon marked this pull request as ready for review November 11, 2026 06:09
_get_params converted _lt/_lte/_gt/_gte/_any_of suffixes to the dotted
query form but not _all_of, so tickers_all_of=... went out as
?tickers_all_of=... and the API ignored it. Affects form-3/form-4,
financials and benzinga news filters. Lists are joined like any_of.
- list_options_open_interest            GET /options/v1/open-interest
- list_options_open_interest_by_underlying GET /options/vX/open-interest/underlying
- list_options_unusual_trades           GET /options/v1/unusual-trades
- list_stocks_insider_activity          GET /stocks/insiders/vX/activity
- list_stocks_insider_holdings          GET /stocks/insiders/vX/holdings
- list_funding_conditions               GET /fed/v1/funding-conditions
- get_crypto_daily_open_close_agg       GET /v1/open-close/crypto/{from}/{to}/{date}

Kwargs mirror the OpenAPI spec params.
TickerSnapshot.last_quote reuses the stock LastQuote model, which reads
ask/bid prices from P/p. Forex snapshot quotes send a/b instead, so
get_snapshot_ticker/all/direction for forex returned ask_price and
bid_price as None. Fall back to a/b when P/p are absent.
Found by comparing live API responses with the deserialized objects:
- RealTimeCurrencyConversion.from_ read the key "from_", but the API
  sends "from", so it was always None; also add symbol
- PreviousCloseAgg.transactions (n)
- TickerDetails.round_lot
- EtfGlobalConstituent.constituent_rank
- LastQuoteOptionContractSnapshot.ask_exchange / bid_exchange

Two existing tests asserted the old values (from_=None, no transactions)
even though their fixtures carried the data; updated them.
All additive and inserted just before params=, so positional calls keep
working:
- list_short_interest: ticker_{any_of,gt,gte,lt,lte},
  {days_to_cover,settlement_date,avg_daily_volume}_any_of
- list_short_volume: ticker_{any_of,gt,gte,lt,lte},
  {date,short_volume_ratio}_any_of
- list_futures_contracts: provider_id, provider_product_id
- list_futures_products: provider_id
- list_benzinga_consensus_ratings: date_any_of
- list_options_contracts: ticker
- list_universal_snapshots: ticker

Verified against the live API that each filter is applied.
Drop list_funding_conditions, get_crypto_daily_open_close_agg and
list_options_open_interest_by_underlying. They are in the prod spec but
not live yet.
@justinpolygon
justinpolygon force-pushed the jw/add-docs-coverage-endpoints branch from a39de46 to 010cc6c Compare November 12, 2026 00:11
@justinpolygon
justinpolygon merged commit 8c2bd1d into master Nov 12, 2026
7 checks passed
@justinpolygon
justinpolygon deleted the jw/add-docs-coverage-endpoints branch November 12, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants