Do you know an API that lets you trade with real life stock or currency?
If so, please describe your experience:
- ease of development
- commissions
- sandbox environment?
- etc.
Do you know an API that lets you trade with real life stock or currency?
If so, please describe your experience:
AFAIK, TradeStation is the most famous of the lot. Most other trading softwares provide APIs (NinjaTrader, MetaStock etc). FWIW, there are even competitions of automated trading systems -- see this.
Also, this is something that the exchange has to support and your broker has to allow. Most exchanges I know of, do not allow automated trading without prior permission.
There are many brokers who will give you access to an API which lets you trade. Obviously you will be paying commissions to them as well as the bid/ask spread which may be wider than the direct markets. They will all differ in the types of instrument that they allow you to trade.
If you want an easy way in, you can use shrink-wrapped software such as Tradestation (horrible proprietary language), NinjaTrader (a little better, C#-based), or SmartQuant (better, C#-based). These generally have pre-built interfaces to a number of brokerages who will actually execute the trades. InteractiveBrokers also has a direct API but they have a reputation for being a pain to deal with.
I would recommend checking alternative forums, such as EliteTrader which has a wealth of information on the relative merits of different brokerages. There are also plenty of folks on there trading through APIs.
Try TD Ameritrade - they have a nice API, relatively low trading fees, and a good help forum . Link to their API offering overview.
Most electronic stock exchanges don't provide an API, they provide a message specification. To get them to accept your messages (i.e. to trade directly with them), you will have to spend a very large amount of money. and become a member of the exchange - that's what IBs do. Even a live market data feed (which you would need in order trade sensibly) can be ridiculously expensive.
This is similar to a question I asked a couple of years ago: What online brokers offer APIs?
I would recommend looking into Interactive Brokers, which is the one I ended up choosing. Their API supports multiple languages including Java, C++, ActiveX and Excel's DDE. You can effectively do just about anything via the API that you can do using their fairly robust trading platform.
As a broker alone it's hard to beat IB's crazy low commissions (most of my orders are so low they get rounded up to the $1 minimum commission per order). Combine that with a fairly straightforward API and it's hard to beat.
Also, take a look at my question (linked above, and here) for more information on brokers that offer APIs.
I've just started playing around with TradeKing's API. Its dead simple and uses oauth. The $5 trade commission isn't bad either.
E-trade also has an api, but you have to go through some hoops to get production access. They also provide realtime streaming via a comet interface. There don't seem to be any libraries out there for etrade either except for the java ones etrade provides.
i suppose the newest, but has an online ide / debugger / visualizer, and integration with interactive brokers for paper trading and real trading. great community for R&D too
Contact your target Stock Exchange for trading API and test server. If your target Stock Excnage is on OMX platform, you will be provided with X-Stream API (unmanaged c++) and docs.
You may also want to take a look at TD Ameritrade .NET SDK hosted at Github
I believe there is an API for working with ETrade and some of the other trading software. I don't think you're going to find an API for executing trades without making use of a commercial product, though. If you're trying to do some analysis of trades, though, there are APIs available for retrieving quotes, listening to ticks, getting historical data for a symbol, etc. As I said at the beginning, many of the existing commercial products have an API for writing code to work with them.
I have used NinjaTrader and MetaTrader to trade currencies and futures products.
Ninja trader is very easy to use. I don't have super in depth coding skills although I can hold my own, and it worked for me just fine.
Their application is free to download. They have also created an "app" where you can choose different technical indicators to create trading strategies.
Having traded for awhile using automated systems, winning and losing, I would highly suggest using TICK DATA when you trade. Automated trading in the sense where you are using technical indicators to make your trading decisions is very competitive and very fast. Meaning, if you are using data such as 1min data, you are going to be behind the profitable trades, if there are any for your system.
I can tell you that as a day trader, the days of sitting at your screen and trading when the 1 min moving average crosses the 10 min, or something similar to that, are over. Not to say longer term strategies don't work, they do, on the daily charts.
My point is, use tick data no matter what platform you use. Ninja Trader is pretty good. Sign up for the tick data, and use that to trade. You'll have a better shot at being profitable if you are using technical indicators.