> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# MarketPulse

> Real-time and historical equity market data for autonomous agents — prices, news, financial statements, metrics, analyst estimates, insider activity, SEC filings, stock screening, and macro interest rates.

[View on GitHub →](https://github.com/AIsa-team/agent-skills/tree/main/financial/marketpulse)

**Complete equity market data for autonomous agents.** One `AISA_API_KEY` unlocks stocks, financials, filings, and macro data — everything an agent needs to research, screen, and analyze public companies.

## Install

```bash npx skills theme={null}
npx skills add AIsa-team/agent-skills --skill marketpulse
```

```bash AIsa CLI theme={null}
npm install -g @aisa-one/cli
aisa skills install marketpulse
```

Start a new agent session after installing so the skill loads.

## What can agents do with it?

> [card] Investment research
>
> "Full analysis: NVDA price trends, insider trades, analyst estimates, SEC filings."

> [card] Earnings analysis
>
> "Get Tesla earnings snapshots, analyst estimates, and price reaction."

> [card] Market screening
>
> "Find stocks with P/E \< 15 and revenue growth > 20%."

> [card] Whale watching
>
> "Track insider trades at Apple and correlate with price movements."

> [card] Financial statement analysis
>
> "Compare Apple's income statement, balance sheet, cash flow, and financial metrics."

> [card] Macro context
>
> "Pull the Fed funds rate history alongside bank earnings."

## Core capabilities

* **Prices** — historical OHLCV at second, minute, day, week, month, or year granularity
* **News** — ticker-filtered company news
* **Financial statements** — income, balance sheet, cash flow; annual, quarterly, or TTM
* **Financial metrics** — real-time snapshot or historical series
* **Analyst estimates** — EPS and growth estimates
* **Insider trades** — Form 4 filings by ticker
* **SEC filings** — filings index and parsed filing items (10-K, 10-Q, 8-K, etc.)
* **Company facts** — reference data by ticker or CIK
* **Stock screener** — POST body filters across the universe (P/E, growth, etc.)
* **Line-item search** — pull specific metrics across multiple tickers in one call
* **Macro** — current and historical central-bank interest rates

## Quick start

```bash theme={null}
export AISA_API_KEY="your-key"
```

### Stock prices

```bash theme={null}
# Historical daily data
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=day&interval_multiplier=1&start_date=2025-01-01&end_date=2025-12-31" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Intraday 5-minute bars
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=minute&interval_multiplier=5&start_date=2025-01-15&end_date=2025-01-15" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

**Required params:** `ticker`, `interval` (`second` · `minute` · `day` · `week` · `month` · `year`), `interval_multiplier`, `start_date`, `end_date`.

### Financial statements

```bash theme={null}
# All three statements in one call
curl "https://api.aisa.one/apis/v1/financial/financials?ticker=AAPL&period=annual" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Or fetch them individually
-H "Authorization: Bearer $AISA_API_KEY"
-H "Authorization: Bearer $AISA_API_KEY"
-H "Authorization: Bearer $AISA_API_KEY"
```

**`period`** accepts `annual`, `quarterly`, or `ttm`.

### Financial metrics

```bash theme={null}
# Real-time snapshot
curl "https://api.aisa.one/apis/v1/financial/financial-metrics/snapshot?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Historical
curl "https://api.aisa.one/apis/v1/financial/financial-metrics?ticker=AAPL&period=annual" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### Insider trades

```bash theme={null}
curl "https://api.aisa.one/apis/v1/financial/insider-trades?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### SEC filings

```bash theme={null}
# Filings index
curl "https://api.aisa.one/apis/v1/financial/filings?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Parsed filing items (requires filing_type and year)
curl "https://api.aisa.one/apis/v1/financial/filings/items?ticker=AAPL&filing_type=10-K&year=2024" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### Stock screener (POST)

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/financial/financials/search/screener" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filters":{"pe_ratio":{"max":15},"revenue_growth":{"min":0.2}}}'
```

### Line-item search

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/financial/financials/search/line-items" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tickers":["AAPL","MSFT"],"line_items":["revenue","net_income"],"period":"annual"}'
```

### Macro interest rates

