Skip to main content

A package to download Vietnam stock market data

Project description

Introduction

batquant is a package that helps developers, researchers to quickly get Vietnam financial data. Since Vietnam is not well-supported by famous platform like Bloomberg, Reuters, Yahoo, Google, we were inspired to develop our own data package that serves Vietnam data.

Recent changes

v0.1.0 - 20190215:

  • First version
  • Data available: trading data only

Incoming: v0.2.0:

Add more data:
  • reference prices (ceiling, floor, ref price...)
  • stock info (company name, shareout, list of stocks)
Exception handler
Reference object to lookup for fields

Installation

pip install batdata

Usage

Init data object

import batdata
vnd = batdata.Vnd() # Data from VND api

Getting data

# historical data of HPG from 2018-01-01 to 2018-12-31
data = vnd.hist("HPG","close","20180101","20181231")

jsonData = data.json # getting data as json
dfData = data.df # getting data as pandas DataFrame

# fromTime and toTime can also be python datetime objects
fromTime = datetime.datetime(2018,01,01)
toTime = datetime.datetime(2018,12,31)
hpgHist = vnd.hist("HPG","close",fromTime,toTime)

# historical OHLC data of HPG, MSN
hpgHistWeekly = vnd.hist(["HPG","MSN"],["open","high","low","close"],"20180101","20181231",interval="w")

# last price
hpgLast = vnd.curr("HPG","last")


TODO

Financial fields reference

More data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batdata-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

batdata-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file batdata-0.1.0.tar.gz.

File metadata

  • Download URL: batdata-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for batdata-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85555671f08a9d35d24e796c9ed7d8f89b41a7881aba5bbcaf173aa05e253364
MD5 f9e113f6214bce6c21120d712e1da513
BLAKE2b-256 958d3e2900f775f4a7253dd9a99577845b9c114cfe6679cd3c2903b5e61e7639

See more details on using hashes here.

File details

Details for the file batdata-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: batdata-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for batdata-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69b6114ea93a119164990ad962b19163f2fe26b2b7ae576b5fb56ae41cd76f1b
MD5 bf77e795a63bf886ef3fcc3107dec094
BLAKE2b-256 0ee71a08d0827d4d5660347c801c518610d0fe8da19565c926eb5ac8a64e4cfb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page