Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Fetch Intraday Data from Google and Plot using Python

47 sec read

Here is an yet another interesting python tutorial to fetch intraday data using Google Finance API , store the data in csv format and also plot the intraday data as candlestick format. We are using plotly library for plotting candlestick charts and pandas to manage time-series data. Luckily found and interesting python code which fetches google intraday data and store in csv format. Done some little modification in the code (exchange added to the Google API) so that one can fetch data for any exchange.

In our example we try to retrieve the data (Date,Time,Symbol,Open,High,Low,Close,Volume data) for RCOM (Reliance Communication) and plot as candlesticks using plotly library. Download the sample RCOM CSV file fetched from Google Finance
[wp_ad_camp_5]

 

Sample IPython Notebook using Plotly and pandas to plot Interactive Intraday Candlestick Charts using Google Finance API :

In the next tutorial we will be discussing how to push intraday data to Amibroker software using python .

Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

How I Built a Telegram AI Stock Assistant Using…

In this post, I'll walk you through the process of creating an intelligent Telegram AI assistant, StockBot, using the Llama 3 Groq tool use...
Rajandran R
1 min read

[Course] Building Stock Market Based Telegram Bots using Python

Learn how to build powerful Telegram bots for the stock market using Python. This hands-on course guides you through creating bots that fetch real-time...
Rajandran R
1 min read

Understanding Object-Oriented Programming (OOP) Concepts in Python for Traders…

For traders and investors, having well-structured code can greatly improve the efficiency and manageability of trading applications. Object-Oriented Programming (OOP) in Python offers a...
Rajandran R
3 min read

10 Replies to “Fetch Intraday Data from Google and Plot using Python”

  1. Hello Rajendran,

    Thanks for this tutorial. One question though, Is there in value addition in learning python if one is already well versed in AFL? What are the benefits of python over AFL?

    Thanks,
    Snehil

  2. Any pointer on how I can display these python processed graph on html webpage.? Secondly, Can python script be ran dynamically according to action on my dynamic webpage. I am not aware of Python yet and always use JavaScript, you guide may push me to learn Python.

  3. Any thing that we can cut and paste and use for illiterate’s like me? If you have any such thing please put it up. thanks.

  4. Dear Rajendran,

    Is there any limitation of no of scripts to fetch the data from google and feed in ami broker.

  5. Dear Rajendran,
    I have a query if you support it will be very much useful
    In the above code i would like to plot the candle for 1hr 2 hour how to do that? is there a way.
    I want 1hr starts from 9.15AM 10.15AM 11.15AM like this not from 10AM 11AM etc.

    Please feedback what parameter i would need to change to get the same

  6. Hello Rajendran,
    The code has stopped fetching data since last 2-3 days. It returns a 0kb file. Can you please look into it?

  7. This doesnt work any longer. The URL must have changed. Am getting HTTP 403 error.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More