René's URL Explorer Experiment


Title: refactor: dedup B3 quote guard and push anbima emissor into the source by robertoecf · Pull Request #31 · robertoecf/OpenFinData · GitHub

Open Graph Title: refactor: dedup B3 quote guard and push anbima emissor into the source by robertoecf · Pull Request #31 · robertoecf/OpenFinData

X Title: refactor: dedup B3 quote guard and push anbima emissor into the source by robertoecf · Pull Request #31 · robertoecf/OpenFinData

Description: What Two contained cleanups from the review of #29 (items 2 and 3 of #30): Share the B3 live-quote guard. New api/_b3_common.py exposes resolve_quotes() and MAX_TICKERS. routers/b3.py and mcp_app.py both resolve the lazy yfinance import through it, so the guard and the pip install 'openfindata[b3]' hint live in one place instead of two near-copies. Push the debenture emissor filter into the source. anbima.get_debentures(...) now takes emissor, and both the REST router and the MCP tool drop their hand-rolled filter loop and pass it through, matching every other source-level filter (FCA ticker, IPE categoria, FIP quarter). Net -23 lines, no behaviour change. ruff format / ruff check / mypy --strict / pytest -m "not integration" (252) green. Item 1 of #30 deliberately left out The third item (push limit into ~18 source functions) is not included here. The unbounded-output bug that motivated it was already fixed in #29 (the MCP tools apply [:limit]). What remains is purely moving the slice into the source functions, which (a) gives no perf win (the CSV/zip is parsed in full regardless), (b) does not unify the REST routers, which need skip+limit via _page, and (c) adds a limit param to 18 public source functions for marginal DRY. Recommend closing #30 with items 2-3, or splitting item 1 into its own ticket if still wanted. Summary by CodeRabbit New Features Added support for filtering debenture results by issuer name. Unified B3 quote handling so single, multiple, and historical quote requests share the same backend selection logic. Bug Fixes Improved error messages when optional B3 quote support is unavailable, including setup guidance. Enforced a consistent maximum number of tickers per request across quote endpoints.

Open Graph Description: What Two contained cleanups from the review of #29 (items 2 and 3 of #30): Share the B3 live-quote guard. New api/_b3_common.py exposes resolve_quotes() and MAX_TICKERS. routers/b3.py and mcp_app....

X Description: What Two contained cleanups from the review of #29 (items 2 and 3 of #30): Share the B3 live-quote guard. New api/_b3_common.py exposes resolve_quotes() and MAX_TICKERS. routers/b3.py and mcp_app....

