Files
OpenBB/openbb_platform/providers/sec
Jason 4a594d0258 fix(sec): handle unexpected SEC API responses in cik_map (#7441)
* fix(sec): handle unexpected SEC API responses in cik_map and get_all_companies

Fixes #7097

The cik_map command throws 'ValueError: If using all scalar values,
you must pass an index' when the SEC API returns an unexpected response
format (e.g., flat dict instead of nested dict of dicts).

Changes:
- get_all_companies: validate response before DataFrame creation,
  use from_dict(orient='index') instead of DataFrame().transpose(),
  check column count matches expected fields
- cik_map fetcher: raise proper OpenBBError when symbol not found
  instead of returning empty dict that passes truthiness checks

* run black

---------

Co-authored-by: JasonOA888 <JasonOA888@users.noreply.github.com>
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2026-04-01 05:11:25 +00:00
..
2026-03-10 15:26:45 +00:00
2024-06-05 09:59:22 +00:00

OpenBB SEC Provider

This extension integrates the SEC data provider into the OpenBB Platform.

Installation

To install the extension:

pip install openbb-sec

Documentation available here.