vDatafeed
vDatafeed: A Python wrapper for Viet Nam Datafeed API
Installation
pip install vdatafeed
Supported Providers
| Provider | Status |
|---|---|
| SSI | ✅ Supported |
| SSI-v2 | ⚠️ Work in Progress |
| DNSE | ⚠️ Work in Progress |
| DNSE-v2 | ⚠️ Work in Progress |
Usage
Financial data
from vdatafeed import Datafeed, Provider, SSIConfig
datafeed = Datafeed(
provider=Provider.SSI.value,
config=SSIConfig(
consumer_id="<SSI_CONSUMER_ID>",
consumer_secret="<SSI_CONSUMER_SECRET>"
)
)
# Get list of instruments
datafeed.api.get_instruments()
# Get instrument details
datafeed.api.get_instrument_details("SSI")
# Get list of indices
datafeed.api.get_indices()
# Get list of instruments in an index
datafeed.api.get_indices_instruments("VN30")
# Get daily instrument info
datafeed.api.get_daily_instrument_info(instrument="SSI", from_date="2024-09-01", to_date="2024-09-10")
# Get daily all instruments info
datafeed.api.get_daily_instruments_info(from_date="2024-09-10", to_date="2024-09-10")
# Get daily indices info
datafeed.api.get_daily_indices_info(index="VN30", from_date="2024-09-01", to_date="2024-09-10")
# Get end of day OHLCV
datafeed.api.get_endofday_ohlcv(instrument="SSI", from_date="2024-09-01", to_date="2024-09-10")
# Get intraday OHLCV
datafeed.api.get_intraday_ohlcv(instrument="SSI", from_date="2024-09-01", to_date="2024-09-10")
Streaming data
import asyncio
from vdatafeed import Datafeed, Provider, SSIConfig
datafeed = Datafeed(
provider=Provider.SSI.value,
config=SSIConfig(
consumer_id="<SSI_CONSUMER_ID>",
consumer_secret="<SSI_CONSUMER_SECRET>"
)
)
def on_trade_message(msg):
print(f"TRADE: {msg}")
def on_quote_message(msg):
print(f"QUOTE: {msg}")
asyncio.run(
datafeed.hub.listen(
input("Please select Symbol(SSI)/Index(VNINDEX/VN30) or list(SSI,VCB): "),
on_trade_message,
on_quote_message
)
)
List available providers
from vdatafeed import list_providers
print(list_providers()) # ['ssi']
Metadata
Release files for vdatafeed 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vdatafeed-2.0.0.tar.gz | 17.4 kB | Without provenance | Details for vdatafeed-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vdatafeed-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for vdatafeed-2.0.0-py3-none-any.whl |
Total release size: 39.5 kB
Release files / vdatafeed-2.0.0.tar.gz
| Download URL | vdatafeed-2.0.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2615b95ab71b7a9126b1292f35641352b1bdc54774b5a6da5676c93fb42387f
|
|
BLAKE2b-256 checksum How to use checksums |
724db6eef734bf9623d8b0118e8b6d03c7c436cc95747d30f906a1352381bead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / vdatafeed-2.0.0-py3-none-any.whl
| Download URL | vdatafeed-2.0.0-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b64c9a46de2d8c9b0ba0b7b11cbf1e1ac1790d4a212e81b21cf43a6ab7074195
|
|
BLAKE2b-256 checksum How to use checksums |
48afc1dba899c740e56a92ab918e0a61b4e8f893ec85e2c07e325fe2bccf81a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for vdatafeed 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.