This Python package provides a simple WebSocket client for connecting to the TradingView WebSocket API. It allows users to subscribe to real-time financial data streams and retrieve historical data.
Project description
TradingView WebSocket Client
Introduction
This Python package provides a simple WebSocket client for connecting to the TradingView WebSocket API. It allows users to subscribe to real-time financial data streams and retrieve historical data.
Installation
You can install the package via pip:
pip install tradingview_websocket
Usage
from tradingview_websocket import TradingViewWebSocket
Define symbol, timeframe, and number of candles
symbol = "USDEUR"
timeframe = "1D"
candles = 100
Initialize TradingViewWebSocket object
ws = TradingViewWebSocket(symbol, timeframe, candles)
ws.connect()
Run the WebSocket client
ws.run()
Access the result data
result_data = ws.result_data
print(result_data)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Issues
If you encounter any issues or have questions regarding the package, please feel free to open an issue on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tradingview_websocket-0.6.tar.gz.
File metadata
- Download URL: tradingview_websocket-0.6.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d61293bb2e14291fabc1d3a314b01d504a4627d21c1332aa9be3429d5546d277
|
|
| MD5 |
71803d06548e5777928861e416b59081
|
|
| BLAKE2b-256 |
5894f12cebfc9808f9dec9e41d4e0982dc443d7c67e92d4ebb9b557b7dcfb70c
|