bdshare


Namebdshare JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryA utility for crawling historical and Real-time Quotes of DSE(Dhaka Stock Exchange)
upload_time2024-03-05 05:36:47
maintainer
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.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": "",
    "name": "bdshare",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Crawling,DSE,Financial Data",
    "author": "Raisul Islam",
    "author_email": "raisul.me@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/ec/6b1e773e25225d8d3a9b24b54c0bf83e727b454a9746a366e179c165fb52/bdshare-1.0.1.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.0] - 2024-03-04\n\n### Added\n- Updated docs\n\n### Changed\n- n/a\n\n## [0.7.2] - 2024-03-04\n\n### Added\n- Updated docs\n\n### Changed\n- n/a\n\n## [0.7.1] - 2024-03-04\n\n### Added\n- n/a\n\n### Changed\n- fixed market depth data api\n\n## [0.7.0] - 2024-03-04\n\n### Added\n- n/a\n\n### Changed\n- n/a\n\n## [0.6.0] - 2024-03-03\n\n### Added\n- n/a\n\n### Changed\n- n/a\n\n## [0.5.1] - 2024-02-29\n\n### Added\n- n/a\n\n### Changed\n- n/a\n\n## [0.5.0] - 2024-02-29\n\n### Added\n- fixed store datafrave to csv file method\n\n### Changed\n- n/a\n\n## [0.4.0] - 2023-03-12\n\n### Added\n- n/a\n\n### Changed\n- changed package manager\n\n## [0.3.2] - 2022-10-10\n\n### Added\n- n/a\n\n### Changed\n- n/a\n\n## [0.3.1] - 2022-06-15\n\n### Added\n- n/a\n\n### Changed\n- n/a\n\n## [0.2.1] - 2021-08-01\n\n### Added\n- \n\n### Changed\n- `get_current_trading_code()`\n\n## [0.2.0] - 2021-06-01\n\n### Added\n- added get_market_depth_data\n- added get_dsex_data\n- added 'dse.com.bd' as redundant \n\n### Changed\n- Changed documentation\n- changed get_agm_news \n- changed get_all_news\n\n\n## [0.1.4] - 2020-08-22\n\n### Added\n- added get_market_inf_more_data\n\n### Changed\n- Changed documentation\n\n\n## [0.1.3] - 2020-08-20\n\n### Added\n- html5lib\n- added get params\n\n### Changed\n- post request to get\n\n\n## [0.1.2] - 2020-05-21\n\n### Added\n- modified index declaration\n\n\n## [0.1.1] - 2020-05-20\n\n### Added\n- modified index declaration\n\n\n## [0.1.0] - 2020-04-08\n\n### Added\n- added git tag\n- `VERSION.txt`\n\n### Changed\n- `setup.py`\n- `HISTORY.md` to `CHANGELOG.md`\n\n\n## [0.0.1] - 2020-04-06\n\n### Added\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.1",
    "project_urls": null,
    "split_keywords": [
        "crawling",
        "dse",
        "financial data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68658b683eb90c80227510bd7d5baed8a22583358de2e1db9f4411951b4a1fd6",
                "md5": "e14c335952d3d328afdabcb322ea27e8",
                "sha256": "75278f0f578a874c353cf8b2d18904240cb3946cedb0cfa9733fdf5d26bad9a0"
            },
            "downloads": -1,
            "filename": "bdshare-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e14c335952d3d328afdabcb322ea27e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 15626,
            "upload_time": "2024-03-05T05:36:45",
            "upload_time_iso_8601": "2024-03-05T05:36:45.319675Z",
            "url": "https://files.pythonhosted.org/packages/68/65/8b683eb90c80227510bd7d5baed8a22583358de2e1db9f4411951b4a1fd6/bdshare-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fec6b1e773e25225d8d3a9b24b54c0bf83e727b454a9746a366e179c165fb52",
                "md5": "e142a3a1557cb12c7507b24af141664e",
                "sha256": "020c8c493618440453acaa8bb05e1c72b6a1dada81a0f2e7d59f6be331ff8538"
            },
            "downloads": -1,
            "filename": "bdshare-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e142a3a1557cb12c7507b24af141664e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11844,
            "upload_time": "2024-03-05T05:36:47",
            "upload_time_iso_8601": "2024-03-05T05:36:47.167788Z",
            "url": "https://files.pythonhosted.org/packages/9f/ec/6b1e773e25225d8d3a9b24b54c0bf83e727b454a9746a366e179c165fb52/bdshare-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-05 05:36:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "bdshare"
}
        
Elapsed time: 0.22249s