feat: CVM fund quote history and structure mapping on public MCP - #49
Merged
Conversation
Extend cvm_fund so agents can search by class/subclass name, pull up to 12 months of INF_DIARIO (start/end), stitch a single-class 555→175 continuation, and report the nicename actually served without picking a FIDC série. Document the Mais Retorno data-tool mapping. No calc tools.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
start/end now keep only dt_comptc in the requested inclusive range and reject impossible dates. id_subclasse is applied before the point limit. Single-class 555→175 stitch uses the class CNPJ as identity and drops duplicate dates, keeping the continuation class row.
MCP Trust Review
AchadosNO_FINDINGS. Over-engineeringExtendeu Eixos
Adversarial CROSS_FAMILY (GPT vs Grok): ACTIONABLE=0 after CVQ-1/2/3 fixes (calendar |
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.
Summary
Follow-on to #47/#48. Public
cvm_fundalready had RCVM 175 cadastro, latest/multi-month INF_DIARIO (Worker capped at 3 months), and CDAperiods/holdings. This PR closes the remaining Mais Retorno data gaps using CVM/official files only. Calc/analytics tools stay out.Already on main (#48): catalog by CNPJ/name, daily (≤3 months on Worker), periods, holdings, CONFID=sigilo, stream ZIP scan, rate limits 60/60s + 20/10s.
This PR:
catalogqalso matches classe and subclasse names.dailyacceptsstart/end(real calendar days) ormonthsup to 12. CVM yearly HIST ZIPs exceed the Worker 32 MB cap; page longer windows.pick_required);id_subclasseis applied before the point limit.served[].nicename/ CVM / ANBIMA class for the series actually returned.cvm_funddatasets.cvm_fundsearch_assets/get_asset_info/get_fund_class_subclassdataset=cataloglist_fund_structurecatalog.classes[].subclasses[]get_quotesdataset=dailyget_available_walletsdataset=periodsproduct=CDAget_wallet_detaildataset=holdingsNot implemented (explicitly excluded):
backtest_portfolio,compare_assets,get_asset_stats,get_drawdown,get_rolling_windows. No Mais Retorno API. No public code mode. Rate limits unchanged.Validation
node:testcases (class-name search, calendarstart/end, 555→175 stitch, subclass-before-limit,pick_required).--strict, pytest 351 passed (15 integration deselected).MCP Trust
PASS (
MCP_TOOL). Posted on this PR. Code mode still off on the public Worker.Deploy (after merge)
cd workers/mcp && npx wrangler deployif Cloudflare auth is present./opt/openfindata, not Charlie):git pull --ff-only+ gVisor compose up--build.38.729.027/0001-92and21.494.444/0001-09.