IB API vs TD Ameritrade API

Discussion in 'Interactive Brokers' started by IAS_LLC, Oct 16, 2018.

  1. IAS_LLC

    IAS_LLC

    Anyone here used both and have an opinion on which you prefer? I played with the IB C++ API a handful of years ago, and it was easy enough to use, but I haven't any experience with TD. I know that many of you seem to prefer ToS over IB TWS...so wanted to get your thoughts on the TD API.

    I will be soon be rolling my 401k into a IRA for TD or IB. If the technology is equal, I'll probably go with IB as they appear to have better commissions.

    C++ and Python (in no particular order) are my languages of choice, as they can be easily integrated into my pre-existing algorithms.
     
  2. I use both. The TD/TOS api is able to send a simple http post and get a reply back without it being asynchronous. At it's most basic level you can do a curl to execute a trade or get a current price. The other benefit is that some of the calls return richer information within a single call (I think the greeks like theta, delta ... are all returned within a single call on the current option chain. Sometimes the TD API gets you wrong data like a 0 price so you have to have more error handling around that. For market data I only use the IB api, then based on size place the trade @ IB or ToS (TOS has better commissions for trades > 1500 shares for me).
     
    BrooksRimes and IAS_LLC like this.
  3. JSOP

    JSOP

    TD's TOS doesn't have API. I has its proprietary scripting language called Thinkscript that you can use to do some charting, indicators, conditional orders and etc, very high-level, very limited in capabilities. It doesn't even have loops and its "if-else-if" is the most ridiculous and unintuitive that you would ever find in all the programming languages that you will ever study. It's a scripting language. I shouldn't need to say more.
     
  4. JSOP

    JSOP

    TOS has an API? Where?
     
  5. IAS_LLC

    IAS_LLC

  6. TD HAS an API. I know.. for I have spent countless , needless hours screwing around with it. The hardest trickiest part is getting authentication straight thru a POST command , then a cURL to request quotes,etc. It sends quotes in a json format so you can use python to "grab" it and convert it to your needs.
     
    IAS_LLC and JSOP like this.
  7. using IB for quotes, the old TD api for execution and parts of the new TD api

    both do the job... TD used to be quiet unstable at times but that has changed to the better lately

    IB also pays interest on idle cash.

    curious to learn about who has the better execution / slippage in real life
     
    IAS_LLC likes this.
  8. IB has better execution for me. I've had countless examples where the same trade is sent to both (it is always sent to ToS first) and canceled if one of them fills (or partially fills), sometimes both fill, sometimes ToS fills first but for the most part IB fills first.
     
    SPYAlgoTrader likes this.
  9. sysdevel99: very interesting thanks... ever benchmarked market or marketable limit orders? I always go all in or out by bidding/asking +- $10 on high volume etfs and stocks resulting in instant fills and on average less than $0.007 slippage per $50 on TD
     
  10. gkishot

    gkishot

    I am having trouble to get oauth authorization token part working at TDAmerirade.
     
    #10     Oct 18, 2018