Yfinance Market Data
Yfinance Market Data: Yfinance Market Data: specialized toolkit for 3+ finance workflows covered in the triggers section.
Overview
Constraints
Evidence Quality
Medium confidence — review before critical use
31 non-negotiable constraints
WHENWhen implementing HTTP session initialization for Yahoo API
ACTIONUse curl_cffi.requests.Session with impersonate='chrome'
CONSEQUENCEYahoo's non-browser client blocking detects and rejects requests from standard HTTP libraries, resulting in 403 Forbidden errors and complete data access failure
WHENWhen handling HTTP request errors for Yahoo API
ACTIONRetry only transient errors (TimeoutError, socket.error, OSError, ConnectionError) and raise for permanent errors
CONSEQUENCERetrying permanent errors like ValueError or KeyError wastes resources and masks underlying code bugs instead of surfacing them for proper debugging
WHENWhen making HTTP requests to Yahoo API endpoints
ACTIONInclude crumb and cookie authentication with every request
CONSEQUENCEWithout proper crumb authentication, Yahoo API returns 401 Unauthorized or HTML error pages instead of JSON data, breaking all downstream data processing
FAQ
Discussion (0)
No comments yet. Be the first to share!
Changelog
v0.1.0: Initial release on Doramagic.ai. Auto-generated batch-v1 metadata and FAQs based on tangweigang-jpg/doramagic-skills.