Updating Indian stock exchange data in gnucash

I had written a few months back that updates to Indian stock exchange data from gnucash had broken thanks to yahoo stopping its service.

A couple of days back, an email came to Finance-Quote project mailing list with an attachment, which had scripts to retrieve data using BSE and ICICI Direct sources.   The list did not allow the attachment to be downloaded - perhaps because it was html content or due to the mail client used.  So I emailed the author Manoj Kumar, who was kind enough to share that over email.

As mentioned in his email (if you figure out how to read it from the mailing list), the steps to set up the scripts are straightforward.  There were a couple of other things that I did and I thought that warranted this post.

I did an update the Quote.pm to include the additional scripts and thereby avoided the needed to set/update the environment variable.

The other was to edit each of the security and make two changes.


a) Change the symbol name.  The name varies based on the source.  In case of Yahoo, for instance, if it was RIL.BO for Reliance, in case of nse_india (the module from Manoj that I used), it was RELIANCE.

How do you find the symbol in this case?  Simple (pun?)!  Go to http://www.nseindia.com/ and look up the same.  If you are more tech savy, open the file created by the script (nse_bhav.csv) and search for the same)!

b) Change the type of quote source.  Yahoo showed up in the "Single" section, while nse_india and icici_direct showed up in "Unknown" section.

With these, viola, the stock quotes started getting updated automagically!

Comments

  1. Thanks for providing stock market updates updates Targets for trading

    ReplyDelete
  2. Surely, It is a very nice and fundamental website. So, I like it very much. Thank's so much for published this website. For more information stock quotes to visit stock quotes These people are helpful for the majority of wall street game shareholders not to mention small-scale traders. Real-time stock quotes, aka live stock quotes or streaming stock quotes, are supplied with customized quotation internet websites not to mention as a result of wall street game stock trading programs using just one moment delay.

    ReplyDelete
  3. Can you please share those modules cant get them off the source forge mailing list

    ReplyDelete
  4. Hi ,

    Thanks for sharing the modules. When I copy the modules in to the Quote directory , Unknown section does not list nse_india as a source. Is there anything else to be done to make that happen.

    ReplyDelete
  5. Hi Hari, did you update Quote.pm to include the additional symbols as mentioned above as well as the Finance-quote mailing list?

    ReplyDelete
  6. Wow! It is a wonderful and informational website about financial markets. It is very useful for us. So, I loved it. Many, many thanks to you for creating such an informative website. If you would like more information about this please visit market watch The advantage of these market watch is they allow for a vast amount of customization by the user. That same advantage can create a disadvantage for some users. Those users may not really know what they are looking for or what data criteria might produce a market watch of stocks that present the highest possible probability of a successful stock trade.

    ReplyDelete
  7. Hi

    Thanks for providing the modules. However, I have a few questions.

    1. If I am downloading quotes from ICICIDirect, how do I specify whether I want the BSE quote or the NSE one?

    2. I have a problem with some scrips using nse_india. Take State Bank of India for example. The csv file lists several SBI securities with the same symbol (SBIN). The stock I need can be uniquely identified either by using the symbol in conjunction with the series (EQ), or using the ISIN (INE062A01012). However, I don't know how to specify this. By default, the script seems to pick up the last SBIN security listed, which is not the one I want.

    I have no idea how to code in Perl, so could you perhaps suggest how to modify the NseIndia.pm file to look up a security using its ISIN? Or if there is a better solution, please let me know. Thanks so much!

    ReplyDelete
    Replies
    1. Hi Himanshu, I am afraid I am just a user and not the developer/maintainer of the module. You could try asking in the mailing list for Finance-Quote.

      Delete
    2. Hi Himanshu,
      To retrieve BSE quotes using ICICIDirect module, you should specify bse_india as the source.
      Similarly, to retrieve NSE quotes using this module, specify nse_india as the source.
      To retrieve either NSE or BSE quotes, specify icici_direct as the source.
      This module provides four sources - icici_direct, nse_india, bse_india and india_shares. The last three are failover sources.
      Hope it is helpful.
      Regards,

      Delete
  8. Is someone still able to Download NSE quotes using Finance::Quote and Gnucash. I used to use Yahoo and it worked fine, but for the last few months it has stopped working. Is there any way out.

    Thanks

    ReplyDelete
    Replies
    1. AFAIK, it does not work with the default Finance::Quote. In fact, this write-up is about patching it with the new modules that can be used as a replacement for Yahoo. It works for me.

      Delete
    2. Thanks for the reply.
      How can I patch F:Q up with the new module. I am not used to Perl modules. Is there any link on how to do it easily.

      I am using Ubuntu.

      Delete


  9. Thanks for sharing, I will bookmark and be back again

    Nifty Trading

    ReplyDelete

Post a Comment

Popular posts from this blog

Opening a safe deposit locker in SBI

Opening a Kannada Word document

When gas leaks