May 13, 2024 5 MIN

Why we're building the open-source OpenBB Platform to power the Terminal Pro

Many people are surprised to find that OpenBB Platform, the core part of our data access layer that powers Terminal Pro, is both open source and freely available for anyone to use to build their financially-powered applications. It’s time we talk about why we’re building the OpenBB Platform.

blog hero

Introduction

The OpenBB Platform is a core part of OpenBB’s mission to democratize access to financial data.

We see the OpenBB Platform as an open-source “protocol” for accessing financial data and making it accessible to everyone via a single, unified API.

By doing so, we aim to address many pain points experienced by financial developers (including ourselves!), small hedge funds, and individual investors when it comes to accessing data.

A universal and open financial API

Currently, the fragmented financial data landscape is a significant challenge for those who rely on accurate and timely data (which is also often from multiple providers).

Developers, analysts, and businesses regularly struggle with the complexity of integrating and maintaining connections to numerous APIs from various data providers.

Besides integration pains, vendor lock-in is also a common concern that we hear about often.

Anyone who's ever attempted to build their own financial tooling, application, or in-house trading strategy is very familiar with the pain and struggle of finding an appropriate data source from a provider and investigating the API.

Sometimes, you’re lucky and get an API wrapper for the language of your choice.

Other times, you’re forming and making your own web API requests.

Then, after navigating the integration process, you discover that the provider data source doesn’t provide the exact data you need, has some other undocumented limitation, or doesn’t match a spec you require. So, you start your search and integration cycle from scratch.

At OpenBB, we’ve been there before. Many times.

That's why we built the OpenBB Platform.

The primary is goal is for OpenBB Platform to act as a universal "rosetta stone" that integrates with multiple providers on your behalf, so you no longer have to deal with API integration challenges to get access to financial data.

By using OpenBB Platform, you’ll only have to learn a single API, and you can access the financial data you need from a wide range of supported (and verified) data providers from a single unified interface.

Better still, the OpenBB Platform is open-source and designed to be extensible (we have a full extension system), so if you'd like to add a missing data provider, you can create an extension (or if you're a data provider, reach out, and we can help you integrate your data directly into OpenBB Platform).

Hopefully, we’ll be able to define and set the gold standard for accessing financial data from Python.

We want tinkerers, and developers and builders and family offices to focus on creating impactful applications and strategies rather than managing a zoo of data sources. We don't believe accessing and integrating with multiple data sources should be a barrier to entry, and would like to encourage competition within the industry (amongst both data providers and financial applications alike). Ease of integration shouldn’t be a moat.

An example: Exploring multiple providers for historical data

To demonstrate the OpenBB Platform, we’ll retrieve historical data using two different providers, and then the OpenBB Platform.

First, here’s how to retrieve historical data from Intrinio. I’ll be using their official documentation example (at the time of writing) for retrieving historical data using their Python SDK:

from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException

intrinio.ApiClient().set_api_key(INTRINIO_API_KEY)
intrinio.ApiClient().allow_retries(True)

identifier = 'AAPL'
tag = 'adj_close_price'
frequency = 'daily'
type = ''
start_date = '2018-01-01'
end_date = '2019-01-01'
sort_order = 'desc'
page_size = 100
next_page = ''

response = intrinio.SecurityApi().get_security_historical_data(identifier, tag, frequency=frequency, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, page_size=page_size, next_page=next_page)
print(response)

And here’s the same for FMP, where we’ll be using the web API (typical of the problems we raised in the sections above, FMP lists both a Python SDK and a Python Module, but I couldn’t find good documentation or a feature set for either, so chose to stick with FMP’s web API):

import httpx

symbol = "AAPL"
from_date = "2018-01-01"
to_date = "2019-01-01"
url = f"https://financialmodelingprep.com/api/v3/historical-price-full/{symbol}"
query_params = {
    "apikey": FMP_API_KEY,
    "from": from_date,
    "to": to_date
}

response = httpx.get(url, params=query_params)
print(response.json())

Notice there are some significant differences in the API:

  • Different authentication methods

  • Different keyword parameters

  • Different paging methodologies

  • Different endpoints, and so on.

Now, let’s do the same with OpenBB Platform.

Here’s Intrinio:

from openbb import obb

results = obb.equity.price.historical("AAPL", provider="intrinio", start_date="2018-01-01", end_date="2019-01-01")

And here’s FMP:

results = obb.equity.price.historical("AAPL", provider="fmp", start_date="2018-01-01", end_date="2019-01-01")

This immediately illustrates the benefit of OpenBB Platform’s “protocol” approach.

We can easily use a different provider just by specifying which one to use. The API is that easy.

OpenBB Platform is also clearly and fully documented for each and every function (and provider) that is supported.

For the historical pricing function in particular, we currently support 9 different data providers!

We hope this speaks for itself for our goals with regards to OpenBB Platform.

Getting started with the OpenBB Platform

Building with OpenBB Platform is incredibly easy, you just need to use pip to install the library:

pip install openbb

And you should be good to go.

Set-up your API keys for the data providers you’d like to use (or use yfinance as a provider while you experiment), and you’re ready to being building.

Be sure to take a look at our in-depth Documentation to get started, and raise an issue on Github if you run into any problems.

Conclusion

OpenBB Platform is the tool we wish existed, so we built it to supply the financial data powering Terminal Pro.

Since we continue to believe in our core mission of democratizing financial data access, the Platform has been an open-source project from the beginning.

We want everyone to have easy access to financial data using a singular, easy-to-use API that seamlessly integrates multiple providers.

OpenBB Platform enables developers, analysts, and investors to focus on what truly matters — creating impactful financial tools and strategies.

We can’t wait to see what you build.

Explore the
Terminal Pro


We use cookies

This website uses cookies to meausure and improve your user experience.