Live market data from Yahoo! Finance websocket
Project description
Live from Yahoo Finance
Get market data from Yahoo Finance websocket in near-real time. wss://streamer.finance.yahoo.com/
Setup
pip install yliveticker
Example
The following snippet prints out live metrics in console output. You can follow other symbols by providing them in ticker_names.
import yliveticker
# this function is called on each ticker update
def on_new_msg(ws, msg):
print(msg)
yliveticker.YLiveTicker(on_ticker=on_new_msg, ticker_names=[
"BTC=X", "^GSPC", "^DJI", "^IXIC", "^RUT", "CL=F", "GC=F", "SI=F", "EURUSD=X", "^TNX", "^VIX", "GBPUSD=X", "JPY=X", "BTC-USD", "^CMC200", "^FTSE", "^N225"])
Note Check trading hours for your market if you don't observe any live metrics
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yliveticker-0.3.0.tar.gz.
File metadata
- Download URL: yliveticker-0.3.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d1eeb6830c9213bbbe0cbb2b96bd462fa85d1e97b4cfa7417c6b4336fe3a35f
|
|
| MD5 |
3adfc7e136056ce102ea1330dd6f0b7f
|
|
| BLAKE2b-256 |
d622d0cf3e9464853c41c3aea3e9895e37adadfd63d80d4d7f02679a300eae41
|
File details
Details for the file yliveticker-0.3.0-py3-none-any.whl.
File metadata
- Download URL: yliveticker-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5e5da55a62a45729808e91b188fc1536fbce900935f3189c0c08607b2e5433a
|
|
| MD5 |
07db7449394c2465c40d00790d2a0fd3
|
|
| BLAKE2b-256 |
28a71d991a4a00e12923c52eca48abbe06fe4b541668b072d3f0196620b6317a
|