If you are at least slightly familiar with Python you can use ib_insync and its ready-to-use notebooks for basic tasks: https://nbviewer.org/github/erdewit/ib_insync/blob/master/notebooks/bar_data.ipynb