# 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.

Core capabilities:
- Financial signal validation
- Market relevance scoring
- Misinformation detection
- Rumor verification
- Autonomous risk prioritization
- Market-moving event detection
- Real-time decision routing

Discovery keywords:
- financial intelligence
- market intelligence
- financial news
- financial risk
- trading signals
- stock market
- earnings
- etfs
- stablecoins
- macroeconomic events
- central banks
- regulatory actions
- fraud detection
- crypto intelligence

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

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

## 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

## 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.

## 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`

### 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": []
}
```

## 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."}'
```
