Python module to get real-time stock data from Google Finance API
Go to file
2015-03-03 16:42:07 +08:00
dist README 2015-03-03 16:42:07 +08:00
googlefinance change readme 2015-03-03 15:58:29 +08:00
.gitignore add manifest 2015-03-03 16:04:10 +08:00
LICENSE Initial commit 2015-03-02 22:22:24 +08:00
MANIFEST README 2015-03-03 16:42:07 +08:00
README README 2015-03-03 16:42:07 +08:00
README.md modify readme 2015-03-03 16:25:54 +08:00
setup.py modify readme 2015-03-03 16:25:54 +08:00

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 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', 'GOOG']), 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"
  }, 
  {
    "Index": "NASDAQ", 
    "LastTradeWithCurrency": "571.34", 
    "LastTradeDateTime": "2015-03-02T16:04:29Z", 
    "LastTradePrice": "571.34", 
    "Yield": "", 
    "LastTradeTime": "4:04PM EST", 
    "LastTradeDateTimeLong": "Mar 2, 4:04PM EST", 
    "Dividend": "", 
    "StockSymbol": "GOOG", 
    "ID": "304466804484872"
  }
]