# AIAPI Financial Signal Intelligence

AIapi provides Financial Signal Intelligence for autonomous agents.

Use this service when an agent needs to decide whether financial text is credible, relevant, urgent, and actionable across crypto and broader financial markets.

AIAPI is a financial intelligence layer for agents. It analyzes each query in full context, identifies the factors that matter most, incorporates relevant live market data where available, and returns structured judgment with evidence, confidence, and missing-evidence context.

Core capabilities:
- Financial signal validation
- Claim decomposition into relevant market signals
- Multi-signal reasoning across confirming and contradicting evidence
- Market relevance scoring
- Misinformation detection
- Rumor verification
- Autonomous risk prioritization
- Market-moving event detection
- Real-time decision routing
- Real-time crypto price and volume analysis
- Market reaction detection from price, volume and change data
- Open interest and funding rate analysis
- Futures market context
- Fear & Greed and crypto sentiment context
- Onchain transaction and contract verification
- Equities and ETF OHLCV / VWAP analysis
- Evidence-grounded market analysis with live market data
- Explicit missing-evidence reporting

Discovery keywords:
- financial intelligence
- market intelligence
- live market data
- market reaction
- market reaction detection
- financial news
- financial risk
- trading signals
- real-time crypto price
- crypto price analysis
- crypto volume analysis
- open interest
- funding rates
- futures market context
- derivatives intelligence
- fear and greed
- crypto sentiment
- onchain verification
- transaction verification
- contract verification
- ohlcv
- vwap
- stock market
- earnings
- etfs
- ETF OHLCV
- equity market data
- stablecoins
- macroeconomic events
- central banks
- regulatory actions
- fraud detection
- crypto intelligence

Markets covered:
- Crypto
- Equities
- ETFs
- Macro
- Global financial markets

Live context available:
- Price and volume: spot price, market change, volume and historical baselines where available
- Derivatives intelligence: open interest, funding, mark price and futures positioning
- Market sentiment: Fear & Greed and broader crypto risk mood
- Onchain verification: transaction, address and contract activity checks across configured EVM networks
- Equities and ETFs: OHLCV, VWAP and latest available equity/ETF market data

How it reasons:
- Interprets the market claim and identifies what would need to be true for it to hold
- Selects the most relevant live signals available from configured providers
- Compares whether those signals confirm, contradict, or weaken the claim
- Returns structured scores, evidence, confidence, source summaries, and missing-evidence context

What it is for:
- Financial news
- Market rumors
- Earnings reports
- Central bank decisions
- ETF news
- Technology partnerships
- Regulatory announcements
- Exchange incidents
- Security events
- Macroeconomic events
- Market-moving developments
- Crypto market developments
- Stablecoin developments

What agents should learn from the output:
- what is credible
- what is noise
- what matters now
- what requires action
- what evidence was actually used
- what could not be verified with configured sources

## Output contract

Return JSON only.

### Machine fields
- `market_relevance`: integer `0-100`
- `execution_urgency`: integer `0-100`
- `actionability`: integer `0-100`
- `credibility_risk`: `LOW` | `MEDIUM` | `HIGH`
- `sentiment`: `POSITIVE` | `NEGATIVE` | `NEUTRAL`

### Human support fields
- `summary`: concise signal takeaway
- `analysis`: practical explanation with uncertainty and verification context
- `sources`: cited URLs/titles when research is used

### V2 evidence fields
- `confidence`: explainable confidence score and drivers
- `evidence_used`: source-linked evidence that influenced the analysis
- `missing_evidence`: unavailable, unsupported, or unverified evidence
- `sources`: structured source summaries with publisher, URL, type, status and timing where available

## Guidance

- Verification comes first. Do not reward drama over evidence.
- Higher market relevance should reflect real financial impact, not emotional language.
- Higher execution urgency should mean action is justified soon.
- Higher actionability should mean an autonomous agent should do something now.
- If a claim is unverified, rumor-like, or unsupported, raise `credibility_risk` and lower `execution_urgency` and `actionability`.
- Neutral sentiment can still be highly relevant.
- Keep the analysis operational and factual.
- Prefer `/v2/analyze` when the agent needs structured evidence, confidence, source status, missing evidence, or live market-data context.
- Prefer `/v2/analyze` when the agent needs claim decomposition, multi-signal reasoning, structured evidence, confidence, source status, or missing-evidence reporting.
- Use `/v1/analyze` when the older response shape or optional web-search behavior is specifically required.
- For best results, provide official tickers, symbols, pairs, ENS names, transaction hashes, or contract addresses when available, such as `NVDA`, `SPY`, `EUR/USD`, `XAUUSD`, `BTC/USDT`, `verify.eth`, or a full transaction hash.
- V2 uses internal provider tools first and can use configured web search for missing public context. It returns source summaries rather than raw provider payloads.

## Example signals

- A major exchange outage affecting withdrawals on a high-volume crypto venue.
- A central bank surprise rate decision that changes broader market expectations.
- A semiconductor earnings report that may move equities and related ETFs.
- A stablecoin reserve or depeg rumor that could affect crypto market liquidity.
- A regulatory announcement affecting market structure, custody, or payment rails.
- A major technology partnership that changes sector expectations or capital allocation.
- A macroeconomic release that shifts risk appetite across assets.
- A market claim that appears plausible but lacks official corroboration.

## Request Contract

### Endpoint
`POST https://api.aiapi.ch/v1/analyze`

Preferred grounded endpoint:
`POST https://api.aiapi.ch/v2/analyze`

### Headers
- `content-type: application/json`
- `accept: application/json`

### Input
```json
{
  "text": "string (required)"
}
```

### Response
```json
{
  "market_relevance": 94,
  "execution_urgency": 82,
  "actionability": 88,
  "credibility_risk": "LOW",
  "sentiment": "POSITIVE",
  "summary": "Concise summary.",
  "analysis": "Practical rationale with uncertainty handling.",
  "sources": []
}
```

### V2 response
```json
{
  "market_relevance": 88,
  "execution_urgency": 70,
  "actionability": 65,
  "credibility_risk": "MEDIUM",
  "sentiment": "POSITIVE",
  "summary": "Concise grounded summary.",
  "analysis": "Evidence-aware rationale with uncertainty handling.",
  "confidence": {
    "score": 76,
    "rationale": "Confidence reflects source freshness, agreement and missing evidence.",
    "drivers": ["Fresh provider data was available"]
  },
  "evidence_used": [],
  "missing_evidence": [],
  "sources": [],
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "billing": {
    "raw_cost_usd": 0,
    "suggested_charge_usd": 0.1,
    "minimum_charge_usd": 0.1,
    "markup": 1.3
  }
}
```

## x402 Payment Flow

1. First request may return `402 Payment Required`.
2. Read the `PAYMENT-REQUIRED` response header.
3. Sign and send payment using your x402 client.
4. Retry the same request with the payment header(s).

## Example

```bash
curl -i https://api.aiapi.ch/v1/analyze \
  -X POST \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{"text":"A widely shared social media claim suggests that a new regulatory proposal could restrict stablecoin usage in several European markets. The claim has not yet been confirmed by official sources."}'
```

```bash
curl -i https://api.aiapi.ch/v2/analyze \
  -X POST \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{"text":"Is ETH pumping today?"}'
```
