Releases: rochi88/bdshare
Releases · rochi88/bdshare
Release list
v1.2.3
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 thetalibrary, operating on the OHLCV DataFrames returned byget_basic_historical_data(); install withpip install bdshare[ta]bdshare/portfolio.py—Portfolio/Positionclasses for tracking cost basis and valuing holdings against live prices (holdings(),valuation(),summary()); one live call for all instruments regardless of portfolio sizebdshare/stream.py— polling-based WebSocket tick streaming (stream_ticks(),TickServer); broadcasts changed rows fromget_current_trade_data()to connected clients so another program can subscribe overws://instead of polling itself. DSE has no push API, so this is poll-and-diff under a WebSocket-shaped interface, not true push. Install withpip install bdshare[stream], run withbdshare-streamdemo/streamlit/streamlit_app.py— full-feature Streamlit dashboard showcasing every public feature in one app: live trading data, historical charts withbdshare.indicatorsoverlays, market movers, news,bdshare.portfoliotracking, live-tick polling, and an interactive AI-agent (MCP) tool explorer. Runs viadocker compose up --build streamlit(demo/streamlit/Dockerfile, builds bdshare from local source so unreleased features are included) or locally withpip install -e ".[ta,stream]"+streamlit run demo/streamlit/streamlit_app.pydemo/reorganized intodemo/flask/,demo/streamlit/, anddemo/node/, all built fromdemo/docker-compose.ymlwith a repo-root build context; documented indemo/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-localhostHostheaderdemo/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, tobdshare-mcp --transport streamable-httpover MCP via the official@modelcontextprotocol/sdk, and tobdshare-streamover WebSocket (relayed to the browser). Run viadocker compose up --build node node-api mcp streamor locally perdemo/README.md
Fixed
bdshare.BDShareError(the publicly exported/documented exception) was a different class frombdshare.util.helper.BDShareError, the one every scraping function actually raises —except bdshare.BDShareErrorsilently never caught real errors.bdshare/__init__.pynow re-exports the same class instead of redefining itdemo/app.py:convert_to_native_types()calledpd.isna(obj)before checking whetherobjwas a list/dict, crashing withValueError: The truth value of an array... is ambiguouson any chart request; container types are now checked firstdemo/app.py:get_available_tickers()checked for atrading_codecolumn that doesn't exist onget_current_trade_data()'s output (symboldoes), so it always silently fell back to the hardcoded stock listdemo/Dockerfile: base imagepython:3.11-slim-busteris EOL (Debian Buster archived), soapt-get updatewould fail on a fresh build; switched topython:3.11-slim
v1.2.2
Full Changelog: v1.2.1...v1.2.2
Added
- Optional
as_polars=Trueparameter across all data-fetching functions to returnpolars.DataFrameinstead ofpandas.DataFrame(requirespip 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 withpip install bdshare[mcp], run withbdshare-mcp
Changed
- Renamed
get_top_gainers_losers()→get_top_ten_gainers_losers(); returned columns changed fromsymbol, ltp, changetosymbol, close, high, low, ycp, change
Removed
get_sector_performance()(module function andBDShare.get_sector_performance()) — no aliased replacement; useget_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_URLfallback domain todse.com.bd get_corporate_announcements()andget_price_sensitive_news()always raisedBDShareError— 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 pairas_polars=Truecould crash withunexpected value while building Series of type String; found value of type Float64: NaNon 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 hadget_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
v1.2.0
v1.1.6
v1.1.5
v1.1.4
What's Changed
- Fix major function issues v1.1.4 by @masud1901 in #11
New Contributors
- @masud1901 made their first contribution in #11
Full Changelog: v1.1.2...v1.1.4