The Best and Worst Stock 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.

Be sure to thank Bernanke when you get a chance.

north carolina I am headed to North Carolina for the weekend with the Marines. (My other job)  So as easy as it is to recycle last weeks headlines I won’t, but think about it for a second. Greece not solved, companies blow out earnings on lowered expectations, Republicans have little idea who will be the nominee,  market continues to climb higher on lower volume, defying any traditional logic… Same as last week.

hashtags:

#Let’s play a game: Which portfolios of mine do you think are algorithmically controlled and which are discretionary? (Hint: I might rename the Hardline portfolio, to the Honey Badger portfolio)

#Busy Robots: I was doing some research for someone the other day in regards to High Frequency Trading and it appears that 70% is the number of trades handled by robots. For a video explanation see 60 minutes.

#If you get a chance be sure to thank Bernanke:  Even CNBC is openingly admitting Benny and his Ink Jets have saved the economy. I wonder how many bankers will start crying when the “Bernake” takes away the free money or stalls on QE 3.

#Jobs number?: I was slightly vindicated for my last post about the jobs number. Due in part to Bernanke’s testimony on Tuesday and the following article.

#Let’s make a movie: I don’t usually see movies as an investment vehicle, but since this isn’t from Hollywood and it involves Marines it’s definitely worth checking out.

 

The jobs number is bogus and Bernanke knows it.

jobs number liars BLS stock markets “If you tell a lie that’s big enough, and you tell it often enough, people will believe you are telling the truth, even when what you are saying is total crap.” ~ concept accredited to Joseph Goebbels

Anyway you look at the jobs number, you have to realize it is easily the most manipulated number in all of government financial reporting. If you think the current party in political power is the first one to do so then I think you should cast your vote for the following candidate.  The real question should be why are so many people contesting people and defending the number?

2. Santelli: Here’s What’s Wrong With the Jobs Number

3. The Gigantic Conspiracy To Inflate Jobs Numbers In America via Business Insider

4. TrimTabs Explains Why Today’s “Very, Very Suspicious” NFP Number Is Really Down 2.9 Million In Past 2 Months via Zerohedge

Cramer is the CNBC cheerleader, Santelli is the antagonist, and Business Insider is usually lots of pictures & graphs and generally leans left. The Business Insider provides a good argument as well. However TrimTabs uses real time data based on tax income receipts. Simple numbers.  The trimtabs piece is the one I believe is the most analytical. (aside from the brief mention of politics) You either have a job or you don’t.  I can understand the concept of a birth death model in the jobs report, but as he says in the video no one understands the seasonally adjusted model. You have a job in one season and not in the next?

So if someone can explain the seasonally adjusted component of the BLS, please tell me or Trimtabs. Or you can keep it to yourself and make millions.  The other key issue as stated in the video, most financial reporters don’t actually read the report, they just report the number. And for someone who has written millions of lines of code, I can tell you it’s not hard anymore to write a program that evaluates the number and starts buying or selling based on the number long before you have a chance to refresh your web browser. Code doesn’t need details it just looks for the number and then the market are off to the races…

So how do I know the number is manipulated? Well the Federal Reserve has dual mandate. The first is max employment and the second is price stability.  (The unspoken third mandate, is to maintain confidence in the stock market.)  So if the employment number continus to decrease and yet the Federal Reserves interest rate policy remains at zero, then the Fed is clearly indicating it doesn’t believe the jobs number and continues to hold interest rates low to stimulate the economy.   Only when we start to see an increase in the interest rate will we know that the Federal Reserve actually believes the economy is getting better and there is actual sustainable job growth. But seeing as how the Federal Reserve has projected a zero interest rate policy until 2014, I think we know the answer. If the jobs number continues to decrease, look for interest rates to increase soon rather than later and say goodbye to Quantitative easing part 3 or 4 or 5. If the jobs number continues to decrease and the interest rate stays at zero, then start buying guns and gold because inflation or a revolution is pending.

 

 

 

 

When stocks reach the moon, it’s time to stop buying.

newt gingrich moon stock market rocket Well… Newt Gingrich wanted a moon colony, I just didn’t think that the stock market would get there first. Down 100 points in the morning, rally to end the day flat.  Makes sense?

#(facebook + twitter + myspace)  = my-twit-face:  The movie was great. (David Fincher is a great director: Seven, Fight Club) Unfortunately I don’t see this a great investment,  Jim Rogers doesn’t either. On the contrary, Jim Cramer doesn’t want to “BUY, BUY, BUY” so that might be a contrary indicator. All I can say is that unless you have a co-located connection to the exchange and a super fast computer, I wouldn’t bother.  Yes, I know everybody uses facebook and you saw the movie. But consider 2 key issues to take into account. 1. Don’t forget private shareholders and secondary share holders will be dumping this stock to take profits.   (off the top of my head they have been holding shares for two years now…) 2. The twitter search frequency sentiment engines are already salivating at this IPO. I know my twitter search algorithm has already been tracking the symbol $FB. So if you want to short or go long, don’t worry the high frequency algorithms will be happy to front-run your trades.

