feat: funds resource #12
Merged
Merged
Conversation
|
The author of this PR, MarketDataDev03, is not an activated member of this organization on Codecov. |
MarketDataDev01
requested changes
Jun 16, 2026
MarketDataDev01
left a comment
Collaborator
There was a problem hiding this comment.
Remove exchange, country, adjustsplits, adjustdividends. They are not handled by the api
MarketDataDev01
approved these changes
Jun 18, 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.
feat: funds resource (
client.funds())Adds the
fundsresource on the resource-architecture the options and stocks PRs established. This is the smallest PR of the series: funds expose a single endpoint —GET /v1/funds/candles/{resolution}/{symbol}/— and no shared layer changed at all (transport, retry, rate-limit parsing,ParallelArrays,JsonResponseParser,MarketDataDates,RequestConfigare reused untouched).Reviewer entry point:
docs/FUNDS_REVIEW_GUIDE.md(~10 minutes, organized by flow). If you reviewed the stocks PR, the only genuinely new content is what funds deliberately don't have (below) and the parameter-surface choices.What's included
FundsResource, reached viaclient.funds()):candles/candlesAsync(ADR-006 sync+async parity), universal-param setters (dateFormat/mode/limit/offset/columns) returning configured copies,asCsv()facet carrying the config, package-privateasHtml()(built, hidden until the backend serves HTML). Package-private constructor (ADR-007).com.marketdata.sdk.funds,@NullMarked): Builder-basedFundCandlesRequest— window isdateXORfrom/to/countback(countback pairs withto, positive), plusexchange,country,adjustsplits,adjustdividends.FundResolutionis a value type modeling daily-and-up only:DAILY/WEEKLY/MONTHLY/YEARLYconstants,days/weeks/months/years(n)factories,of(String)passthrough.FundCandlesResponse(thinAbstractMarketDataResponse<List<FundCandle>>);FundCandleis OHLC-only with@Nullablefields; wire columnst,o,h,l,call required under the Option A contract (a requested column the API omits →ParseError, never a silent null);"s":"no_data"→ emptyvalues(); per-responserateLimit()(§8.2) for free from the base.SimpleModule(marketdata-funds) registered programmatically;tdecodes through the tolerantparseDateOrTimestampField(date-only daily bars underdateformat=timestamplift toAmerica/New_Yorkmidnight).Tests & demos
FundsResourceTest— 22 tests (750 total on the branch, all green): endpoint routing + every param translated, OHLC decoding with market-zone timestamps, date-onlyttolerance,no_data/error envelopes, columns projection + both Option A failure modes, strict-by-default missing column, CSV/HTML facets, per-response rate-limit snapshot, request/resolution validation, and the no-chunking proof.FundsIntegrationTest(VFINX, shape assertions;from/towindow +to+countback), gated byMARKETDATA_RUN_INTEGRATION_TESTS=true.FundsApp(make demo-funds/./gradlew runFunds) scripts the mock server through every scenario — run green end-to-end.QuickstartAppgains its funds section (the// add when client.funds() landsplaceholder is now live).Docs
docs/FUNDS_REVIEW_GUIDE.md— the review walkthrough.CHANGELOG.md— funds entry under Unreleased/Added.CLAUDE.md— funds moved from "deliberately deferred" to wired; onlymarketsremains.Known tracked debt (do not review as accidental)
The universal-param fluent setters and the
rowsDeserializer/validateRequestedColumnspair are copied per resource by design for now; the agreed self-typed abstract-base dedup refactor is scheduled before v1, aftermarketslands.