0

I grabbing stock quotes from the YAHOO finance API using CSV concept in Python. My problem is that yahoo is shutdown the connection at some stage. Sometimes after 100 polls, sometimes after 10000 polls. So I tried different thinks like waiting 1 hour between 1000 polls, try different concepts like :

                try:
                    name        = fetch.get_name(symbol + ex_code)
                    exchange    = fetch.get_stock_exchange(symbol + ex_code)

                except : 
                    print 'going to sleep'
                    t.spleep(3600)
                    name        = fetch.get_name(symbol + ex_code)
                    exchange    = fetch.get_stock_exchange(symbol + ex_code)
                    print'Yahoo Fehler --- reconnect'

BUt I am not able to poll 3000 quotes from yahoo stable, yahoo kicks me out. Any advice what works ?

regards Adrian

Adrian Monk
  • 73
  • 2
  • 11
  • Can't you just fetch data when you need it ? If you bruteforce it like that it is sure that Yahoo will kick you out. – ffarquet Oct 07 '13 at 08:01
  • Thats the problem. I only poll End of Day data and calculate the winners out of this list every day at 18h. So the list is a big bigger and I have seen that others doing it, so I have a missing part in how to fix this. – Adrian Monk Oct 07 '13 at 08:10
  • Can you bundle up multiple symbols into each call? Then just make fewer calls for more data. – dejester Oct 07 '13 at 09:36
  • 1
    Check out http://stackoverflow.com/questions/9346582/what-is-the-query-limit-on-yahoos-finance-api – dejester Oct 07 '13 at 09:44
  • Thank you, very helpful. Due to the help I found the limitation at http://developer.yahoo.com/yql/guide/usage_info_limits.html. So the task is to remain under the radar. Thx a lot. – Adrian Monk Oct 07 '13 at 09:51

0 Answers0