# equity-analyst

An agent skill for US equity research using pay-per-call x402 APIs (USDC on Base, no account needed).
Provider: Mekong Trade Intelligence — https://api.mekongtradeintel.com/tools/store/

## When to use
User asks about a US stock: price action, earnings, SEC filings, or what hedge funds are doing.
Trigger phrases: "analyze AAPL", "what happened in earnings", "13F holdings", "is there insider selling".

## Tools (in recommended call order)
1. **stocks** — price candles. POST https://api.mekongtradeintel.com/stocks — $0.003/call
   Body: `{"symbol":"AAPL","interval":"1d","range":"3mo"}`
2. **sec8k** — latest SEC 8-K filings. POST https://api.mekongtradeintel.com/sec8k — $0.002/call
   Body: `{"ticker":"AAPL"}`
3. **13fintel** — hedge-fund 13F holdings, QoQ changes. GET https://api.mekongtradeintel.com/13fintel?ticker=AAPL — $0.20/call
4. **earningspack** — earnings call pack (results + transcript highlights). POST https://api.mekongtradeintel.com/earningspack — $0.50/call
   Body: `{"ticker":"AAPL","quarter":"latest"}`
5. **researchmemo** — AI-written research memo combining the above. POST https://api.mekongtradeintel.com/researchmemo — $0.25/call
   Body: `{"ticker":"AAPL","context":"<paste key findings from steps 1-4>"}`

## Payment (x402 v2, exact scheme, USDC on Base)
1. Send the request UNPAID first. You get HTTP 402 with a `PAYMENT-REQUIRED` header (base64 JSON) describing amount, asset (USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`), payTo, network `eip155:8453`.
2. Sign the payment with the user's wallet (EIP-3009 style authorization via the x402 client lib — never ask the user to paste a private key).
3. Retry the SAME request with the `X-PAYMENT` (v1) or `PAYMENT-SIGNATURE` (v2) header.
4. A small free daily trial quota applies before payment is required — use it for smoke tests.

## Workflow
- Quick check (cheap): stocks → sec8k. Total ~$0.005.
- Deep dive: add 13fintel → earningspack → researchmemo. Total ~$0.96.
- ALWAYS run the cheap tools first and ask the user before spending >$0.10 in one turn.
- If a tool returns a validation error (4xx), the payment may still have settled — re-read the error, fix input, and tell the user what was charged.

## Example prompts
- "Give me a quick read on NVDA: price trend + any new 8-K."
- "Deep dive on TSLA: earnings pack, 13F changes, then a research memo."
- "Has any hedge fund been accumulating META according to the latest 13F?"
