Live data from Hacker News

Ask HN: Are there free APIs for Financial trading?

news.ycombinator.com

1–10 of 13 posts

Re: Ask HN: Are there free APIs for Financial trading?

#2
There are plenty of free data feeds, basically any exchange with a free account will offer you a lot of data for free, near real time. Some via REST calls, some via websocket. Some might also offer some daily numbers or hourly numbers going back a few months/years. A lot of that said data will be market-maker data, meaning it may diverge in time from the real exchange information.

I'm no expert but if you want REALLY up to date information with many ticks per second, you'll have to pay.

As for trading, you're either paying fees or paying by the spread (difference) between buy/sell.

There is no free lunch.

Re: Ask HN: Are there free APIs for Financial trading?

#6
Alpaca API lets you trade stocks with a commission free API. They have a REST API and you can also receive data over websockets via their polygon.io integration if you have a brokerage account.

Tradier lets you trade stocks and options. Tradier option trading is commission free if you have a subscription, otherwise there is a small commission per trade. They have an API for market data over REST API and websockets.

TD Ameritrade has an API and tda-api python package makes it easier to use, but not easy to paper trade with it for testing.

You can also use an unofficial Robinhood package like robin_stocks, but Robinhood doesn't officially support any of this.

Interactive Brokers supports the most instruments, including many currencies, futures, etc, but you will pay a small monthly fee for historical and real time data, plus commissions. I recommend the ib_insync package to make their API easier to use.

Self promo: I have a YouTube channel that is focused on this topic:

https://youtube.com/c/parttimelarry

Post reply on HN