# MarketBrief: agent manual

Numbers-first market briefs for agents. Three separate $0.05 calls, no parameters: crypto, US equities, US macro. Each returns a rule-based RISK_ON / MIXED / RISK_OFF headline with every vote shown, the key numbers, flags, 24h changes and data dates. Built from LoneStarOracle's own feeds; no AI-written text.

- Agent manual: https://brief.lonestaroracle.xyz/SKILL.md
- llms.txt: https://brief.lonestaroracle.xyz/llms.txt
- OpenAPI (all services): https://lonestaroracle.xyz/openapi.json

## Paid routes

### GET /brief/crypto  ($0.05 per call)
Crypto Market Brief: prices, funding, open interest, liquidations, Deribit options, Fear & Greed, US liquidity. No parameters.
Example: `curl -i "https://brief.lonestaroracle.xyz/brief/crypto"`

### GET /brief/equities  ($0.05 per call)
US Equities Market Brief: SPY/QQQ/IWM, VIX, crash-protection pricing (CBOE SKEW + 25-delta skew), movers, mega-cap earnings. No parameters.
Example: `curl -i "https://brief.lonestaroracle.xyz/brief/equities"`

### GET /brief/macro  ($0.05 per call)
US Macro Market Brief: Fed funds, yield curve, real yields, CPI, unemployment, credit spreads, net liquidity, NFCI. No parameters.
Example: `curl -i "https://brief.lonestaroracle.xyz/brief/macro"`

## How payment works (x402)
1. Call any paid route with no payment. You get **HTTP 402**. The payment details (price, network, asset, payTo) are in the
   `PAYMENT-REQUIRED` response header (base64 JSON, x402 v2); legacy v1 clients get the same in the response body (`accepts`).
2. Pay with any x402 client (for example `@x402/fetch` in JavaScript or the `x402` Python package) using a wallet holding
   USDC on **Base** (eip155:8453) or **Solana**; most services also accept **Arc** (eip155:5042). The 402 lists every
   network that route accepts. Settlement is gasless for the caller.
3. Retry the **same request** with the payment header (`PAYMENT-SIGNATURE` for v2, `X-PAYMENT` for v1). You get **HTTP 200**
   with the data and a settlement receipt in the `PAYMENT-RESPONSE` header.
No signup, no API key, no subscription. Prices above are exact per call.

**Spending:** every paid call costs the listed USDC price. An agent should confirm spend with its user, or stay under a
budget cap the user has set, before paying. Never pay more than the listed price; if the 402 asks for more, do not pay.

## Reading errors
- **402**: no payment, or the payment could not be verified. The body says why; nothing was charged. Fix and retry.
- **400**: a required input is missing or invalid. Send every required input on the first call; many routes reject a missing input with 400 before asking for payment.
- **404**: unknown route. See the route list above or https://lonestaroracle.xyz/catalog.json.
- **422**: an input value was understood but not usable (unknown ticker, unsupported chain).
- **429 / 5xx**: busy or an upstream data source is down. Retry after a short wait.

## Reading a brief
- `headline`: RISK_ON / MIXED / RISK_OFF = sum of `headline_basis` votes (>=+2 / <=-2).
- `key_numbers`: flat numbers, units in the key name (_pct, _bps, _usd, _bn).
- `flags`: notable conditions in plain words.
- `changes_24h`: each number's change vs the brief ~24h earlier (status `building` until history exists).
- `unavailable`: feeds that failed this build; the rest of the brief is still valid.
