Skip to content

Releases: rochi88/bdshare

v1.2.3

Choose a tag to compare

@rochi88 rochi88 released this 21 Jul 20:41

Full Changelog: v1.2.2...v1.2.3

Added

  • bdshare/indicators.py — technical indicator helpers (add_sma, add_ema, add_rsi, add_macd, add_bollinger_bands, add_indicators) built on the ta library, operating on the OHLCV DataFrames returned by get_basic_historical_data(); install with pip install bdshare[ta]
  • bdshare/portfolio.pyPortfolio/Position classes for tracking cost basis and valuing holdings against live prices (holdings(), valuation(), summary()); one live call for all instruments regardless of portfolio size
  • bdshare/stream.py — polling-based WebSocket tick streaming (stream_ticks(), TickServer); broadcasts changed rows from get_current_trade_data() to connected clients so another program can subscribe over ws:// instead of polling itself. DSE has no push API, so this is poll-and-diff under a WebSocket-shaped interface, not true push. Install with pip install bdshare[stream], run with bdshare-stream
  • demo/streamlit/streamlit_app.py — full-feature Streamlit dashboard showcasing every public feature in one app: live trading data, historical charts with bdshare.indicators overlays, market movers, news, bdshare.portfolio tracking, live-tick polling, and an interactive AI-agent (MCP) tool explorer. Runs via docker compose up --build streamlit (demo/streamlit/Dockerfile, builds bdshare from local source so unreleased features are included) or locally with pip install -e ".[ta,stream]" + streamlit run demo/streamlit/streamlit_app.py
  • demo/ reorganized into demo/flask/, demo/streamlit/, and demo/node/, all built from demo/docker-compose.yml with a repo-root build context; documented in demo/README.md (previously an unrelated generic Flask/Plotly readme with no mention of bdshare or Docker)
  • bdshare-mcp --transport streamable-http --host 0.0.0.0 --port 8000 — the MCP server can now run over the network instead of only stdio, for clients that can't spawn it as a local child process (a different language, another container). Binding beyond loopback auto-disables DNS-rebinding protection, since every legitimate client then arrives with a non-localhost Host header
  • demo/node/ — a four-service showcase of consuming bdshare from outside Python: an Express UI (demo/node/server, never imports bdshare) talking to a FastAPI backend (demo/node/api, bdshare functions as JSON REST) over REST, to bdshare-mcp --transport streamable-http over MCP via the official @modelcontextprotocol/sdk, and to bdshare-stream over WebSocket (relayed to the browser). Run via docker compose up --build node node-api mcp stream or locally per demo/README.md

Fixed

  • bdshare.BDShareError (the publicly exported/documented exception) was a different class from bdshare.util.helper.BDShareError, the one every scraping function actually raises — except bdshare.BDShareError silently never caught real errors. bdshare/__init__.py now re-exports the same class instead of redefining it
  • demo/app.py: convert_to_native_types() called pd.isna(obj) before checking whether obj was a list/dict, crashing with ValueError: The truth value of an array... is ambiguous on any chart request; container types are now checked first
  • demo/app.py: get_available_tickers() checked for a trading_code column that doesn't exist on get_current_trade_data()'s output (symbol does), so it always silently fell back to the hardcoded stock list
  • demo/Dockerfile: base image python:3.11-slim-buster is EOL (Debian Buster archived), so apt-get update would fail on a fresh build; switched to python:3.11-slim

v1.2.2

Choose a tag to compare

@rochi88 rochi88 released this 21 Jul 18:53

Full Changelog: v1.2.1...v1.2.2

Added

  • Optional as_polars=True parameter across all data-fetching functions to return polars.DataFrame instead of pandas.DataFrame (requires pip install bdshare[polars])
  • get_market_status() — current market status (Open, Closed, Holiday, etc.)
  • get_top_twenty_shares() — top twenty shares by traded volume
  • MCP (Model Context Protocol) server (bdshare/mcp_server.py) exposing 15 tools so AI agents (Claude Desktop, Claude Code, etc.) can call live DSE data directly; install with pip install bdshare[mcp], run with bdshare-mcp

Changed

  • Renamed get_top_gainers_losers()get_top_ten_gainers_losers(); returned columns changed from symbol, ltp, change to symbol, close, high, low, ycp, change

Removed

  • get_sector_performance() (module function and BDShare.get_sector_performance()) — no aliased replacement; use get_top_twenty_shares() instead

Fixed

  • Bundled the missing Sectigo DV R36 intermediate certificate so requests to dsebd.org verify correctly instead of relying on an incomplete chain
  • Corrected DSE_ALT_URL fallback domain to dse.com.bd
  • get_corporate_announcements() and get_price_sensitive_news() always raised BDShareError — the row parser assumed each news item was one <tr> with 4 <td>s, but DSE renders each field (Trading Code:, News Title:, News:, Post Date:) as its own <th>/<td> row pair
  • as_polars=True could crash with unexpected value while building Series of type String; found value of type Float64: NaN on tables mixing strings and missing values (e.g. get_company_info()); NaN now converts to a proper polars null instead
  • Corrected usage.rst/README documentation that had get_historical_data()/get_basic_historical_data() mislabeled as the deprecated aliases — get_hist_data()/get_basic_hist_data() are the deprecated ones

v1.2.1

Choose a tag to compare

@rochi88 rochi88 released this 22 Feb 16:31

Full Changelog: v1.2.0...v1.2.1

v1.2.0

Choose a tag to compare

@rochi88 rochi88 released this 21 Feb 05:43

Full Changelog: v1.1.6...v1.2.0

v1.1.6

Choose a tag to compare

@rochi88 rochi88 released this 20 Feb 16:41

Full Changelog: v1.1.6...v1.1.6

v1.1.5

Choose a tag to compare

@rochi88 rochi88 released this 20 Feb 16:17

Full Changelog: v1.1.4...v1.1.5

v1.1.4

Choose a tag to compare

@rochi88 rochi88 released this 23 Oct 18:08
e2b7d86

What's Changed

New Contributors

Full Changelog: v1.1.2...v1.1.4

v1.1.2

Choose a tag to compare

@rochi88 rochi88 released this 31 Dec 10:49

Full Changelog: v1.1.1...v1.1.2

v1.1.0

Choose a tag to compare

@rochi88 rochi88 released this 31 Dec 09:49

Full Changelog: v1.0.4...v1.1.0

v1.0.3

Choose a tag to compare

@rochi88 rochi88 released this 29 Jul 08:09

Full Changelog: v1.0.2...v1.0.3