Update 2020: The Best and Worst Stock and Option Trading APIs
My original post is still here, I get a lot questions, so I thought I would update with my current findings.
When picking an API the $64,000 question is does Charles Schwab (TD Ameritrade) or Morgan Stanley (Etrade) really want to deal with building an out API for their customers once the mergers happen? Meaning is there enough revenue generated from API trading to keep 10 annoying coders with at least 2 dev ops bros who believe they know everything and of course an annoying project manager. I personally believe these firms kind of see the API as dead weight, with only a few customers and the trend is more getting day traders like Robinhood has? Keep in mind brokerages generally don’t have the trade fees they used to have.
The TD Ameritrade API is courtesy not a guaranteed feature. (This was told to me by a customer service rep) They don’t necessarily provide support if you send them a question at [email protected] If it’s an easy question they might respond, if it’s a difficult one then they won’t. Reddit / stackoverflow is too fond of TD API. Otherwise their documentation generally is terrible. I currently only use TD API for live option quotes, because I like they can give the entire option chain so I can analyze it on “my local”. It generally is the worst API that I have ever used. Since it’s more of a courtesy I I On the flip side I Think or Swim is awesome.
I have poked around the new eTrade API, it appear to be very easy to use. I think they are using standard REST API methods etc. Meaning they are probably using a framework such as api-platform to build it. From what little I can see it seems like it is rather too easy to use and well documented.
Interactive Brokers is what I trade options and futures with, their code has a learning curve, it is not terribly nice and sometimes you just have to wonder about serious WTF. Once you get past that and consider it is really the only game in town, it works just fine. I’m trading futures 24 hours a day, with no problems. IB really focuses on their API and has a dedicated staff, support etc.
I have not had time to test out Alpaca. I don’t get paid to write these reviews (I wish I did) So since I’m a practitioner, I don’t have an incentive to test out Alpaca or any other API at this time. Although IB is a pain in the butt, it’s working just fine for me.
I ran across this website the other day… Any wants to join forces or pay to front run Robinhood, shoot me an email. This is some low hanging fruit.
Simple guide to build TWS API on AWS EC2 instance
Currently, I’m running 2 different Interactive Brokers Trader Work Station (TWS), my own propriety python trading algorithm on an AWS EC2 instance. This is very simple instructions to get you one started, it is not the cure all.
- Build an AWS EC2 instance / 18.04 Ubuntu
- SSH into the instance
- Insert the following code as required
Cover the basics:
Sudo mkdir code &&
cd code &&
sudo apt-get update -y &&
sudo apt-get clean -y &&
sudo apt-get autoremove -y &&
sudo apt-get install mysql-server -y &&
sudo apt-get update -y &&
sudo apt install python3-pip -y && pip3 install pandas matplotlib seaborn plotly pymysql sklearn
The are two ways to VNC into your EC2 instance. The RealVNC method is little more complicated and it is an enterprise solution.
- xhost +local:Name_of_your_computer
- sudo apt install ./VNC-Server-6.6.0-Linux-x64.deb
- tar -xzf vncsetup-helper.tar.gz
- sudo ./vncsetup.sh
- sudo reboot
If you want a simple VNC method follow this bloggers instructions.
- follow instructions: http://interactivebrokers.github.io/
- sudu unzip twsapi_macunix.979.01.zip -d /home/user/
- cd IBJts/source/pythonclient/
- sudo apt-get install python3-setuptools && sudo python3 setup.py install
- Download TWS https://www.interactivebrokers.com/en/index.php?f=16040 follow instructions on the screen. (if you want to use IB gateway, which is not as sexy but works fine you can get it here)
- git clone your repo
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.
Continue reading “The Best and Worst Stock and Option Trading APIs”
For years I looked for a simple way to get earnings reports from Wall
St. It seems they would change their earning reports on a regular basis
and the dates would be inconsistent. Then one day when I wasn’t paying
attention, BAM. Earnings report and the stock would take off or crash on
the numbers and I would be left holding the bag or missed the boat. You
get the point.
Continue reading “How to Scrape and Parse Stock Earnings Reports”