Investment research for everyone, anywhere.
npx @tessl/cli install tessl/pypi-openbb@4.4.00
# OpenBB Platform
1
2
A comprehensive Python financial data platform that provides investment research capabilities for everyone, anywhere. OpenBB offers unified access to multiple financial data types including equities, options, cryptocurrency, forex, macroeconomics, and fixed income through both Python and CLI interfaces. The platform integrates with numerous financial data vendors, supports AI agent integration, and features a modular architecture with extensible providers.
3
4
## Package Information
5
6
- **Package Name**: openbb
7
- **Language**: Python
8
- **Installation**: `pip install openbb`
9
- **Extended Installation**: `pip install openbb[all]`
10
- **CLI Installation**: `pip install openbb-cli`
11
- **Python Compatibility**: 3.9-3.12
12
- **License**: AGPL-3.0-only
13
14
## Core Imports
15
16
```python
17
from openbb import obb
18
```
19
20
All OpenBB functionality is accessed through the `obb` object, which provides the unified interface to all financial data capabilities.
21
22
## Basic Usage
23
24
```python
25
from openbb import obb
26
27
# Get historical stock data
28
stock_data = obb.equity.price.historical("AAPL")
29
df = stock_data.to_dataframe()
30
31
# Search for stocks
32
search_results = obb.equity.search("Apple")
33
34
# Get cryptocurrency data
35
crypto_data = obb.crypto.price.historical("BTC-USD")
36
crypto_df = crypto_data.to_dataframe()
37
38
# Get economic indicators
39
unemployment_data = obb.economy.unemployment()
40
economic_df = unemployment_data.to_dataframe()
41
```
42
43
## Architecture
44
45
OpenBB Platform uses a modular, provider-agnostic architecture:
46
47
- **Unified Interface**: Single `obb` entry point for all financial data
48
- **Response Objects**: Structured data objects with conversion methods (`.to_dataframe()`, etc.)
49
- **Provider System**: Seamless switching between data providers (free and paid)
50
- **Extension Architecture**: Plugin system for custom data sources and functionality
51
- **Configuration Management**: Centralized credential and provider management
52
- **Multi-Format Access**: Python API, REST API, and CLI interfaces
53
54
The platform abstracts data source complexity while maintaining full access to provider-specific features and ensuring consistent data formats across all financial domains.
55
56
## Capabilities
57
58
### Equity Market Data
59
60
Comprehensive equity market data including historical prices, fundamental analysis, earnings data, institutional ownership, dark pool activity, and company discovery tools.
61
62
```python { .api }
63
# Price data
64
def obb.equity.price.historical(symbol: str, **kwargs) -> ResponseObject: ...
65
def obb.equity.price.quote(symbol: str, **kwargs) -> ResponseObject: ...
66
67
# Company search and screening
68
def obb.equity.search(query: str, **kwargs) -> ResponseObject: ...
69
def obb.equity.screener(**kwargs) -> ResponseObject: ...
70
71
# Fundamental data access points
72
obb.equity.fundamental # Financial metrics and company data
73
obb.equity.calendar # Earnings, dividends, IPOs, events
74
obb.equity.estimates # Analyst estimates and consensus
75
obb.equity.ownership # Institutional and insider data
76
```
77
78
[Equity Market Data](./equity.md)
79
80
### Cryptocurrency Data
81
82
Cryptocurrency market data including historical prices, market information, and trading pair discovery across major exchanges.
83
84
```python { .api }
85
# Crypto price data
86
def obb.crypto.price.historical(symbol: str, **kwargs) -> ResponseObject: ...
87
88
# Crypto search and discovery
89
def obb.crypto.search(query: str, **kwargs) -> ResponseObject: ...
90
```
91
92
[Cryptocurrency Data](./crypto.md)
93
94
### Economic Indicators
95
96
Macroeconomic data and indicators including GDP, inflation, employment statistics, central bank data, and global economic metrics.
97
98
```python { .api }
99
# Economic data access
100
obb.economy # Macroeconomic indicators and data
101
```
102
103
[Economic Indicators](./economy.md)
104
105
### Fixed Income Securities
106
107
Bond and fixed income data including government bonds, corporate bonds, yield curves, and fixed income analytics.
108
109
```python { .api }
110
# Fixed income data
111
obb.fixedincome # Bond data and fixed income analytics
112
```
113
114
[Fixed Income Securities](./fixedincome.md)
115
116
### Commodity Markets
117
118
Commodity market data including energy, metals, agricultural products, and specialized commodity reports.
119
120
```python { .api }
121
# Commodity data and reports
122
def obb.commodity.short_term_energy_outlook(**kwargs) -> ResponseObject: ...
123
def obb.commodity.petroleum_status_report(**kwargs) -> ResponseObject: ...
124
```
125
126
[Commodity Markets](./commodity.md)
127
128
### Currency and Forex
129
130
Foreign exchange data including currency pairs, exchange rates, and forex market information.
131
132
```python { .api }
133
# Currency and forex data
134
obb.currency # Foreign exchange data
135
```
136
137
[Currency and Forex](./currency.md)
138
139
### ETF and Index Data
140
141
Exchange-traded fund and market index data including ETF analytics, index composition, and performance metrics.
142
143
```python { .api }
144
# ETF data
145
obb.etf # Exchange-traded fund data and analytics
146
147
# Index data
148
obb.index # Market indices data
149
```
150
151
[ETF and Index Data](./etf-index.md)
152
153
### Derivatives and Options
154
155
Options and derivatives data including options pricing, Greeks, volatility analysis, and derivatives market information.
156
157
```python { .api }
158
# Derivatives data
159
obb.derivatives # Options and derivatives analytics
160
```
161
162
[Derivatives and Options](./derivatives.md)
163
164
### Financial News and Sentiment
165
166
Financial news aggregation and market sentiment analysis from multiple sources.
167
168
```python { .api }
169
# News and sentiment data
170
obb.news # Financial news and sentiment analysis
171
```
172
173
[Financial News and Sentiment](./news.md)
174
175
### Technical Analysis
176
177
Technical analysis indicators, charting capabilities, and quantitative analysis tools.
178
179
```python { .api }
180
# Technical analysis tools
181
obb.technical # Technical indicators and analysis
182
obb.quantitative # Quantitative analysis and metrics
183
```
184
185
[Technical Analysis](./technical.md)
186
187
### Regulatory and Research Data
188
189
Regulatory filings, academic research factors, and econometric analysis tools.
190
191
```python { .api }
192
# Regulatory data
193
obb.regulators # SEC filings and regulatory data
194
195
# Academic research factors
196
obb.famafrench # Fama-French research factors
197
198
# Econometric analysis
199
obb.econometrics # Econometric modeling tools
200
```
201
202
[Regulatory and Research Data](./regulatory.md)
203
204
## Configuration and Providers
205
206
### Provider Management
207
208
OpenBB supports multiple data providers that can be configured and switched dynamically:
209
210
```python { .api }
211
# Provider configuration (examples of typical usage patterns)
212
# Configuration is handled through OpenBB Hub or local configuration
213
```
214
215
**Free Providers:**
216
- FRED (Federal Reserve Economic Data)
217
- Polygon
218
- Yahoo Finance
219
220
**Paid Providers:**
221
- Benzinga
222
- Intrinio
223
- Trading Economics
224
225
### Authentication and Configuration
226
227
```python { .api }
228
# Configuration is managed through:
229
# - OpenBB Hub (my.openbb.co) for centralized credential management
230
# - Local configuration files
231
# - Environment variables
232
# - Runtime configuration
233
```
234
235
## Response Objects and Data Handling
236
237
All OpenBB API calls return structured response objects with built-in conversion methods:
238
239
```python { .api }
240
import pandas
241
242
class ResponseObject:
243
"""
244
Response object returned by all OpenBB API calls.
245
246
Provides methods to convert financial data into various formats
247
for analysis and integration with other tools.
248
"""
249
250
def to_dataframe(self) -> pandas.DataFrame:
251
"""
252
Convert response data to pandas DataFrame.
253
254
Returns:
255
pandas.DataFrame: Structured data ready for analysis
256
"""
257
...
258
259
def to_dict(self) -> dict:
260
"""Convert response data to dictionary format."""
261
...
262
263
def to_json(self) -> str:
264
"""Convert response data to JSON string."""
265
...
266
```
267
268
## Platform Integration
269
270
### REST API Access
271
272
```python
273
# OpenBB Platform includes a built-in REST API server
274
# Default endpoint: http://localhost:6900
275
# Provides HTTP access to all platform functionality
276
```
277
278
### CLI Interface
279
280
```bash
281
# Separate CLI package provides command-line access
282
pip install openbb-cli
283
284
# CLI mirrors Python API structure
285
# Supports automation via OpenBB Routine Scripts
286
```
287
288
### Enterprise Integration
289
290
- **OpenBB Workspace**: Enterprise UI at pro.openbb.co
291
- **OpenBB Hub**: Credential management at my.openbb.co
292
- **AI Integration**: Built-in support for AI agents and custom models