Skip to content

Commit

Permalink
update references
Browse files Browse the repository at this point in the history
  • Loading branch information
thinh-vu committed May 17, 2022
1 parent 5824bdd commit e9d5780
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = vnstock
version = 0.0.9
version = 0.1.0
author = Thinh Vu
author_email = [email protected]
description = Vietnam Stock Market Data
Expand Down
Binary file modified src/tcbs_trading_board_sector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion vnstock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Binary file removed vnstock/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file removed vnstock/__pycache__/stock.cpython-39.pyc
Binary file not shown.
4 changes: 4 additions & 0 deletions vnstock/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e9d5780

Please sign in to comment.