diff --git a/README.md b/README.md index 59a04790..396427fe 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,18 @@ Output: 4 BVL UpcomIndex Công ty Cổ phần BV Land BV Land ``` +### Ticker overview +```python +ticker_overview('TCB') +``` + +Output: +``` +>>> ticker_overview('TCB') + exchange shortName industryID industryIDv2 industry ... deltaInMonth deltaInYear outstandingShare issueShare ticker +0 HOSE Techcombank 289 8355 Ngân hàng ... -0.027 -0.038 3510.9 3510.9 TCB +``` + ### 📈 Historical Data Retrieval vnstock allows the user to **download stock historical data from TCBS**. In diff --git a/setup.cfg b/setup.cfg index ce0a88de..eeddd087 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = vnstock -version = 0.0.9 +version = 0.1.0 author = Thinh Vu author_email = mrthinh@live.com description = Vietnam Stock Market Data diff --git a/src/tcbs_trading_board_sector.png b/src/tcbs_trading_board_sector.png index 69a46a23..697a1bb5 100644 Binary files a/src/tcbs_trading_board_sector.png and b/src/tcbs_trading_board_sector.png differ diff --git a/vnstock/__init__.py b/vnstock/__init__.py index 8c2c198c..62463582 100644 --- a/vnstock/__init__.py +++ b/vnstock/__init__.py @@ -2,10 +2,11 @@ # See LICENSE for details. __author__ = "Thinh Vu @thinh-vu in GitHub" -__version__ = "0.0.9" +__version__ = "0.1.0" from .stock import ( listing_companies, + ticker_overview, last_xd, start_xm, stock_historical_data, diff --git a/vnstock/__pycache__/__init__.cpython-39.pyc b/vnstock/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index 7d45deb1..00000000 Binary files a/vnstock/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/vnstock/__pycache__/stock.cpython-39.pyc b/vnstock/__pycache__/stock.cpython-39.pyc deleted file mode 100644 index 9947c9d0..00000000 Binary files a/vnstock/__pycache__/stock.cpython-39.pyc and /dev/null differ diff --git a/vnstock/stock.py b/vnstock/stock.py index ac159bca..b9a8ea37 100644 --- a/vnstock/stock.py +++ b/vnstock/stock.py @@ -42,6 +42,10 @@ def listing_companies (): df = pd.DataFrame(r['items']).drop(columns=['organCode', 'icbCode', 'organTypeCode', 'comTypeCode']).rename(columns={'comGroupCode': 'group_code', 'organName': 'company_name', 'organShortName':'company_short_name'}) return df +def ticker_overview (symbol): + data = requests.get('https://apipubaws.tcbs.com.vn/tcanalysis/v1/ticker/{}/overview'.format(symbol)).json() + df = json_normalize(data) + return df ## STOCK TRADING HISTORICAL DATA def stock_historical_data (symbol, start_date, end_date):