Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slawek87/yql-finance
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.
https://github.com/slawek87/yql-finance
python stock-prices yql-finance
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/slawek87/yql-finance
- Owner: slawek87
- License: bsd-3-clause
- Created: 2014-12-21T16:18:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-29T11:41:12.000Z (over 9 years ago)
- Last Synced: 2024-11-01T13:42:37.923Z (4 months ago)
- Topics: python, stock-prices, yql-finance
- Language: Python
- Homepage: http://slawek87.github.io/yql-finance/
- Size: 330 KB
- Stars: 16
- Watchers: 4
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-quant - yql-finance - yql-finance is simple and fast. API returns stock closing prices for current period of time and current stock ticker (i.e. APPL, GOOGL). (Python / Data Sources)
- awesome-quant - yql-finance - yql-finance is simple and fast. API returns stock closing prices for current period of time and current stock ticker (i.e. APPL, GOOGL). (Python / Data Sources)
README
What is yql-finance?
===========
![Alt text](https://travis-ci.org/slawek87/yql-finance.svg?branch=master) [![PyPI version](https://badge.fury.io/py/yql-finance.svg)](http://badge.fury.io/py/yql-finance)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:```python
yql = YQL('AAPL', '2011-01-01', '2014-12-31')
```
or
```python
yql = YQL()
yql.select('AAPL', '2011-01-01', '2014-12-31')
```How to install it?
===================
pip install yql-financeExamples
===============1. First way:
```python
from yql.api import YQLyql = YQL('AAPL', '2014-01-01', '2014-01-10')
for item in yql:
print item.get('date'), item.get('price')
```
2. Second way:
```python
from yql.api import YQLyql = 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](https://github.com/iknowledge-io/yql-finance/tree/master/examples).