IB-Historical-data-downloader API download the historical data of stock market from interactive broker using IB python API pre-request : 1-download the IB work trader and login id then run above code in your idle 2-download the IB python API 3-download the IB gateway Last thursday of the month