Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hongtaocai/googlefinance
Python module to get real-time stock data from Google Finance API
https://github.com/hongtaocai/googlefinance
Last synced: about 1 month ago
JSON representation
Python module to get real-time stock data from Google Finance API
- Host: GitHub
- URL: https://github.com/hongtaocai/googlefinance
- Owner: hongtaocai
- License: mit
- Created: 2015-03-02T14:22:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-23T18:20:08.000Z (about 6 years ago)
- Last Synced: 2024-10-01T13:08:23.445Z (2 months ago)
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 701
- Watchers: 60
- Forks: 172
- Open Issues: 32
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
- awesome-fintech - googlefinance - Python module to get real-time stock data from Google Finance API. (Libraries / Python)
- awesome-fintech - google-finance - Python module to get stock data from Google Finance (Stock data)
- awesome-quant - googlefinance - Python module to get real-time stock data from Google Finance API. (Python / Data Sources)
- awesome-quant - googlefinance - Python module to get real-time stock data from Google Finance API. (Python / Data Sources)
README
googlefinance
=============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 installUsage 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"
}
]