Hacker News new | ask | show | jobs
by optymizer 2225 days ago
Beginner question on a related topic for those of you more knowledgeable than me:

Is there a way to get access to the order books on Nasdaq or other exchanges?

I'm working on a script that can run stock trading algorithms (and hopefully see some profit).

My first trading experience was with crypto on GDAX (now Coinbase Pro). The order book on GDAX is basically available via their API. I've been looking at various stock trading APIs (Alpaca looks interesting as well) and it seems like the only thing that's available are broker APIs that don't share the order book.

Is the order book on Nasdaq and other exchanges unavailable to regular folks like me? Is it hidden, available to institutions only, or to some sort of registered brokers?

Having first dealt with GDAX and now looking at stocks, it all seems so ambiguous and hidden behind 3rd parties, unclear order execution, etc. (not that gdax was perfect - it has its issues), so I'm just generally confused as to how things work.

5 comments

You have to buy the feed, the market data isn’t free. Depending on your usage the fees can get fairly steep [0]. And that’s just the market data, you need to pay for colocation, cross connects, and order entry sessions. Of course Nasdaq is only one US equity market - there are 14+ with more coming online in recent years.

[0] - http://www.nasdaqtrader.com/Trader.aspx?id=DPUSdata

I need to create and operate a market place.
This is great. Thanks for the info - it does look expensive. I might have to investigate other exchanges.
Check out interactive brokers. You have to pay for the market feeds but it’s all available via API. It’s a completely horrible, painful API, but it’s the only way I found to get the data as a hobbyist.

There’s a process where you certify that you are a non-professional trader and they give you access to the data feeds for a reasonable price.

I’m working on a similar project, in case you’re interested in swapping notes (contact info in profile)

Thanks for the info! I might reach out with questions :)
I could have sworn yahoo finance or some other stock/finance site had order book available ( though it may have been a delayed version ). But I can't find it, maybe they shut it down or maybe I'm imagining things. If you have a brokerage account, it might have it depending on your account level/type. Else you would have to pay for it.
Sure, you can see market depth as long as you pay for the data. Check out Interactive Brokers.
Thanks, will check them out!
as everyone has said in the child comments the best way to do it is by buying feed access. on the other hand i am working through IEX data on a historical basis to backtest strategies
Thanks, I looked briefly at IEX. Seems like a good source of historical data (maybe real-time as well). One thing that caught my attention was their use of SSE - I typically see WebSockets-based APIs. I also noticed the free account gets 50K messages, which sounded like a lot, but it turned out it was just enough to set up one alert on the account - somewhat underwhelming, but I understand they'd like to convert the free accounts to paid users as fast as possible.
the best part about iex is that they give you milisecond historical data but on the other hand the data is only limited to their exchange so it clearly doesn't represent every exchange.