Python module to get real-time (no delay) stock data from Google Finance API
Project description
Python module to get stock data from Google Finance API
This module provides no delay, real time stock data in NYSE & NASDAQ.
Another awesome module, yahoo-finance’s data is delayed by 15 min, but it provides convenient apis to fetch historical day-by-day stock data.
Install
From PyPI with pip:
$pip install googlefinance
From development repo (requires git)
$git clone https://github.com/hongtaocai/googlefinance.git $cd googlefinance $python setup.py install
Usage example
>>> from googlefinance import getQuotes >>> import json >>> print json.dumps(getQuotes('AAPL'), indent=2) [ { "Index": "NASDAQ", "LastTradeWithCurrency": "129.09", "LastTradeDateTime": "2015-03-02T16:04:29Z", "LastTradePrice": "129.09", "Yield": "1.46", "LastTradeTime": "4:04PM EST", "LastTradeDateTimeLong": "Mar 2, 4:04PM EST", "Dividend": "0.47", "StockSymbol": "AAPL", "ID": "22144" } ] >>> print json.dumps(getQuotes(['AAPL', 'VIE:BKS']), indent=2) [ { "Index": "NASDAQ", "LastTradeWithCurrency": "129.36", "LastTradeDateTime": "2015-03-03T16:02:36Z", "LastTradePrice": "129.36", "LastTradeTime": "4:02PM EST", "LastTradeDateTimeLong": "Mar 3, 4:02PM EST", "StockSymbol": "AAPL", "ID": "22144" }, { "Index": "VIE", "LastTradeWithCurrency": "17.10", "LastTradeDateTime": "2015-03-03T13:30:30Z", "LastTradePrice": "17.10", "LastTradeTime": "1:30PM GMT+1", "LastTradeDateTimeLong": "Mar 3, 1:30PM GMT+1", "StockSymbol": "BKS", "ID": "978541942832888" } ]
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
googlefinance-0.7.tar.gz
(2.5 kB
view details)
File details
Details for the file googlefinance-0.7.tar.gz
.
File metadata
- Download URL: googlefinance-0.7.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b5ef65fb850be8825eebfd2404195f7547d05735ad1d87cc2d7b595f9509ef5 |
|
MD5 | 5fb4dc76b5f6bb6a0e75301b16ae11a8 |
|
BLAKE2b-256 | c5e4e1775ade2f0eee53a0ea9f347399c06f36ff4a165f3d44ca0a66ed23e395 |