Opengraph URL: https://github.com/robertoecf/OpenFinData/pull/31

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f248bcac-017a-f211-3fc3-d1a384d769bf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idECF4:10DE3:695E0A:964587:6A4BCEEB
html-safe-noncedda5848a5c8256be30204afbee6dea1144ced9ffe5f87cb6debaadaffa646162
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0Y0OjEwREUzOjY5NUUwQTo5NjQ1ODc6NkE0QkNFRUIiLCJ2aXNpdG9yX2lkIjoiMTUxMzAzOTExNjcwMjA0Mzg4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4f5acdb1b22fd584872c4a7b303ab5fe713690c5d4d5ffa083eea8c9ce71d91f
hovercard-subject-tagpull_request:3946352653
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/robertoecf/OpenFinData/pull/31/files
twitter:imagehttps://avatars.githubusercontent.com/u/54923863?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/54923863?s=400&v=4
og:image:altWhat Two contained cleanups from the review of #29 (items 2 and 3 of #30): Share the B3 live-quote guard. New api/_b3_common.py exposes resolve_quotes() and MAX_TICKERS. routers/b3.py and mcp_app....
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9df996be9551ac02247d09a2f7f64ece66c35ca28885d346e98fdfda9cdaa37b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/robertoecf/OpenFinData git https://github.com/robertoecf/OpenFinData.git
octolytics-dimension-user_id54923863
octolytics-dimension-user_loginrobertoecf
octolytics-dimension-repository_id1214516543
octolytics-dimension-repository_nworobertoecf/OpenFinData
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1214516543
octolytics-dimension-repository_network_root_nworobertoecf/OpenFinData
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb71208a1c9ec7ccf364087569d0551f665dda674
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/robertoecf/OpenFinData/pull/31/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frobertoecf%2FOpenFinData%2Fpull%2F31%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frobertoecf%2FOpenFinData%2Fpull%2F31%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=robertoecf%2FOpenFinData
Reloadhttps://github.com/robertoecf/OpenFinData/pull/31/files
Reloadhttps://github.com/robertoecf/OpenFinData/pull/31/files
Reloadhttps://github.com/robertoecf/OpenFinData/pull/31/files
robertoecf https://github.com/robertoecf
OpenFinDatahttps://github.com/robertoecf/OpenFinData
Notifications https://github.com/login?return_to=%2Frobertoecf%2FOpenFinData
Fork 2 https://github.com/login?return_to=%2Frobertoecf%2FOpenFinData
Star 5 https://github.com/login?return_to=%2Frobertoecf%2FOpenFinData
Code https://github.com/robertoecf/OpenFinData
Issues 1 https://github.com/robertoecf/OpenFinData/issues
Pull requests 1 https://github.com/robertoecf/OpenFinData/pulls
Actions https://github.com/robertoecf/OpenFinData/actions
Projects https://github.com/robertoecf/OpenFinData/projects
Security and quality 0 https://github.com/robertoecf/OpenFinData/security
Insights https://github.com/robertoecf/OpenFinData/pulse
Code https://github.com/robertoecf/OpenFinData
Issues https://github.com/robertoecf/OpenFinData/issues
Pull requests https://github.com/robertoecf/OpenFinData/pulls
Actions https://github.com/robertoecf/OpenFinData/actions
Projects https://github.com/robertoecf/OpenFinData/projects
Security and quality https://github.com/robertoecf/OpenFinData/security
Insights https://github.com/robertoecf/OpenFinData/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Frobertoecf%2FOpenFinData%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Frobertoecf%2FOpenFinData%2Fissues%2Fnew%2Fchoose
robertoecfhttps://github.com/robertoecf
mainhttps://github.com/robertoecf/OpenFinData/tree/main
refactor/source-layer-cleanuphttps://github.com/robertoecf/OpenFinData/tree/refactor/source-layer-cleanup
Conversation 6 https://github.com/robertoecf/OpenFinData/pull/31
Commits 1 https://github.com/robertoecf/OpenFinData/pull/31/commits
Checks 6 https://github.com/robertoecf/OpenFinData/pull/31/checks
Files changed https://github.com/robertoecf/OpenFinData/pull/31/files
Please reload this pagehttps://github.com/robertoecf/OpenFinData/pull/31/files
refactor: dedup B3 quote guard and push anbima emissor into the source https://github.com/robertoecf/OpenFinData/pull/31/files#top
Show all changes 1 commit https://github.com/robertoecf/OpenFinData/pull/31/files
3f88dd7 refactor: dedup B3 quote guard and push anbima emissor into the source robertoecf Jun 27, 2026 https://github.com/robertoecf/OpenFinData/pull/31/commits/3f88dd730328ca9e56c373de79f539de6e67e8e7
Clear filters https://github.com/robertoecf/OpenFinData/pull/31/files
Please reload this pagehttps://github.com/robertoecf/OpenFinData/pull/31/files
Please reload this pagehttps://github.com/robertoecf/OpenFinData/pull/31/files
_b3_common.py https://github.com/robertoecf/OpenFinData/pull/31/files#diff-32df0d634750590fe95940dad6d1684f6aabaa9467dbd994f3edec2258e667e8
mcp_app.py https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
anbima.py https://github.com/robertoecf/OpenFinData/pull/31/files#diff-b7c52246dda6cf7ec52928f4b087441f76c2eacde0ffd0bb6d8ed3996c980064
b3.py https://github.com/robertoecf/OpenFinData/pull/31/files#diff-c00008a05984956b996f7baa6c442eef13cdb11df92d3386e2f1856b2b61a689
indices.py https://github.com/robertoecf/OpenFinData/pull/31/files#diff-5091421a63390cc07405120977bf48ffe797a581d8f1d9bb6622f44469704d15
src/findata/api/_b3_common.pyhttps://github.com/robertoecf/OpenFinData/pull/31/files#diff-32df0d634750590fe95940dad6d1684f6aabaa9467dbd994f3edec2258e667e8
View file https://github.com/robertoecf/OpenFinData/blob/3f88dd730328ca9e56c373de79f539de6e67e8e7/src/findata/api/_b3_common.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/robertoecf/OpenFinData/pull/31/{{ revealButtonHref }}
coderabbitaihttps://github.com/apps/coderabbitai
Jun 27, 2026https://github.com/robertoecf/OpenFinData/pull/31/files#r3485258562
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/robertoecf/OpenFinData/pull/31/files
gemini-code-assisthttps://github.com/apps/gemini-code-assist
Jun 27, 2026https://github.com/robertoecf/OpenFinData/pull/31/files#r3485252286
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://camo.githubusercontent.com/7559374fd248a2a146dfe7112beda558979c4f6d02dbe7c5161fd893fe834423/68747470733a2f2f7777772e677374617469632e636f6d2f636f64657265766965776167656e742f686967682d7072696f726974792e737667
Please reload this pagehttps://github.com/robertoecf/OpenFinData/pull/31/files
src/findata/api/mcp_app.pyhttps://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
View file https://github.com/robertoecf/OpenFinData/blob/3f88dd730328ca9e56c373de79f539de6e67e8e7/src/findata/api/mcp_app.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/robertoecf/OpenFinData/pull/31/{{ revealButtonHref }}
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-561d36095b4935be1920291d07c802ef9f5b113b54069173cda396b50047d77b
src/findata/api/routers/anbima.pyhttps://github.com/robertoecf/OpenFinData/pull/31/files#diff-b7c52246dda6cf7ec52928f4b087441f76c2eacde0ffd0bb6d8ed3996c980064
View file https://github.com/robertoecf/OpenFinData/blob/3f88dd730328ca9e56c373de79f539de6e67e8e7/src/findata/api/routers/anbima.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/robertoecf/OpenFinData/pull/31/{{ revealButtonHref }}
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-b7c52246dda6cf7ec52928f4b087441f76c2eacde0ffd0bb6d8ed3996c980064
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-b7c52246dda6cf7ec52928f4b087441f76c2eacde0ffd0bb6d8ed3996c980064
src/findata/api/routers/b3.pyhttps://github.com/robertoecf/OpenFinData/pull/31/files#diff-c00008a05984956b996f7baa6c442eef13cdb11df92d3386e2f1856b2b61a689
View file https://github.com/robertoecf/OpenFinData/blob/3f88dd730328ca9e56c373de79f539de6e67e8e7/src/findata/api/routers/b3.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/robertoecf/OpenFinData/pull/31/{{ revealButtonHref }}
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-c00008a05984956b996f7baa6c442eef13cdb11df92d3386e2f1856b2b61a689
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-c00008a05984956b996f7baa6c442eef13cdb11df92d3386e2f1856b2b61a689
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-c00008a05984956b996f7baa6c442eef13cdb11df92d3386e2f1856b2b61a689
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-c00008a05984956b996f7baa6c442eef13cdb11df92d3386e2f1856b2b61a689
src/findata/sources/anbima/indices.pyhttps://github.com/robertoecf/OpenFinData/pull/31/files#diff-5091421a63390cc07405120977bf48ffe797a581d8f1d9bb6622f44469704d15
View file https://github.com/robertoecf/OpenFinData/blob/3f88dd730328ca9e56c373de79f539de6e67e8e7/src/findata/sources/anbima/indices.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/robertoecf/OpenFinData/pull/31/{{ revealButtonHref }}
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-5091421a63390cc07405120977bf48ffe797a581d8f1d9bb6622f44469704d15
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-5091421a63390cc07405120977bf48ffe797a581d8f1d9bb6622f44469704d15
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-5091421a63390cc07405120977bf48ffe797a581d8f1d9bb6622f44469704d15
https://github.com/robertoecf/OpenFinData/pull/31/files#diff-5091421a63390cc07405120977bf48ffe797a581d8f1d9bb6622f44469704d15
Please reload this pagehttps://github.com/robertoecf/OpenFinData/pull/31/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.