Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
chipkent
force-pushed
the
feat/rest-missing-endpoints
branch
2 times, most recently
from
October 24, 2026 04:17
e6f8f37 to
8508998
Compare
The Fed funding-conditions endpoint is documented in the OpenAPI spec and on massive.com/docs but had no client method; the economy client only covered treasury-yields, inflation, inflation-expectations, and labor-market. Add EconomyClient.list_funding_conditions, a paginated list method in the same shape as list_treasury_yields. Its query parameters follow the documented ones exactly: date, date.gt, date.gte, date.lt, date.lte, limit, and sort (this endpoint documents no date.any_of or order). sort is typed Optional[str], as in list_labor_market_indicators, rather than Union[str, Sort]. The endpoint takes column.direction values such as "date.desc", so Sort.ASC would send a bare "asc" that it does not accept. Add the FedFundingConditions model with all 22 documented result fields (date plus the fed funds, IORB, SOFR, OBFR, TGCR, repo/reverse repo, and commercial paper series). Tests cover a two-page fixture (including a weekend row whose business-day series are null), check with pook that all seven parameters are sent under their API names (date.gt rather than date_gt, and so on), and check that a multi-column sort string is sent unchanged. Add an example script.
…}/{to}/{date}
The crypto daily open/close endpoint is documented in the OpenAPI spec
and on massive.com/docs but had no client method. The docs and the
crypto example pointed at get_daily_open_close_agg, which calls
/v1/open-close/{ticker}/{date}, a different endpoint whose response
(afterHours, preMarket, high, low, volume) does not match the crypto
one.
Add AggsClient.get_daily_open_close_crypto(from_, to, date, adjusted)
and two models matching the documented response:
- DailyOpenCloseCrypto: symbol, is_utc (isUTC), day, open, close,
open_trades (openTrades), closing_trades (closingTrades).
- DailyOpenCloseCryptoTrade: conditions (c), id (i), price (p),
size (s), timestamp (t), exchange (x).
Test against a fixture built from the documented example response.
Give the method its own section in the Aggs docs, move the crypto
docs link there, and point the crypto example at the new method.
chipkent
force-pushed
the
feat/rest-missing-endpoints
branch
from
October 24, 2026 06:03
8508998 to
6ead873
Compare
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #<issue: F6>
Two documented REST endpoints have no client method. One commit each; nothing existing changes behavior.
list_funding_conditions(...)forGET /fed/v1/funding-conditions: a paginated method shaped likelist_treasury_yields, with the documented parameters as keyword arguments (date,date_gt,date_gte,date_lt,date_lte,limit,sort) and aFedFundingConditionsmodel with all 22 fields.sortisOptional[str], notSort, because the endpoint takescolumn.directionvalues such asdate.desc.get_daily_open_close_crypto(from_, to, date, adjusted=None)forGET /v1/open-close/crypto/{from}/{to}/{date}, withDailyOpenCloseCryptoandDailyOpenCloseCryptoTrademodels. The crypto example andAggs.rstpointed atget_daily_open_close_agg, which calls the stock endpoint; both now use the new method.Tests: pook fixtures for both endpoints (pagination, nested trades), and pook
params=checks that every parameter is sent under its API name.