You can get the answer in the API guide:
Historical Data Limitations
Historical data requests are subject to the following limitations:
Historical data requests can go back one full calendar year.
Each request is restricted to duration and bar size values that return no more than 2000 bars (2000 bars per request).
All of the API technologies support historical data requests. However, requesting the same historical data in a short period of time can cause extra load on the backend and subsequently cause pacing violations. The error code and message that indicates a pacing violation is:
162 - Historical Market Data Service error message: Historical data request pacing violation
The following conditions can cause a pacing violation:
Making identical historical data requests within 15 seconds;
Making six or more historical data requests for the same Contract, Exchange and Tick Type within two seconds.
Also, observe the following limitation when requesting historical data:
Do not make more than 60 historical data requests in any ten-minute period.