The Best and Worst Stock and Option Trading APIs

Update: 2020 The Best and Worst Stock, Futures and Option Trading APIs

In my quest to program and build my own trading system, I have discovered a lot of conflicting information on the “Internets” about trading APIs and stock and option price quotes.  In the past, I posted on HN news about some of my findings, only to get some great new insights. One thing I can’t find is a simple location for all trading APIs and I have stumble along some rabbit holes when dealing with the APIs, trying to see what works and what is no longer supported. With that said, I will will be launching a General information Git Repository, to hopefully provide links to SDK for trading API and price quote APIs, Etc. I will obviously do pull requests, but my opinions and finding on certain trading systems will be detailed below and on this site.

Finally, having built successful trading systems and algorithms, some of my work can be found here. I’m available for hire at Upwork or via email.

The repo can be found here.

Ally Financial (used to be Trade King api):

Pro: Open an account with as little as $50

  • Access to real time stock quotes and option chainss
  • Simple REST api calls, takes 5 minutes to get up and running.
  • Support email is responsive.
  • Documentataion is simple and concise.
  • Oauth2

Cons:

  • no paper trading account
  • no historical quotes
  • actually trading a stock or options is documented poorly

eTrade

Etrade has and an API, it doesn’t seem to be very well supported. Meaning it came out in I think 2012 and it hasnt been updated recentley (like the last few years).

Pros:

Sand box environment: I only made it to the sand box. Which really isn’t a test/development environment. It’s an environment that no matter what stock price you query it will return quotes for Apple, Google or Microsoft. This really isn’t a true testing environment.

  • SDK available

Cons:

  • Can take weeks to set up and become operational
  • Very little support from eTrade
  • documentation is clearly outdated
  • Very little documentation on Stackoverflow or google searchs

TD Ameritrade:

TD Ameritrade does infact have an brand new API, it seems to be a stealth launch.

Pro:

  • Documentation is pretty good, not great.
  • TD ameritrate has the best trading platform, which would be the Think or Swim (TOS) desktop application.
  • Can create API calls on the website.
  • Email support is responsive

Cons:

  • Still in soft launch phase
  • documentation is not complete, spelling mistakes, inconsistent.
  • No paper trading account.

Interactive Brokers:

Pro:

  • Probably the best API.
  • Recommend IB_insync wrapper, well supported with a large community.
  • Offers historical quotes so you don’t have to rely on Yahoo
  • Options, FX, Bonds, Stocks
  • There are infinite amount of ways to trade
  • Live Trading & paper trading

