Converting OHLC stock data into a different timeframe with python and pandas

With a more recent version of Pandas, there is a resample method. It is very fast and is useful to accomplish the same task: ohlc_dict = { ‘Open’: ‘first’, ‘High’: ‘max’, ‘Low’: ‘min’, ‘Close’: ‘last’, ‘Volume’: ‘sum’, } df.resample(‘5T’, closed=’left’, label=”left”).apply(ohlc_dict)

Free JSON formatted stock quote API (live or historical) [closed]

Check the following they are free, they generate Json, though for different exchanges you need to ensure that correct syntax is used. even Yahoo finance works well, but it has some issues regarding NSE and BSE data, which is always generated Null DEPRECATEDGoogle Finance – NSE URL – http://www.google.com/finance/info?q=NSE:AIAENG,ATULAUTO,<Add more NSE codes> DEPRECATED Google Finance … Read more

Download all stock symbol list of a market [closed]

Exchanges will usually publish an up-to-date list of securities on their web pages. For example, these pages offer CSV downloads: http://www.nasdaq.com/screening/companies-by-industry.aspx?exchange=NASDAQ&render=download http://www.nasdaq.com/screening/companies-by-industry.aspx?exchange=NYSE&render=download http://www.asx.com.au/asx/research/ASXListedCompanies.csv NASDAQ Updated their site, so you will have to modify the URLS: NASDAQ https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=nasdaq&render=download AMEX https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=amex&render=download NYSE https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=nyse&render=download Depending on your requirement, you could create the map of these URLs by exchange … Read more

What online brokers offer APIs? [closed]

I vote for IB(Interactive Brokers). I’ve used them in the past as was quite happy. Pinnacle Capital Markets trading also has an API (pcmtrading.com) but I haven’t used them. Interactive Brokers: https://www.interactivebrokers.com/en/?f=%2Fen%2Fsoftware%2Fibapi.php Pinnacle Capital Markets: http://www.pcmtrading.com/es/technology/api.html