Skip to content

Latest commit

Β 

History

History
66 lines (50 loc) Β· 3.23 KB

File metadata and controls

66 lines (50 loc) Β· 3.23 KB

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

  • MarketService and AsyncMarketService β€” sync and async service facades with matching method signatures
  • create_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 snapshot
  • get_index(index_name) β€” any supported NSE index snapshot
  • get_stock(symbol) β€” single-symbol equity quote
  • get_bulk_stocks(symbols) β€” multi-symbol equity quotes with registry-guided batching
  • get_option_chain(symbol, expiry=None) β€” option chain with nearest-expiry default
  • get_option_chain_expiries(symbol) β€” discover all available expiry dates
  • get_futures_data(symbol) β€” F&O futures snapshot
  • get_delivery_data(symbol) β€” delivery / DPIIT data
  • get_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

  • Settings via pydantic-settings β€” all parameters configurable via environment variables with NSEFETCH_ 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