Cons:

  • At times overly complicated
  • Only works with Java, C++, Python, .NET (C#), C++, ActiveX, DDE
  • The Trader Work Station, which is not required, is grossly outdated and cumbersome.

34 thoughts on “The Best and Worst Stock and Option Trading APIs”

  1. Thank you for this article, I am just getting started developing a trading system.
    I currently use Etrade and Fidelity. Fidelity doesnt seem to have any API. Etrade does, but now I am concerned about if I should try to use it or just open an account with IB or Ally?

    1. Etrade really doesn’t have a supported API.I definately would try to steer clear of that. Ally API works pretty well for basic trading, but it doesn’t have a paper trading account. IB really is the only game in town, but there is quite a learning curve at the beginning.

  2. Interactive brokers python api and the api in general is poorly documented, buggy and slow. If you try to contact support, they will tell you to stop asking why it’s broken. What a bunch of uselessness.

    1. The documentation generally sucks.The code is pretty weak and at times it’s just amazing how crazy some of the trading logic is. I have spend hours on the chat with them… harassing them.

      The only problem is… they seem to be the only game in town. 🙁

    1. I have had to rebuild the website a few times and I used the wayback archive machine to save time. hopefully the information is usefully as opposed to the crappy design.

  3. Thanks Chad,
    Just found your github repo and this very good summary.
    After years preparing I feel ready to start testing my idea for a systematic framework.
    Indeed IB hasn’t changed in ages. I had great hopes after they released the beta of a REST API but if it really depends on IB Gateway, it means it’s just another wrapper, isn’t it?
    Ibinsync is indeed very nice, clean, well maintained, and incredibly helpful for a dev as it streamlines the way your code interacts with the Api. But you gotta feel comfortably with having another layer of abstraction over an already convoluted monster.

    I’ve always only considere IB as an option, as ir was the go-to for many prop quants; but after your article I took a look at TD Ameritrade’s offer and it’s all I wanted: a simple, clean REST API.
    It seems also complete. Do you still think TDA isn’t ready yet?

    Thank you for sharing your content.
    Looking forward to contributing

    1. The only reason I don’t care for TDA right now is two reasons. One there is only one person to support the whole API and he only responds to emails a few days later. The second reason is I really like have a paper trading account to test trades and execution software. I have some simple code that send trades to IB paper account to test the basics of sending trades. Email [email protected] if you want to me upload it to the git repo. I have been super busy writing algos…

    1. Not sure what you are getting at here. But when I wrote this post, I think I was only a PHP programmer. IB has turned me into a python coder and really don’t like using PHP anymore… Python maybe the best…?

  4. Now that Schwab appears to be buying Ameritrade, I’m concerned that the Ameritrade API might be eliminated as Ameritrade accounts are converted to Schwab accounts.

    1. I would be concerned at well. I use the TD Ameritrade API to get option prices. It worked great for months. Then I ran across a small glitch and had to contact customer support. The told me is the API was courtesy and not something they are required to maintain. Because it’s been 3 weeks and they haven’t fixed the problem.

    1. There doesn’t seem to be a large community for programmers using TradeStation. I have always thought Trade Station was click programming. IB doesn’t have the largest community on stack-overflow, etc, but there is some support.

      1. my problem with IB is its very difficult to keep a reliable connection, and deploying it on a cloud is quite difficult as you need to install the TWS.

    1. I haven’t tried Alpaca. I have heard they sell your data to other firms. But I don’t have any proof of that accusation.

    2. Alpaca is very good. They have a REST API and are easy to communicate with their developers and a thriving communinity of like minds and other developers through Slack and their customer service people who are very very responsive via email. There’s example code and libraries available in Python, C#, Javascript as well as a language I haven’t delved into called Go!

      1. I don’t think they do options yet. But, I’m sure it’s on their radar for deployment.

        The key selling point about working with Alpaca is that its platform sits on top of a zero-commission brokerage firm as well.

  5. Interactive broker support is very unreliable. It took me an 20 minutes to connect and then I was transferred 3 times to reach proper support . Basically, it took me an hour just to connect them. Every one was trying to get rid of me. Also, most of them are not polite at all.

    1. IB isn’t the the easiest, that’s for sure. I don’t have much problem with the customer service reps. I’m usually extra nice, cause I can’t image their job is easy.

    1. I have used for some simple testing and so far it is been simple to use. I was using it for minute data. I have yet to test tick data or quotes for comparison

  6. I used to subscribe to ActiveTick, they have a robust API based on JavaScript. The platform is simple, offers backtest, paper trades, etc..

  7. We are really excited to announce that IBridgePy is able to run Quantopian strategies to trade with TD Ameritrade, who offers ZERO commission for US equity tradings. The YouTube tutorial of IBridgePy trading with TD Ameritrade is here: https://youtu.be/uI0CfX2ePD0
    In this tutorial, the following topics are covered
    – Download and unzip IBridgePy
    – Set up to trade with TD Ameritrade
    – Show real time prices
    – Get historical data
    – Place order
    – Cancel order
    http://www.IBridgePy.com
    You can find the email address on the website.
    Thanks
    Disclaimer: This is Dr. Hui Liu, the creator of IBridgePy

    1. Full Disclosure, I don’t use Quantopian or IBridgePy. Well because I can write my own code. 🙂 So this is not an endorsement. I definitely don’t support TD Ameritrade which I painfully have to use for some quotes, but definitely not for trading. Maybe this will help some one.

Leave a Reply

Your email address will not be published. Required fields are marked *