
Ask HN: What stock trading API do you use or recommend? - codegeek
I am thinking of playing with stocks (small amounts just for fun). But I do want to do real money. What are some of the stock trading APIs that folks here at HN recommend ? Ideally I would create an application that can place orders for the stocks that are pre-selected and mostly do buy&#x2F;sell. I guess the idea is that I want to play with my own custom algorithm for fun to see if I can make some money through my stocks using some type of automated way (not talking about HFT or anything too serious).
======
ArtWomb
For data, IEX serves free stock api that supports websockets

[https://iextrading.com/developer/](https://iextrading.com/developer/)

To research and backtest strategies, check out the Quantopian community. You
can perform your analysis right in an IPython Notebook and share it with
really smart people.

[https://www.quantopian.com/notebooks/survey](https://www.quantopian.com/notebooks/survey)

Will Robinhood ever release an "official" API for commission-free algo
trading? They may have their hands full with all the inexperienced options
traders getting their first margin calls last week. In the meantime there's
plenty of room for competition:

Alpaca | Algo Trading Commission Free With REST API

[https://alpaca.markets/](https://alpaca.markets/)

Best of luck and research your risks before using real money ;)

------
yoshyoshi
Hi I am a founder of Alpaca, but please try out
[https://alpaca.markets/](https://alpaca.markets/) . We built this commission-
free trading API for tech developers in mind (simple REST API).

We also wrote up articles wrt market data and any algo-trading related
applications here as well!

Algo trading application list [https://hackernoon.com/9-great-tools-for-algo-
trading-e0938a...](https://hackernoon.com/9-great-tools-for-algo-
trading-e0938a6856cd)

Data vendors list [https://blog.alpaca.markets/blog/2018/7/24/data-data-
data-11...](https://blog.alpaca.markets/blog/2018/7/24/data-data-
data-11-great-financial-datavendors)

------
fernandomm
I'm currently using MetaTrader software[1] and their language MQL ( MetaQuotes
Language ), which is basically C++ with some trading functions/libraries.

Most of my code is written in Python, so I only use the C++ part to place
orders. Everything else is done with Python.

The 2 main advantages that I see with MetaTrader is that:

\- I can change brokers without having to rewrite anything or learn a new API.
I just need to enter the server + login information in MetaTrader. At least in
my country, almost all brokers have MetaTrader support.

\- I can run and store the code locally. If you use something like
quantopian.com, the code is run and stored in their servers. This brings a
series of limitations like outdated/missing libraries or slow backtesting
since they have to limit CPU/memory resources.

[1] [https://www.metatrader5.com/](https://www.metatrader5.com/)

~~~
malux85
Hey - can you email me please (in my profile)

------
baccredited
I'm using Tradier and like it. But I use it more for stock data than actual
trading. It is free if you open an account and fund it.
[https://brokerage.tradier.com/](https://brokerage.tradier.com/)

For trading I prefer
[https://www.motifinvesting.com/](https://www.motifinvesting.com/) which lets
me name a given strategy, purchase up to 30 stocks, and they will track
returns. It is manual, not API driven but the returns tracking and public
track record is worth it for me.

------
pbarnes_1
Interactive Brokers

------
charlesdm
Robinhood has a reverse engineered API. You could probably use that for
trading, though I'm not sure.

Interactive Brokers has an advanced API as well.

------
santa_boy
Interactive Brokers is very good. It has the benefit of having a very good
python interface and a decent R interface. If Python or R is your analytics
engine, IB can be a great choice.

~~~
rayvy
I've always wanted to use IB, but once I saw that I couldn't use special
characters in my password on signup, I decided it was a no-go, haha.

~~~
santa_boy
Never realized that ... very strange! But, I have very little confidence in
passwords these days. I prefer 2FA much more. Thankfully .. in India .. most
things of value need a second authentication via an SMS OTP code

------
matheweis
TD Ameritrade has a decent API, if you ask them nicely.

