IB vs TD Ameritrade tick rate & API

Discussion in 'Automated Trading' started by kranebrain, Jan 21, 2017.

  1. I'm new to stocks and trading but I've been in the computer world for a while. I've been using TD Ameritrade ToS, and while I like it I'd be much more comfortable controlling my trades in C++.

    So I recently got my hands of TD Ameritrade developer API but one of my friends suggested IB. Does anyone readily have the tick rates of the two? If I intend to use C++ to trade am I better off going to IB?
     
  2. tommcginnis

    tommcginnis

    "Tick rate"?? Que est?

    As far as IB's TWS C++ API, I *seem* to recall that it was part of the overall API that had not seen updating in a while, and was not likely to see it, as there were/are issues with C++ that limit its abilities re trading. (This is a very weak recollection.) If you search on "TWS API C++" you'll likely gain a good bit. There is a Yahoo group that has recently moved to Groups.io{???} where a lot of wisdom hangs out. If you were flexible enough, it'd be a great time to lean into Java.
     
    MotiveWave likes this.
  3. By tick rate I mean how fast you can pull quote data per second. Java is the devil's tongue so I'd prefer not to use it. But gotta do what you gotta do. Have you hear anything regarding TD Ameritrade's developer API?
     
  4. IB datafeed is not every tick. It returns whatever changed since previous update, I think around 4 times a sec max (have not checked recently).

    TDA datafeed by default is also aggregated. You can however request "TIME_SALES" which is a tick datafeed. You would then have to merge it with the regular quote datafeed in order to have a consolidated bid/ask/volume/last, etc.

    In general IB API may be slightly faster. Particular issue I've found was with TDA Level II data. Compared to IQFeed and MB Trading API data for example, there is a noticeable difference.

    I deal with the low level API, so cannot comment too much on the various language wrappers, though the C# stuff seemed to be pretty straight forward.
     
    eusdaiki and tommcginnis like this.
  5. I am not familiar with TD Ameritrade so can't comment on that. IB does not provide a fixed update rate and they don't send you every tick of every trade or price change. They send an update when a price changes, and then wait a certain period x. "x" depends on the instrument. For currencies I recall that x = 50 ms, whereas for stocks x = 250 ms. However, if for example a price does not change during one minute you won't receive any update message during that period. This behaviour is independent of the software language you use, whether it be java or C++.
     
    tommcginnis likes this.
  6. tommcginnis

    tommcginnis

    You are a mechanic with knowledge of a 4-cycle internal combustion engine.
    And you are seeking the best set-up.

    TOS is a Cadillac SUV. (Don't try racing anybody.)
    IB's TWS is a factory-fresh Formula 1 McLaren (Don't use it for groceries.)

    But by asking about tick rates, you are inquiring about a 10,000HP Top Fuel dragster engine worth one or two shots at a 4-second quarter.....

    If you are new to trading, TOS is a comfortable ride.
    If you're prepared to roll-your-own, IB will cost you less.

    FWIW, you can off-load data from IB into csv files with three mouse keystrokes. I do all my analysis that way. The first time, it took 3 weeks, then 3 days, then 3 hours, and now, a max of about 3 minutes. Having dipped into the API, I have settled on automating this in Java so as to get it in real time. (I work close enough to the market to need this on active days.)

    Hope that helps. There are also add-ons to TWS to off-load data, if you wished for someone else's work.
     
    Last edited: Jan 22, 2017
  7. Ameritrade's API isn't that easy to work with, their documentation sometimes is really confusing. IB is a better one for sure, but if you want to trade frequently, their fees are still too high. Everything depends on your trading frequency, if you want the get tick data momentarily, you'd better check other options
     
  8. TDA's API is not well supported. Curious if you are able to obtain the real-time data you need via TOS's RTD to Excel? -- If so, then this may be easier to manage. --Ie... Have your code dynamically produce the Excel apps and formulas as part of your conduit to the real time data, and have your code pull the data from the Excel instances. -- just a thought.
     
  9. Can you please elaborate on the difference you saw in Level 2 data.
    How were you fetching the level 2 data through TDA and IB ? I know IB has an api and chanrges for subscription and has some limitations on the number of subscription you have for L2 , are there similar in TDA . Can you give some pointers to the api for L2 real time data through TDA or some code examples . I am very interested in exploring the data via TDA but i dont find they have good api support and i dont know if they even support L2 data through some api.
     
  10. Robert Morse

    Robert Morse Sponsor

    In case you are interested, Lightspeed Trader API and Realtick are both C++ APIs. Happy to chat anytime.

    Bob
     
    #10     Nov 10, 2018