Openness and Innovation in Self-serve Stock Brokering

The banking and finance industries, as you may know, are not on the top of the list for openness.  "TradeKing has aimed to be the most innovative and transparent broker from the beginning," CIO Dan Raju said when I spoke with him recently about the TradeKing API and the strategic reasons for providing it to the marketplace. TradeKing deserves credit for taking this bold stance. I ran quick check against other popular online brokers.  None of the following offer an API as far as I could tell:  Fidelity, Scottrade, Schwab, ShareBuilder, ML Direct.  The only other broker APIs: TD Ameritrade API and E*TRADE API. So there you have it, my brethren of the API consulting business.  A list of brokers that will need to develop an API strategy in order to remain competitive.  Let the strategy sessions begin. TradeKing really is working hard to make its API attractive to developers because it sees investors of the near future "trading their own way" on whichever device or interface that might be.  The TradeKing strategy is to "rely on innovation to create market space," Raju said. He jokingly claimed that TradeKing "eats its own dog food" when explaining that it has developed an active trading platform in HTML5 on top of its own API.  So not only is this broker creating a well documented API, it is using it internally to build live production-ready trading interfaces. The TradeKing API takes requests in XML format through HTTP POST.  Responses are returned in either XML or JSON format.  The documentation comes complete with example implementations in Ruby, Python, Java, VB.NET and for extra credit, Node.js (Javascript).  Security is key for a financial API.  TradeKing is using OAuth to secure API access.

Be sure to read the next API article: Semantinet Graphs Almost All Human Knowledge, Provides API


Comments (6)


i think my response got caught in moderation purgatory, but yes I do have links.


The bit about "current popular scripting languages" is slightly misinformed, there are python (ibpy), ruby, and scala (and probably more) implementations of the ib api. I say "slightly" as these aren't provided by ib but are 3rd party open source wrappers, but they still work fine.

That said, you do make a good point about additional software running to act as a middleman in the connection, in ib's case this is a java based "gateway" server running in the background. It would be nice to not have this requirement, but I wouldn't pay up to the degree of the fee/commissions differences between TradeKing and IB.

There is at least one other out there where one can leverage python, perl, ruby, et al. That is with the quickFIX engine, an open source implementation of FIX protocol, which is a standardized broker independent messaging engine. Most serious brokers support this (such as IB and most futures brokers), although I doubt many retail specific equities platforms do on the surface, yet...

Dave, do you have any links to the implementations of the Interactive Broker API? Do you know of any public projects that are using them?

Thanks for keeping our information accurate and complete. I didn't find those APIs in my initial survey of the space. Now that you mention them, I can't resist having a look.

Both Interactive Brokers and MBT APIs seem to be quite different from TradeKing in that the TradeKing API is implemented in the current popular scripting languages and it also uses simple HTTP REST requests. Interactive Brokers and MBT are focused more toward people that want to develop desktop applications. For example, Interactive Brokers requires that you actually run additional proprietary software on your PC in order to use their API. MBT provides trading access through some type of SDK.

While both these brokers are offering programmatic access to their order entry system, its a bit like comparing apples and oranges. TradeKing is optimized for any type of client implementation with no strings attrached. Interactive Brokers and MBT are requiring a bit more of application developers. In doing so they are quite possibly restricting the potential variety of client implementations that could be produced by the developer community.



The only other broker APIs: TD Ameritrade API and E*TRADE API.

Not quite correct:

Interactive brokers


Plus some others I can't recall right now.

[...]  The only other API we’ve documented that triggers real-time trading of financial instruments is TradeKing.  Has the trend started? Related ProgrammableWeb ResourcesLearn more Collective2 API [...]