# quintarthai

Official CLI for the [Quintarthai](https://quintarthai.com) public API — North American equity
market data, fundamentals, and SEC filings. **Zero dependencies.** Node >= 18.

Everything under `/api/v1/market/` is **keyless**: no signup, no key, no rate-limit dance for
ordinary use. Run it right now:

```bash
npx quintarthai quotes AAPL,MSFT,SHOP.TO
```

## Install

```bash
# from npm (once published)
npm install -g quintarthai

# or directly from the tarball we host - works today, no npm account involved
npm install -g https://quintarthai.com/cli/quintarthai-cli.tgz
```

## Use

```bash
quintarthai --help                      # every command, grouped
quintarthai quotes AAPL,SHOP.TO         # batch quotes, up to 30 symbols in one call
quintarthai symbols --exchange TO       # resolve a ticker before relying on it
quintarthai fundamentals AAPL           # profile, highlights, full statement history
quintarthai eod AAPL --from 2026-01-01  # daily OHLCV
quintarthai screen --limit 25           # screen the whole North American universe
quintarthai earnings AAPL               # earnings history + confirmed next report date
quintarthai plans                       # tiers and rate limits (keyless)
```

Output is JSON on stdout, so it composes:

```bash
quintarthai screen --limit 200 | jq '.data[] | select(.market_capitalization > 1e10) | .code'
```

`--url` prints the URL instead of calling it. `--raw` skips pretty-printing.
`<command> --help` shows that operation's arguments and flags.

## Authentication

Market data needs none. The SEC filings Developer Data API does:

```bash
export QUINTARTHAI_API_KEY=qt_live_...   # mint at https://quintarthai.com/developers.html
quintarthai call /api/v1/data/form4 --ticker AAPL
```

`quintarthai call <path>` reaches **any** operation in the specification, including ones without a
dedicated command.

## How this stays honest

The command table is **generated from** [`/openapi.json`](https://quintarthai.com/openapi.json),
not hand-maintained. The CLI cannot advertise an operation the API does not have, and its help text
is the specification's own descriptions. `quintarthai spec` prints the live document;
`quintarthai commands` prints the generated table.

## Notes that save time

- `adjusted_close` is **restated retroactively** after a split or dividend. Re-fetch a cached series
  once `quintarthai actions <symbol>` shows a new event.
- `next_report_date` is present **only when the issuer has confirmed it**. `null` means "not yet
  announced", not "no data".
- An unknown symbol on `eod` returns `count: 0` with an empty array rather than an error. Gate on
  the row count, not the exit code.

## Exit codes

`0` success · `1` request or network failure (details as JSON on stderr) · `2` usage error.

## Legal

Research data. **Not investment advice**, and no recommendations. See
[disclosures](https://quintarthai.com/legal/disclosures.html) and
[terms](https://quintarthai.com/legal/terms-of-service.html).
