Hacker News new | past | comments | ask | show | jobs | submit login
Why is there no open source Financial Stock APIs?
63 points by rammy1234 on June 13, 2017 | hide | past | favorite | 39 comments

Most financial market data comes with strict licensing models. To get data from NYSE, NADAQ, CME or most other exchanges you must sign the agreements. Selling this data to vendors, news networks or end consumers is a large portion of the exchange's revenue.

The more granular or quickly you want the data, the more it will cost. In addition to paying for the initial data, you are not allowed to redistribute the data, in real-time or historically, with out paying royalties to the original data providers per user.

This creates a complicated accountanting system for data delivered to end users of the data.

Aggregate market data vendors (Factset, Bloomberg, Activ) pay for the initial data and then pay per user/query/etc...

Some data becomes available for unlimited distribution based on licensing, usually this data is time delayed and not allowed to be queried for historical analysis. You'll often see things on Yahoo or Google Finance that say "market data delayed by 10 min".

One of the most common sources of this delayed data is yahoo and there are open APIs for querying it. Usually in Python or a statistically language like R.

Interactive Brokers has an API you can add to your brokerage account for programmatic access across multiple exchanges. Which provides market data and order entry.

If I miss understood you, and you are interested in a open API standard for financial data there are several FIX, ITCH and OUCH are some. But they are almost always forked per exchange and sometimes even per product.

tl;dr It's not the API or infrastructure that costs, it's the data itself.

I never thought exchanges were making money by selling data.

That's virtually their business model. In the modern world exchanges have 3 things on offer standardization, order entry & market data.

The final 2 are how they make their money.

I have never used this service so don't consider this an endorsement, however Alpha Vantage seems to fit your requirements (other than being open source, which I don't particularly understand anyways).


Their site says:

We have one shared aspiration: democratizing access to institution-grade financial analytics. Alpha Vantage is one of our deliverables towards this purpose. It provides free JSON APIs for stock market data, augmented by a comprehensive set of technical indicators.

yes that is great. But now with these replies I am getting curious to know how they provide something like this for free

I wonder if it's a front from a trading company and they look for hires there.

You might find this useful: https://iextrading.com/developer/docs/

I work on the team at the Investors Exchange that built this API. We think financial data should be more accessible.

So I was really excited to use this API. Documentation looks, good and simple to use. But then I ran across this:

---> • Historical data is only available for prior months, starting with January 2014

Hopefully they will update this.

As of right now I have only found eTrade provides historical data, and you have to apply for that data.

Thanks for checking out the API and for your compliment on our docs. Our historical data is currently limited to IEX, but we have a major update coming out soon. We plan to include years of EOD data, fundamentals, financials, earnings, technical indicators, and company info. All for free.

Very interesting, thanks! Out of curiosity, how soon is "soon" for the expanded data? If you're able to say whether it will be this/next quarter, or this/next year that would be interesting.

This looks great, too bad the historical data goes back only to 2014...

Thanks for checking out the API.

Is this project free for commercial usage?


thumbs up. will try using it.

What fun would the markets be without ensuring there's always an information asymmetry at play?

Besides, nothing excites me more than looking through a bunch of third-party data provider websites that look like they were made in 2002, half of which don't even list their prices—but instead rely on sales teams to bilk the customer out of whatever they can pay.

Of course, that isn't to say you can't get your data directly from the exchange:


The only caveat is that you might need someone versed in Microsoft or Oracle enterprise licensing hell to actually decipher what's going on there.

Grief, you any idea how much time I've spent _at banks_ trying to knock information into shape? There are _no_ good sources of this information. You take a feed from NYSE and I guarantee you'll find errors _on NYSE information_. The more complex the product, the more data points, the worse it gets.

And I've only talked about static data. If you want to actually trade, it gets much, much, harder.

This brought back troubling memories of discovering that a non-trivial amount of the world's economic data seems to be shuttled around banks via batch-generated CSV files, only accessible via nightly FTP drops.

Moving large amounts of data around, that you don't need real time.

CSV is a grand solution, one that has a hell of a lot less over head than any other "api" that many HN readers would normally see.

A lot of it has moved to SFTP/SCP the last few years.

Yes, but often you discover that the required semantics are those of a transactional queue.

true unless NYSE or other exchanges expose data in this modern world in all possible means for potential buyer. Is this not a fair ask ?


Ultimately it's due to that APIs used to generate wealth generally cost money.

Agree. But what is the point are we not entitled to get the data using an API from an exchange that is publicly traded. Is trading a private affair ?

Well why should you be entitled to free data from a private corporation? Just because the exchange is open to the public to purchase on it doesn't mean their data has to be free. (just my 2 cents)

my perspective was if public traded I need to be exposed information as I see fit. In one form or another should they not disclose their details for a buyer or customer who is going to invest (potentially )

Just because something is public doesn't mean you get their services for free.

Because the exchange is not legally obligated to provide the information, and therefore can charge a premium for it.

a strong point. kind of puts a dent in the efficient market hypothesis, and the glorious dream that traders believe in: that the market is somehow inherently democratic. how are we expected to believe in this if we don't have access to the information?

this asymmetry would seem to skewer emh.

-- but then again ... checking the prices at "nasdaqtrader" the idea that we don't have access seems like the myth. $14 a month for Nasdaq issues ( I guess that means quite a lot of stocks ), is only slightly more than my Spotify. And if you don't have the money to pay $14 you probably don't have the money to make much of a dent in the market anyway!

so what's the reality here? is data you can actually trade on that affordable or is it not?

case I would then make is spotify is selling private art ( music ) from a private seller to public for a fee. it is like you pay for watching a movie from a private distributor. Trade is like I invest money for their business. I need to be informed buyer is what I would say. But then it is not about affordability or about I would be able to make a dent in the market. i will be fine if i can make a dent in my pocket. it is about information and data which like you say investors believe is democratic in nature ( but which it sounds like is not )

Apple is publicly traded but surely you don't expect to get a real-time feed of all their transactions and revenue operations

Even though not quite open source - I'd also recommend checking out https://www.quantopian.com and their Pipeline API - https://www.quantopian.com/help#pipeline-title. The data and the algorithms are only as good as what you can do with them and Quantopian is on to something IMHO.

Quandl has some free data and an API: https://www.quandl.com/

How do firms like Fidelity , AmeriTrade get their information in real time ?

All the large brokerages are probably members of the stock exchanges. E.g., the NYSE says:

"NYSE Equities Membership provides broker-dealers the high-tech solutions needed to make rapid, automated, and anonymous executions. Industry-leading member services experts discover and improve prices, dampen volatility, and add liquidity. Membership brings access to opening and closing auctions for primaries, brand visibility and direct connectivity."


They pay for it.

And that's a can of worms. What are they paying for by the time they receive it. What is the physical point of receiving data? Which exchange is the data received from? Central data clearing house of data?

Real time is a concept that doesn't exist in live data. How real-time is a concept.

what kind of API we are talking about, my broker does have a trading API, which I am using every day, also IB they have an API as well...

Is Trading a private affair. Lets say if I want to develop an open source API , How should I go about?

When you say API, what interface is you application for? The non-licensed traders or the brokerages?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact