↓ Archives ↓

automated trading via optionshouse api

Trading securities is a dangerous game. It can be difficult to develop a strategy and stick to it in the face of an emotional marketplace that stampedes from one extreme to the other. Sticking to a trading strategy takes time, discipline and serious balls far beyond the capacity of most human beings.

One way rise above the impediments is to encode your strategy into an algorithm and instruct a machine to execute that strategy for you. You can still freak out and pull the plug at any time, but until you do, machines can execute your strategy without hesitation or emotion. Just the exercise of encoding potential trading strategies into machine instructions is enough to spot problems and potential weaknesses.

That's why my highest priority when choosing a stock broker was API quality. Strangely, I only found one broker who's trading API was even acceptable, OptionsHouse. The OptionsHouse API offers all the functionality you need to create simple trading algorithms, the documentation is acceptable and they offer paper trading accounts so you can easily test your algorithms without using any real money (an absolute requirement).

To get started learning how to use the API, I created a generic API client in Python. My aim was primarily to create something generic enough to be useful to anyone who wants to automate interaction with OptionsHouse, and secondarily to create something reliable with unit tests that guarantee certain functionality:



  • Dec 1st 201215:12
    by bobby chamblee


    Been interested in finding someone who actually is using API interface to automate trades on Optionshouse. Wish I new more about java and python. Thanks for putting on web. I have a special need that I think a canned robot trader could not do. Not sure how I'll proceed on getting my trades to automate. Thanks for your time to do this web site.

  • Apr 1st 201318:04
    by APIUSER


    I just looked at the API and it does not meet my programming needs. It is too complicated to use.

  • Jun 19th 201400:06
    by Eryck


    Hi steve. i also have an account with optionshouse, and am thinking about algo trading. I'd like to ask you a couple questions regarding on such issue. First of all, do they charge you extra for using api to interact with them?? secondly, is the api only works with python?

    • Jul 23rd 201416:07
      by Adam


      Hi Eryck - I can tell you that if you look at Optionshouses' api, it's designed to be interfaced with any language capable of sending web requests (POST/GET etc.) via https. Python is one. You could use Java. Javascript. Literally any language will have some facility for it. Stephen just chose to use python as his language of choice for this - I've actually done the same.

      And no, they don't charge extra, but there are limits on the service. I'd suggest reaching out to them for more info.

Leave a Reply