bdshare


Namebdshare JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryA utility for crawling historical and Real-time Quotes of DSE(Dhaka Stock Exchange)
upload_time2024-07-29 08:10:37
maintainerNone
docs_urlNone
authorRaisul Islam
requires_python>=3.6
licenseMIT
keywords crawling dse financial data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            #Bdshare                                                             
---


[![Documentation Status](https://readthedocs.org/projects/bdshare/badge/?version=latest)](https://bdshare.readthedocs.io/en/latest/?badge=latest)
![PyPI](https://img.shields.io/pypi/v/bdshare)
![StyleCI](https://github.styleci.io/repos/253465924/shield?branch=master)


A utility for crawling historical and Real-time data from stock exchanges of Bangladesh. At present this utility can collect data from Dhaka stock exchange.

### <a name="contents"></a>Contents
- [Installation](#install)
- [Example Use](#usage)
- [List of functions](#functions)
- [Todo's and Road Map:](#roadmap)


## Quickstart

### <a name="install"></a>[Installation](#contents)

```sh
$ pip install bdshare
```
or upgrade
```sh
$ pip install -U bdshare
```

### <a name="usage"></a>[Example Use](#contents)

#### Get DSE last or current trading data
```python
from bdshare import get_current_trade_data

df = get_current_trade_data()
print(df.to_string())
```
```python
from bdshare import get_current_trade_data

df = get_current_trade_data('GP') # get specific instrument data
print(df.to_string())
```

#### Get historical data
```python
from bdshare import get_hist_data

df = get_hist_data('2022-03-01','2022-03-02') # get all instrument data
print(df.to_string())
```
or
```python
from bdshare import get_hist_data

df = get_hist_data('2022-03-01','2022-03-02','ACI') # get specific instrument data
print(df.to_string())
```

#### Get OHLCV historical data
```python
from bdshare import get_basic_hist_data

df = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data
print(df.to_string())
```
or
```python
from bdshare import get_basic_hist_data

df = get_basic_hist_data('2022-03-01','2022-03-02','GP') # get specific instrument data
print(df.to_string())
```

#### Get DSE Index data
```python
from bdshare import get_market_inf

df = get_market_inf() # get last 30 days market data
print(df.to_string())
```

```python
from bdshare import get_market_inf_more_data

df = get_market_inf_more_data('2022-03-01','2022-03-02') # get historical market data
print(df.to_string())
```

#### Get DSE Market Depth data
```python
from bdshare import get_market_depth_data

df = get_market_depth_data('ACI') # get current buy and sell data
print(df.to_string())
```

#### Save data to csv file
```python
from bdshare import get_basic_hist_data, Store

df = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data
Store(df).save()
```

### <a name="functions"></a> [List of functions](#contents)

#### Trading data
|Function|Params|Description|
|---|---|---|
|get_current_trade_data()|symbol:str|get last stock price|
|get_dsex_data()|symbol:str|get dseX share price|
|get_current_trading_code()||get last stock codes|
|get_hist_data()|start:str, end:str|get historical stock price|
|get_basic_hist_data()|start:str, end:str, code:str|get historical stock price|
|get_close_price_data()|start:str, end:str, code:str|get stock close price|
|get_last_trade_price_data()|||

#### Trading news
|Function|Params|Description|
|---|---|---|
|get_agm_news()||get stock agm declarations|
|get_all_news()|start:str, end:str, code:str|get dse news|

#### Market data
|Function|Params|Description|
|---|---|---|
|get_market_inf()||get stock market information|
|get_latest_pe()||get last stock P/E|
|get_market_inf_more_data()|start:str, end:str|get historical stock price|
|get_market_depth_data()|index:str|get_market_depth_data('ACI')|

### <a name="roadmap"></a> [TODO's and Road Map:](#contents)
 - [x] refine logic for parameters 
 - [x] Demo example;
 - [x] DSE daily data and historical data crawling
 - [x] DSE news,p/e crawling
 - [x] Add DSEX Index data support
 - [x] Create tests
 - [x] Store dat to csv
 - [x] DSE market depth data
 - [x] Add docker support in demo example


### Documentation

Complete documentation can be found at [Readthedocs](http://bdshare.readthedocs.io/en/latest/ "bdshare's readthedocs") .


## Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to
review the [guidelines for contributing](CONTRIBUTING.md).

* [Bug reports](CONTRIBUTING.md#bugs)
* [Feature requests](CONTRIBUTING.md#features)
* [Pull requests](CONTRIBUTING.md#pull-requests)

# Change log

## [1.0.3] - 2024-07-29

### Added

- n/a

### Changed

- n/a

### Fixed

- check fix for latest P/E url [#6]

## [1.0.2] - 2024-07-29

### Added

- n/a

### Changed

- n/a

### Fixed

- fixed latest P/E url [#6]

## [1.0.0] - 2024-03-04

### Added

- Updated docs

### Changed

- n/a

## [0.7.2] - 2024-03-04

### Added

- Updated docs

### Changed

- n/a

## [0.7.1] - 2024-03-04

### Added

- n/a

### Changed

- fixed market depth data api

## [0.7.0] - 2024-03-04

### Added

- n/a

### Changed

- n/a

## [0.6.0] - 2024-03-03

### Added

- n/a

### Changed

- n/a

## [0.5.1] - 2024-02-29

### Added

- n/a

### Changed

- n/a

## [0.5.0] - 2024-02-29

### Added

- fixed store datafrave to csv file method

### Changed

- n/a

## [0.4.0] - 2023-03-12

### Added

- n/a

### Changed

- changed package manager

## [0.3.2] - 2022-10-10

### Added

- n/a

### Changed

- n/a

## [0.3.1] - 2022-06-15

### Added

- n/a

### Changed

- n/a

## [0.2.1] - 2021-08-01

### Added

-

### Changed

- `get_current_trading_code()`

## [0.2.0] - 2021-06-01

### Added

- added get_market_depth_data
- added get_dsex_data
- added 'dse.com.bd' as redundant

### Changed

- Changed documentation
- changed get_agm_news
- changed get_all_news

## [0.1.4] - 2020-08-22

### Added

- added get_market_inf_more_data

### Changed

- Changed documentation

## [0.1.3] - 2020-08-20

### Added

- html5lib
- added get params

### Changed

- post request to get

## [0.1.2] - 2020-05-21

### Added

- modified index declaration

## [0.1.1] - 2020-05-20

### Added

- modified index declaration

## [0.1.0] - 2020-04-08

### Added

- added git tag
- `VERSION.txt`

### Changed

- `setup.py`
- `HISTORY.md` to `CHANGELOG.md`

## [0.0.1] - 2020-04-06

### Added

- `get_hist_data(), get_current_trade_data()`
- `HISTORY.md`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bdshare",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "Crawling, DSE, Financial Data",
    "author": "Raisul Islam",
    "author_email": "raisul.me@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d3/90/f737b27d4c2dc2026e565910ed0fe67a30b1ff820193259991595fc1f296/bdshare-1.0.3.tar.gz",
    "platform": null,
    "description": "#Bdshare                                                             \n---\n\n\n[![Documentation Status](https://readthedocs.org/projects/bdshare/badge/?version=latest)](https://bdshare.readthedocs.io/en/latest/?badge=latest)\n![PyPI](https://img.shields.io/pypi/v/bdshare)\n![StyleCI](https://github.styleci.io/repos/253465924/shield?branch=master)\n\n\nA utility for crawling historical and Real-time data from stock exchanges of Bangladesh. At present this utility can collect data from Dhaka stock exchange.\n\n### <a name=\"contents\"></a>Contents\n- [Installation](#install)\n- [Example Use](#usage)\n- [List of functions](#functions)\n- [Todo's and Road Map:](#roadmap)\n\n\n## Quickstart\n\n### <a name=\"install\"></a>[Installation](#contents)\n\n```sh\n$ pip install bdshare\n```\nor upgrade\n```sh\n$ pip install -U bdshare\n```\n\n### <a name=\"usage\"></a>[Example Use](#contents)\n\n#### Get DSE last or current trading data\n```python\nfrom bdshare import get_current_trade_data\n\ndf = get_current_trade_data()\nprint(df.to_string())\n```\n```python\nfrom bdshare import get_current_trade_data\n\ndf = get_current_trade_data('GP') # get specific instrument data\nprint(df.to_string())\n```\n\n#### Get historical data\n```python\nfrom bdshare import get_hist_data\n\ndf = get_hist_data('2022-03-01','2022-03-02') # get all instrument data\nprint(df.to_string())\n```\nor\n```python\nfrom bdshare import get_hist_data\n\ndf = get_hist_data('2022-03-01','2022-03-02','ACI') # get specific instrument data\nprint(df.to_string())\n```\n\n#### Get OHLCV historical data\n```python\nfrom bdshare import get_basic_hist_data\n\ndf = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data\nprint(df.to_string())\n```\nor\n```python\nfrom bdshare import get_basic_hist_data\n\ndf = get_basic_hist_data('2022-03-01','2022-03-02','GP') # get specific instrument data\nprint(df.to_string())\n```\n\n#### Get DSE Index data\n```python\nfrom bdshare import get_market_inf\n\ndf = get_market_inf() # get last 30 days market data\nprint(df.to_string())\n```\n\n```python\nfrom bdshare import get_market_inf_more_data\n\ndf = get_market_inf_more_data('2022-03-01','2022-03-02') # get historical market data\nprint(df.to_string())\n```\n\n#### Get DSE Market Depth data\n```python\nfrom bdshare import get_market_depth_data\n\ndf = get_market_depth_data('ACI') # get current buy and sell data\nprint(df.to_string())\n```\n\n#### Save data to csv file\n```python\nfrom bdshare import get_basic_hist_data, Store\n\ndf = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data\nStore(df).save()\n```\n\n### <a name=\"functions\"></a> [List of functions](#contents)\n\n#### Trading data\n|Function|Params|Description|\n|---|---|---|\n|get_current_trade_data()|symbol:str|get last stock price|\n|get_dsex_data()|symbol:str|get dseX share price|\n|get_current_trading_code()||get last stock codes|\n|get_hist_data()|start:str, end:str|get historical stock price|\n|get_basic_hist_data()|start:str, end:str, code:str|get historical stock price|\n|get_close_price_data()|start:str, end:str, code:str|get stock close price|\n|get_last_trade_price_data()|||\n\n#### Trading news\n|Function|Params|Description|\n|---|---|---|\n|get_agm_news()||get stock agm declarations|\n|get_all_news()|start:str, end:str, code:str|get dse news|\n\n#### Market data\n|Function|Params|Description|\n|---|---|---|\n|get_market_inf()||get stock market information|\n|get_latest_pe()||get last stock P/E|\n|get_market_inf_more_data()|start:str, end:str|get historical stock price|\n|get_market_depth_data()|index:str|get_market_depth_data('ACI')|\n\n### <a name=\"roadmap\"></a> [TODO's and Road Map:](#contents)\n - [x] refine logic for parameters \n - [x] Demo example;\n - [x] DSE daily data and historical data crawling\n - [x] DSE news,p/e crawling\n - [x] Add DSEX Index data support\n - [x] Create tests\n - [x] Store dat to csv\n - [x] DSE market depth data\n - [x] Add docker support in demo example\n\n\n### Documentation\n\nComplete documentation can be found at [Readthedocs](http://bdshare.readthedocs.io/en/latest/ \"bdshare's readthedocs\") .\n\n\n## Contributing to this project\n\nAnyone and everyone is welcome to contribute. Please take a moment to\nreview the [guidelines for contributing](CONTRIBUTING.md).\n\n* [Bug reports](CONTRIBUTING.md#bugs)\n* [Feature requests](CONTRIBUTING.md#features)\n* [Pull requests](CONTRIBUTING.md#pull-requests)\n\n# Change log\n\n## [1.0.3] - 2024-07-29\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n### Fixed\n\n- check fix for latest P/E url [#6]\n\n## [1.0.2] - 2024-07-29\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n### Fixed\n\n- fixed latest P/E url [#6]\n\n## [1.0.0] - 2024-03-04\n\n### Added\n\n- Updated docs\n\n### Changed\n\n- n/a\n\n## [0.7.2] - 2024-03-04\n\n### Added\n\n- Updated docs\n\n### Changed\n\n- n/a\n\n## [0.7.1] - 2024-03-04\n\n### Added\n\n- n/a\n\n### Changed\n\n- fixed market depth data api\n\n## [0.7.0] - 2024-03-04\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n## [0.6.0] - 2024-03-03\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n## [0.5.1] - 2024-02-29\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n## [0.5.0] - 2024-02-29\n\n### Added\n\n- fixed store datafrave to csv file method\n\n### Changed\n\n- n/a\n\n## [0.4.0] - 2023-03-12\n\n### Added\n\n- n/a\n\n### Changed\n\n- changed package manager\n\n## [0.3.2] - 2022-10-10\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n## [0.3.1] - 2022-06-15\n\n### Added\n\n- n/a\n\n### Changed\n\n- n/a\n\n## [0.2.1] - 2021-08-01\n\n### Added\n\n-\n\n### Changed\n\n- `get_current_trading_code()`\n\n## [0.2.0] - 2021-06-01\n\n### Added\n\n- added get_market_depth_data\n- added get_dsex_data\n- added 'dse.com.bd' as redundant\n\n### Changed\n\n- Changed documentation\n- changed get_agm_news\n- changed get_all_news\n\n## [0.1.4] - 2020-08-22\n\n### Added\n\n- added get_market_inf_more_data\n\n### Changed\n\n- Changed documentation\n\n## [0.1.3] - 2020-08-20\n\n### Added\n\n- html5lib\n- added get params\n\n### Changed\n\n- post request to get\n\n## [0.1.2] - 2020-05-21\n\n### Added\n\n- modified index declaration\n\n## [0.1.1] - 2020-05-20\n\n### Added\n\n- modified index declaration\n\n## [0.1.0] - 2020-04-08\n\n### Added\n\n- added git tag\n- `VERSION.txt`\n\n### Changed\n\n- `setup.py`\n- `HISTORY.md` to `CHANGELOG.md`\n\n## [0.0.1] - 2020-04-06\n\n### Added\n\n- `get_hist_data(), get_current_trade_data()`\n- `HISTORY.md`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A utility for crawling historical and Real-time Quotes of DSE(Dhaka Stock Exchange)",
    "version": "1.0.3",
    "project_urls": null,
    "split_keywords": [
        "crawling",
        " dse",
        " financial data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be7e1df89738e43e734a0c8fbe7995a47426dca9a17005d386eb050bed2b3d59",
                "md5": "c5fdc556028f002bf1beace15178a351",
                "sha256": "fe40a45ab6f39d10cb262b8c443da7b3af467e114226f251235ea8eeec59dc1c"
            },
            "downloads": -1,
            "filename": "bdshare-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c5fdc556028f002bf1beace15178a351",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 15992,
            "upload_time": "2024-07-29T08:10:35",
            "upload_time_iso_8601": "2024-07-29T08:10:35.856449Z",
            "url": "https://files.pythonhosted.org/packages/be/7e/1df89738e43e734a0c8fbe7995a47426dca9a17005d386eb050bed2b3d59/bdshare-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d390f737b27d4c2dc2026e565910ed0fe67a30b1ff820193259991595fc1f296",
                "md5": "e26446d19b10728c191902066341a76e",
                "sha256": "96079429a0d1806dde961a1352c819b428b5c9f7f260f15fa7c4608615574559"
            },
            "downloads": -1,
            "filename": "bdshare-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e26446d19b10728c191902066341a76e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 12004,
            "upload_time": "2024-07-29T08:10:37",
            "upload_time_iso_8601": "2024-07-29T08:10:37.399476Z",
            "url": "https://files.pythonhosted.org/packages/d3/90/f737b27d4c2dc2026e565910ed0fe67a30b1ff820193259991595fc1f296/bdshare-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-29 08:10:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "bdshare"
}
        
Elapsed time: 1.35914s