> On Jul 13, 2016, at 8:03 AM, Crusier <crus...@gmail.com> wrote: > > Dear All, > > I am currently using: > Python 3.5 > Window 7 > > > I have a python script which is used for downloading Real Time Stocks. > Currently, there is over a 1000 stocks in the Portfolio. > > If I download the market info during market hours, it would take over > 40 minutes to finish downloading all the market info. Since I am
Do you know where this (seeming) throughput limitation is _actually_ occurring? I don’t know what format you are getting the data in, but if each stock is represented by it’s 1-4 character symbol, followed by a current quote (perhaps both bid and asked), then this adds up to around a dozen characters. Lets be generous and say 20 bytes. Twenty bytes times 1000 stocks is 20 kB. Even a “slow” connection these days should give you a 2 Mbs throughput or 200 kBs (including overhead), so your 20 kB of data should download in roughly one tenth of a second. > trading stock real time, I am thinking of breaking it down into 100 > stocks per group, so I could make the download time shorter. For the > market info, I will put into database and for data analysis. > In other words, don’t waste time solving the wrong problem. > My Question is as follows: > > Please advise if I should put the portfolio and split it into 10 > different scripts, so each scripts consists a list of 100+ number of > stocks. Or is there any Pythonic way to approach this problem?? > > I am currently using Multi Thread but there is an Operational Error.... > > > I am having a hard time to approach OOP. I just can't grasp the > understanding of it as it seems so abstract. Please advise. > > Thank you > > Regards, > Hank > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor