Information
This package to fetch data from tradingview websocket
Installation
Create an isolated Python virtual environment
pip3 install virtualenv virtualenv ./virtualenv --python=$(which python3)
Activate the virtualenv
IMPORTANT: it needs to be activated every time before you run
. virtualenv/bin/activate
Install Python requirements
pip install -r requirements.txt
Install
pip install -e .
run test
python -m test
Using:
- define a callback function get receive result
def callbackFunc(s):
print(s)
- call websocket to get quote price or ohlcv to write a trading bot, data will be delayed 10m if don't use account premium
pair = "ES"
market = "futures" # 'stock' | 'futures' | 'forex' | 'cfd' | 'crypto' | 'index' | 'economic'
username = None
password = None
trading = td.TradingViewWs(pair, market, username, password)
# get quote price
trading.realtime_quote(callbackFunc)
# get ohlcv
interval = 5
total_candle = 240 # total candle to calculate indicator ex: EMA, WMA
trading.realtime_bar_chart(interval, total_candle, callbackFunc)
Metadata
Release files for tradingview-ws 0.0.3
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 |
|---|---|---|---|---|
| tradingview_ws-0.0.3.tar.gz | 7.2 kB | Without provenance | Details for tradingview_ws-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tradingview_ws-0.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for tradingview_ws-0.0.3-py2.py3-none-any.whl |
Total release size: 13.3 kB
Release files / tradingview_ws-0.0.3.tar.gz
| Download URL | tradingview_ws-0.0.3.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73ec95a628b00f498382aee8a170995e00ba1f73d290ecf899f253a35d53bf37
|
|
BLAKE2b-256 checksum How to use checksums |
baaa700776df88270e6ac3c7d0ffcd67ca2e61ab5b0da91ec62b5d6392d3f6fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.0
|
Release files / tradingview_ws-0.0.3-py2.py3-none-any.whl
| Download URL | tradingview_ws-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ff3ca3ff5ad6952a80afc804014d2d198556c54639a8e34b2e3ea5edc2ed70f9
|
|
BLAKE2b-256 checksum How to use checksums |
809278ae0c32f0f2c9844e481f0599bf83230a9a4c5c8dcdb8f5bbb4975cc29d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.0
|
Security for tradingview-ws 0.0.3
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.