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


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


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).


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


  • 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.


  • 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


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

Interactive Brokers:


  • 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


  • 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.

45 Replies to “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.

      1. so, using Ally for streaming prices on stock and options symbols and using Ameritrade for opening orders in paper trading or live account ?? Does this make a good solution.

        Key part for me is to be able to easily monitor realtime prices (streaming is best, rather than get price call..) and if price hitsm y trigger point, then using Ameritrade API to send an actual order??

        1. So currently this what I’m doing for a variety of reasons. Some good and some just because that’s the way the happened.
          I get all my stock and futures from IB. I’m biased towards IB because at they end of the day they have customer support.
          I pull my options price from TD. I know they have a streaming service but I haven’t bothered to use it because I don’t need it.
          My involvement with IB, is primarily due to the fact I can paper trade my algo to test out any bugs in the execution phase.
          I have used Ally, and it is a straightforward API, however I get concerned about how much longer they will support the API. Support is also a little hard to come by. I’m also a little concerned with TD and their support for the API.
          Hope that helps.
          Otherwise, I’m available for consulting.

  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:
    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
    You can find the email address on the website.
    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.

    1. You really have hit the nail on the head. Most of these brokers build out an API and then about a year or two later they figure out that it’s not worth support it from a technical and revenue-generating standpoint.

  8. Grossly outdated? Puhhhhlease. Don’t encourage them to come out with some html based javascript abomination

  9. Hi, I hope that you’re well.
    Do you have any experience with Tradier Brokerage? I think they are a cloud based, and only charge a nominal monthly subscription fee. I think they only offer a brokerage API and you’ll need your own trading interface to place trade. Do you have any insight to offer on Tradier Brokerage? Thank you for this post, by the way.

    1. Sorry, no experience with Tradider. I’m currently using TD and IB, combined the two brokerages meet my needs for options futures and equities. I don’t know much about Tradier and have nothing against it, but I just try to stick with the bigger firms for better or worse. There have their own brokerages and pipelines into the market establish infrastructure and some customer support, etc.

      1. I’m hitting a wall trying to figure out why I’m getting a 500 error when requesting info for options contracts. I have about 20 stocks I follow. Three of them return data, the rest I get 500 error on a GET tested through Insomnia. Today Disney doesn’t want to play, but it did a day or two ago. I’m using IBeam as middle where. Any thoughts on why I’m getting 500 error? Like I said, I’ve hit a wall on this. That I desperately want to get through.

        https://IPAddress and Port/v1/api/iserver/secdef/info?conid=6459&sectype=OPT&month=APR22&strike=140&right=C

Leave a Reply

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