```bash theme={null}
# Current rates
curl "https://api.aisa.one/apis/v1/financial/macro/interest-rates/snapshot" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Historical (per central bank)
curl "https://api.aisa.one/apis/v1/financial/macro/interest-rates?bank=fed" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

## Python client

A bundled `market_client.py` wraps every endpoint for one-line usage:

```bash theme={null}
# Prices (start/end are required)
python3 scripts/market_client.py stock prices --ticker AAPL --start 2025-01-01 --end 2025-01-31
python3 scripts/market_client.py stock prices --ticker AAPL --start 2025-01-01 --end 2025-01-31 --interval week

# Statements
python3 scripts/market_client.py stock statements --ticker AAPL --type all --period annual
python3 scripts/market_client.py stock statements --ticker AAPL --type income --period quarterly

# Analysis
python3 scripts/market_client.py stock metrics --ticker AAPL --historical --period annual
python3 scripts/market_client.py stock analyst --ticker AAPL
python3 scripts/market_client.py stock earnings --ticker AAPL

# Insider trades
python3 scripts/market_client.py stock insider --ticker AAPL

# SEC filings
python3 scripts/market_client.py stock filings --ticker AAPL --items --filing-type 10-K --year 2024

# Screener / line items
python3 scripts/market_client.py stock screen --pe-max 15 --growth-min 0.2
python3 scripts/market_client.py stock line-items --tickers AAPL,MSFT --items revenue,net_income --period annual

# Interest rates
python3 scripts/market_client.py stock rates --historical --bank fed
```

## Endpoint reference

| Endpoint | Method | Purpose |
| - | - | - |
| `/financial/prices` | GET | [Historical prices](https://aisa.one/docs/api-reference/financial/get_prices.md) |
| `/financial/news` | GET | [Company news](https://aisa.one/docs/api-reference/financial/get_news.md) |
| `/financial/financials` | GET | [All statements](https://aisa.one/docs/api-reference/financial/get_financials.md) |
| `/financial/financials/income-statements` | GET | [Income statements](https://aisa.one/docs/api-reference/financial/get_financials-income-statements.md) |
| `/financial/financials/balance-sheets` | GET | [Balance sheets](https://aisa.one/docs/api-reference/financial/get_financials-balance-sheets.md) |
| `/financial/financials/cash-flow-statements` | GET | [Cash flow](https://aisa.one/docs/api-reference/financial/get_financials-cash-flow-statements.md) |
| `/financial/financial-metrics/snapshot` | GET | [Metrics snapshot](https://aisa.one/docs/api-reference/financial/get_financial-metrics-snapshot.md) |
| `/financial/financial-metrics` | GET | [Historical metrics](https://aisa.one/docs/api-reference/financial/get_financial-metrics.md) |
| `/financial/analyst-estimates` | GET | [Analyst estimates](https://aisa.one/docs/api-reference/financial/get_analyst-estimates.md) |
| `/financial/insider-trades` | GET | [Insider trades](https://aisa.one/docs/api-reference/financial/get_insider-trades.md) |
| `/financial/filings` | GET | [SEC filings](https://aisa.one/docs/api-reference/financial/get_filings.md) |
| `/financial/filings/items` | GET | [Filing items](https://aisa.one/docs/api-reference/financial/get_filings-items.md) |
| `/financial/company/facts` | GET | [Company facts](https://aisa.one/docs/api-reference/financial/get_company-facts.md) |
| `/financial/financials/search/screener` | POST | Stock screener |
| `/financial/financials/search/line-items` | POST | [Line-item search](https://aisa.one/docs/api-reference/financial/post_financials-search-line-items.md) |
| `/financial/macro/interest-rates/snapshot` | GET | [Rates snapshot](https://aisa.one/docs/api-reference/financial/get_macro-interest-rates-snapshot.md) |
| `/financial/macro/interest-rates` | GET | [Historical rates](https://aisa.one/docs/api-reference/financial/get_macro-interest-rates.md) |

## Get started

1. Sign up at [aisa.one](https://aisa.one) and create an API key in the console.
2. Set it in your shell: `export AISA_API_KEY="your-key"`.
3. Install the skill with one of the commands under [Install](#install), then start a new agent session.

## Related

> [card] [Financial API reference](https://aisa.one/docs/api-reference/financial/get_prices.md)
>
> Every endpoint the MarketPulse skill wraps, with interactive playgrounds.

> [card] [Error Codes](https://aisa.one/docs/api-reference/errors.md)
>
> Handle 400/401/429 responses from Financial endpoints.

> [card] [Rate Limits](https://aisa.one/docs/api-reference/rate-limits.md)
>
> Throughput caps per endpoint and tier.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.