Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and 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. 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 Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and 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. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

[Live Coding Webinar] Build Your First Trading Bridge for…

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...
Rajandran R
1 min read

How to Place Orders Concurrently using ThreadPoolExecutor – Python…

Creating concurrent orders is essential for active traders, especially those handling large funds, as it allows for executing multiple trade orders simultaneously, thereby maximizing...
Rajandran R
2 min read

Host your Python Flask Web Application using pyngrok and…

Ngrok offers several significant advantages for developers, especially when it comes to testing applications or hosting machine learning models. Ngrok allows you to expose...
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