Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

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

 

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 Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

How to Retrieve Opening Balance, Total Turnover, Realized and…

This tutorial explores how to access the limits API functionality in Algomojo using python to retrieve the Account Balance, Total Turnover, Realized, UnRealized PNL,...
Rajandran R
1 min read

Introduction to Backtrader – Creating your First Trading Strategy…

Backtrader is an open-source python framework for backtesting, optimizing, and deploying live algorithmic trading strategies.
Rajandran R
54 sec read

Getting Started with Google Colab

Google Colab also known as Google Colaboratory is a product from Google Research which allows user to run their python code from their browser...
Rajandran R
1 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