Metadata-Version: 2.4
Name: openbb-tradingagent
Version: 1.0.1
Summary: Point-in-time company fundamentals from tradingagentapp.com for the OpenBB Platform (US SEC EDGAR, Japan EDINET, Taiwan TWSE, Korea FSS OpenDART, France INPI, Belgium NBB, Denmark Business Authority, NZ Charities Register).
License: MIT
Keywords: openbb,fundamentals,point-in-time,edgar,edinet,twse,opendart,inpi,private-companies
Author: Trading Agent
Author-email: tradingagentapp@gmail.com
Requires-Python: >=3.10,<4
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: openbb-core (>=1.6.10,<2.0.0)
Project-URL: Homepage, https://www.tradingagentapp.com/fundamentals
Project-URL: Repository, https://github.com/Wei-LienWU/trading-agent
Description-Content-Type: text/markdown

# Trading Agent provider for OpenBB

Point-in-time, **as-first-reported** company fundamentals from official regulator
filings — inside the OpenBB Platform.

| Market | Source | Coverage |
| --- | --- | --- |
| United States | SEC EDGAR (XBRL) | ~7,000 filers, annual + quarterly, FY2014→ |
| Japan | FSA EDINET (Public Data License 1.0) | 4,955 filers of an annual securities report, listed and unlisted |
| Taiwan | Taiwan Stock Exchange OpenAPI | every listed company |
| Korea | FSS OpenDART | 2,239 listed companies |
| France | INPI Registre national des entreprises | 1,484,946 companies, annual accounts 2017→ |
| Belgium | NBB Central Balance Sheet Office | 673,826 companies, statutory accounts, incl. private companies |
| Denmark | Danish Business Authority | 548,878 companies, published annual reports |
| New Zealand | Charities Register (Charities Services) | 27,100 registered charities, FY2008→ |

Every value is keyed by the **official filing date it became public on**, and
queries accept an `as_of` knowledge date — so a backtest at date *T* sees only
what was public at *T*. No restatement look-ahead.

## Install

```bash
pip install openbb-tradingagent
openbb-build   # regenerate the static assets so the provider appears
```

## Use

The provider attaches to OpenBB's existing fundamentals commands:

```python
from openbb import obb

# No key needed — the demo tier covers every company's most recent fiscal year.
obb.equity.fundamental.latest_attributes(
    symbol="2330.TW", tag="revenue,net_income", provider="tradingagent"
)

# Point-in-time: what did AAPL's reported revenue history look like on 2022-01-01?
obb.equity.fundamental.historical_attributes(
    symbol="AAPL", tag="revenue", provider="tradingagent", as_of="2022-01-01"
)
```

Set a key for the full universe:

```python
obb.user.credentials.tradingagent_api_key = "ta_live_…"
```

or in `~/.openbb_platform/user_settings.json`:

```json
{ "credentials": { "tradingagent_api_key": "ta_live_…" } }
```

Without a key the provider falls back to the public `demo` key: every company
at its most recent reported fiscal year, all fields, no signup; about 60 named
companies keep full history as a worked sample. Paid plans unlock full history,
the `as_of` query and bulk files — your code does not change.

## The `as_of` parameter

This is the reason the provider exists. Most fundamentals APIs serve *today's*
restated figures against *historical* dates, which quietly leaks future
information into a backtest. Here, `as_of` filters to `filed <= as_of`:

```python
# FY2021 as it was actually reported, not as later amended
obb.equity.fundamental.latest_attributes(
    symbol="AAPL", tag="revenue", provider="tradingagent", as_of="2022-01-01"
)
```

## Fields

`historical_attributes` returns, per row: `date` (period end), `symbol`, `tag`,
`value`, `unit`, `fiscal_year`, `fiscal_period`, `filed`, `form`, `market`,
`issuer_id`.

Available tags include `revenue`, `net_income`, `assets`, `liabilities`,
`equity`, `cash`, `gross_profit`, `operating_income`, `long_term_debt`,
`rnd_expense`, `eps_diluted`, `shares_diluted`, plus derived ratios
`net_margin`, `gross_margin`, `operating_margin`, `roe`, `roa`,
`debt_to_equity`, `asset_turnover`.

## Data notes

- **Taiwan income-statement figures are cumulative year-to-date** (Taiwan
  reporting convention): Q2 is the H1 total, Q4 the full year. Difference
  adjacent quarters for single-quarter flows. Balance-sheet items are
  point-in-time as usual.
- Values are as filed. Filers make mistakes; we do not silently correct them.

## Sources and licences

- **US** — SEC EDGAR, public domain.
- **Taiwan** — Taiwan Stock Exchange, under the Open Government Data License 1.0.
  The attribution is embedded in every API response and must be preserved.
- **Korea** — FSS OpenDART. Public data; the FSS confirmed in writing that no
  separate approval agreement is required for commercial use.
- **Japan** — Financial Services Agency, EDINET, under the EDINET terms of use
  applying the Public Data License 1.0. Source attribution is required; it is
  embedded in every API response and must be preserved.
- **France** — INPI, Registre national des entreprises, under its reuse
  licence. Attribution with the last-update date is required.
- **Belgium** — National Bank of Belgium, Central Balance Sheet Office.
  Statutory solo accounts, not group consolidation.
- **Denmark** — Danish Business Authority (Erhvervsstyrelsen), published annual
  reports.
- **New Zealand** — Charities Services, Department of Internal Affairs,
  Charities Register, CC BY 3.0 NZ. Registered charities rather than listed
  issuers: NZ company financials are not published as open data.

Factual historical data only — not investment advice, not a recommendation.

Full API documentation: <https://www.tradingagentapp.com/developers>
Pricing and licences: <https://www.tradingagentapp.com/fundamentals>

MIT licensed. Operated by WU Capital Limited, Auckland, New Zealand.