#financial advisor: Email me if you are interested in recreating the Hardline & Quatro Kinectic porfolios for your clients.

#What the Republicans can’t seem to understand: The GOP Deserves to Lose: That’s what happens when you run with losers.  Think  of it more as a different perspective.

#House in Davos: Henry Blodget of business insider fame, was lucky enough to get an interview with Robert Schiller in Davos, the creator of the Case-Shiller 20-city Index of home prices. (Released tomorrow at 9:00 am)

#Greece: We are currently between stages 3 and 4 in the five part Greece flowchart.

#Developing: Will be submitting an application to the marketplace on stocktwits.

#back by popular demand & laughs:  Okay, I guess you could call this the honey badger market. (This might be the most profound statement on the blog today.)

#641: I track over 641 stocks, you can see where I stand on any position here.

 

 

 

Greece default. Don’t even worry about it…

support your local banker federal reserve
There is nothing like waking up in the morning and pulling out the good old blackberry, (sorry, I’m old school) and reading via my twitter feed that Jamie Dimon sees little impact from Greece default. After that I turned off the alarm, because there is no longer need to worry and slept for another hour or so!  Thank goodness we have bankers to tell us how to think!

Well I won’t go into a tirade,  there are plenty of other people I can link to that deserve the credit. Of course, Zero Hedge, had an immediate response. (Weather you like the site or not, thank goodness we have a free press.) Even the “highly analytical” Business Insider produced a simple slide show, two months ago. If Jamie is so unconcerned, maybe we should stop with the whole Bernanke ZIRP (Zero Interest Rate Policy) and  he can start marking to market JP Morgan’s balance sheet.

hastags:

#If your bullish don’t watch this:  Charles Biderman Explains The Bullish Market Ponzi, video via Zerohedge.

#Congressional portfolios: Politicians are the best traders. video via 60 minutes.

#CNBC  investigates: Most Share Buybacks Don’t Pay Off for Investors. The following is probably true in the long run, just ask Eddie Lambert of Sears. On the contrary, let’s not forget the robots see buybacks in the news feed it can send the stock up 11% in one day, just look at Dick’s Sporting Goods.

Below are the best and worst performing stocks of 2012. Do you see a trend?

CNBC indicator is at an all time high!

CBNC Porn markets front page
CNBC front page 1-19-2012

Oh, boy! CNBC doesn’t even report the news anymore, they are terribly concerned about the Porn industry! Can you figure out which links they want you to click on?

This after yesterday’s indicator was at a high level as well! I don’t have the stats in front of me but generally speaking CNBC ratings go up when the market starts to tank. That’s why they have those “special” reports in the after hours to explain why the market is going down and you should be buying stocks.  Or maybe it was this time that Cramer saved the market from the flash crash. When the market goes up, nobody cares, so they have to rely on other tricks…

No setups today. But you can run your stock thru my database to see how I am tracking it, there just 600 or so with a buy signal on 80% of the stocks tracked.

 

The CNBC Indicator

boring city oregonA whole lotta nothing…  The markets seem to be in a holding pattern. So I could yammer on about the unsolved European debt saga/tragedy but I won’t. The Fed, which is generally speaking is considered a banker’s best friend, is starting to see moderate growth in the economy according to the Beige Book. This could mean one of two things.

1. The American Economy is growing and it will be time to stop the printing presses soon. (Good for the dollar & savers, bad for the multi-nation companies & the stock market)

2. Mr. Bernanke and his friends are wrong again.

Although I refuse to watch the low attention span financial channel masquerading under the name CNBC, I do browse the website. (Mostly on my phone walking the dog, so I guess that makes me a hypocrite.)  Someday I would like to create a CNBC indicator.  I could browse and analyze headlines on CNBC and see if there is a correlation between the tone of headlines and market performance. Today, would be a great day to start. I saw the following two articles on the front page right next to each other on the website.  Breakout: S&P 500’s Highest Close Since July Could Fuel More Buying and right next to it  Dow Rally to Fizzle Out by End January: Charts. What’s a trader to do? Hence the market was generally flat for the day. But I don’t need to analyze CNBC, I can do that on Twitter.

On another note: With the abundance of internet connections, screen casts and charts drawing tools anybody can become a chart master and produce “set ups”. No one ever tracks the performance of these “set ups”, maybe it’s an indication that nobody cares? No one wants to “verify” those trades? Well technical analysis is great, but I can create about 600 setups in about 6 minutes.  So below are 10 stocks that came across my algorithmic scans.  I am only providing the entry point or the trade idea.  You do the rest. If the stock goes in the wrong direction my algorithm will get out and if it goes positive then it will stay in, but I won’t be tracking it here.  The only trades that I track are the trades in the Just the Numbers portfolio and you can see those by subscribing to the newsletter.