GithubHelp home page GithubHelp logo

gatesh / financemarketdatagrabber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redspidermkv/financemarketdatagrabber

0.0 2.0 0.0 36 KB

Use Yahoo Finance or Google's 'hidden' Finance APIs to retrieve current stock and forex data as well as historic quotes

License: MIT License

Python 100.00%

financemarketdatagrabber's Introduction

#Finance API Library

GitHub license

Python library to access current stock/forex quotes from Yahoo and Google Finance 'APIs'. Historic data can also be retrieved.

Multiple stock quotes and multiple symbols can be retrieved in a single call, thereby reducing latency and bandwidth usage.

Usage - Yahoo Finance Live Quotes (delayed by 15 minutes by Yahoo)

To retrieve live stock data using the Yahoo Finance API, the following will be required.

import FinanceDataLib.YahooFinance.YahooApi as YahooApi
from FinanceDataLib.YahooFinance.YahooApi_Symbols import *

financeApi = YahooApi.yahooFinance()

To retrieve stock data, provide a list of stocks of interest as well as a list symbols for each stock.

stockList = ('MSFT', 'AAPL', 'BARC.L')
symbolList = (SymbolInfo.Symbol, SymbolInfo.StockExchange, SymbolInfo.Name, \
    Pricing.Ask, Pricing.Bid, Pricing.LastTradeWithTime)
    
financeApi.GetData(stockList, symbolList)

This will return the following response:

"MSFT","NMS","Microsoft Corporation",58.74,58.65,"4:00pm - <b>58.71</b>"
"AAPL","NMS","Apple Inc.",108.85,108.71,"4:00pm - <b>108.84</b>"
"BARC.L","LSE","BARCLAYS PLC ORD 25P",189.00,179.50,"5:05pm - <b>181.35</b>"

More examples can be found in the example.py file.

Pending

More information about how to use the Google Finance API and the historical data retriever will be provided soon.

As of 05/11/2016, the Google Finance API is still working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.