Skip to content

YQL-finance is a simple and fast Python API https://developer.yahoo.com/yql/console/. The API returns closing prices of stocks for the current period of time and current stock ticker (e.g. APPL, GOOGL). Stock prices: NASDAQ, SP&500, DAX, etc.

License

Notifications You must be signed in to change notification settings

slawek87/yql-finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is yql-finance?

Alt text   PyPI version

yql-finance is simple and fast https://developer.yahoo.com/yql/console/ python API. API returns stock closing prices for current period of time and current stock ticker (i.e. APPL, GOOGL). Stock prices: NASDAQ, SP&500, DAX etc.

How to use it?

You can use it to fetch data in one of two ways:

yql = YQL('AAPL', '2011-01-01', '2014-12-31')

or

yql = YQL()
yql.select('AAPL', '2011-01-01', '2014-12-31')

How to install it?

pip install yql-finance

Examples

  1. First way:
from yql.api import YQL

yql = YQL('AAPL', '2014-01-01', '2014-01-10')

for item in yql:
    print item.get('date'), item.get('price')
  1. Second way:
from yql.api import YQL

yql = YQL()

yql.select('AAPL', '2014-01-01', '2014-01-10')

for item in yql:
    print item.get('date'), item.get('price')

Output:

2014-01-10 74.57
2014-01-09 75.07
2014-01-08 76.04
2014-01-07 75.56
2014-01-06 76.10
2014-01-03 75.69
2014-01-02 77.39

More examples you should find here.

About

YQL-finance is a simple and fast Python API https://developer.yahoo.com/yql/console/. The API returns closing prices of stocks for the current period of time and current stock ticker (e.g. APPL, GOOGL). Stock prices: NASDAQ, SP&500, DAX, etc.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages