Releases: harsh-kumar-rai/nsefetch
Releases · harsh-kumar-rai/nsefetch
Release list
v0.1.0 — Initial Release
Changelog
All notable changes to nsefetch will be documented in this file.
The format follows Keep a Changelog.
This project adheres to Semantic Versioning.
0.1.0 — 2026-05-15
Initial public release. 🎉
Added
Core Data Engine
MarketServiceandAsyncMarketService— sync and async service facades with matching method signaturescreate_market_service(),create_cached_market_service(),create_production_market_service()— convenience constructors for all three runtime modes- Equivalent async constructors:
create_async_market_service(),create_async_cached_market_service(),create_async_production_market_service()
Market Data Methods (all 10 endpoints)
get_nifty50()— NIFTY 50 index snapshotget_index(index_name)— any supported NSE index snapshotget_stock(symbol)— single-symbol equity quoteget_bulk_stocks(symbols)— multi-symbol equity quotes with registry-guided batchingget_option_chain(symbol, expiry=None)— option chain with nearest-expiry defaultget_option_chain_expiries(symbol)— discover all available expiry datesget_futures_data(symbol)— F&O futures snapshotget_delivery_data(symbol)— delivery / DPIIT dataget_market_depth(symbol)— level-2 order book (optional data)get_sector_data()— all sector snapshots
Response Envelope
ResponseEnvelope[T]— stable transport-agnostic metadata on every response:success,provider,request_id,fetched_at,stale,cache_hit,degraded,degraded_reason,warnings,data
Reliability Infrastructure
- Circuit breaker with configurable failure threshold and recovery window
- GCRA (Generic Cell Rate Algorithm) rate limiter — Redis-backed or in-memory
- Cache layer — Redis-backed or in-memory with per-operation TTLs
- Stale cache fallback — serves cached data on live fetch failure within degraded stale window
- In-flight request coalescing — deduplicates concurrent identical requests within a process
- Degraded state propagation — Redis / rate-limiter failures surfaced in response envelope
HTTP Transport
NSEHttpClient/AsyncNSEHttpClient—curl_cffi-based browser-impersonating session with automatic cookie bootstrap- Swappable transport boundary — pluggable live/test transport
RetryPolicy— bounded exponential-backoff retries on transient failures
Tooling
- Live connectivity probe:
python -m nsefetch.live_probe(transport-level) - Service-level probe:
python -m nsefetch.live_probe --service - Combined:
python -m nsefetch.live_probe --all - Probe gated behind
NSEFETCH_LIVE_PROBE_ENABLED=1— safe to run in CI
Configuration
Settingsviapydantic-settings— all parameters configurable via environment variables withNSEFETCH_prefix
Developer Experience
- 131 unit tests across 14 test modules (zero live-network calls in normal runs)
- Full Pydantic v2 typed schemas for all response data
- Context-manager support:
with MarketService() as svc:/async with AsyncMarketService() as svc: - Python 3.12+ with full type annotations