IB Historical Data Step Size

Discussion in 'Interactive Brokers' started by lime, Jun 18, 2024.

  1. lime

    lime

    Hi, can you please explain what does Step Size mean?
    https://ibkrcampus.com/ibkr-api-page/twsapi-doc/#step-sizes

    It seems to refer to the maximum data request window for each data size (1min, 30min, 1hr, etc).
    It shows 1 Day duration for 1min bar size, does it mean for 1-min data, I can only get 1-day worth per request? But that will be only 390 (6.5 hours x 60 mins) bars. If I want 1-min IBM for past 6 months, I have to send one request for each day? It can't be that stupid.

    Also, https://ibkrcampus.com/ibkr-api-page/twsapi-doc/#historical-whattoshow , if I want 1-min Trade, Bid, and Ask, I have to request each separately? So sending 3 separate requests and then combining them?
     
  2. d08

    d08

    It's exactly like that. IB is quite poor for serious data but at least it is available.
     
  3. Businessman

    Businessman

    I think it is designed to be incremental, not a historical data source.

    eg. each day fetch the bar data you need for that day and add it to your local database.

    When adding a new symbol to my trading, I typically start out by getting very long term historical data from a provider that specialises in providing that, and then use the IB api to keep my historical database up to date each day.
     
    Last edited: Jun 19, 2024
  4. lime

    lime

    Is it for real you can only request one-day-period for 1-min data?
    So for 6months IBM trade-bid-ask, I have to send 3 requests for each day for 6 months?
     
  5. Correct. There is not really a hard limit, but they want you to request only a couple of hundred data points per request. In my case I submit requests that generate about 500 data points.
    Correct, three requests required.

    Don't forget: IBKR is not a data provider but a broker. The data is only provided as additional benefit for their customers.
     
    lime likes this.
  6. lime

    lime

    https://ibkrcampus.com/ibkr-api-page/twsapi-doc/#historical-limitations
    Can't find it now, but I recall you are limited to X numbers of requests per Y time window, right?
     
  7. DaveV

    DaveV

    And I would also add that the exchanges also place limits on how much download data IBkr, or any other broker, can provide for free.
     
  8. d08

    d08

    Yes, you will start to see slower replies as you make more requests. I cannot imagine getting 1 minute data, it will take forever. It already takes forever to get 15 min data spanning a decade.
     
  9. As @d08 already indicates is it not really a hard limit. But IB will start to throttle the data once they consider you to be "abusing" their system. So you can experiment a bit and see how large you can make your requests before you see the response time getting worse. If I recall correctly was their upper limit more restrictive in case you ask for 1 minute bars, and less restrictive in case you were asking for daily bars. I don't know whether they do this these days, or that their policy has changed.
     
  10. lime

    lime

    A decade? I thought you could only get data for past year or two?
     
    #10     Jun 29, 2024