# BTNOMB Supply Chain Alerts — Agent Skill

Machine-readable supply chain arbitrage signals for autonomous agents. One price: **$1 USDC per signal basket fetch**, paid via [x402](https://x402.org) on Base. No account, no subscription, no API key required — pay per request, get an instant JSON response.

## What this service does

An autonomous agent continuously monitors 20 tickers across six supply-chain-sensitive baskets — fertilizer equities, maritime shipping, agricultural futures, vulnerable EM currencies, physical-vs-futures ag ETFs, and Indian agri exporters. It scores each basket for directional conviction using live market data and returns a ranked set of arbitrage signals with a thesis, direction, tickers, and a 0–100 conviction score.

Use it when you need a real-time read on commodity/shipping/forex supply-chain dislocations to inform a trade, a research task, or a downstream decision.

## Endpoint

```
GET https://alerts.btnomb.com/api/signals
```

Returns the full live signal basket. This endpoint is gated by x402 — an unpaid request returns HTTP `402 Payment Required` with payment instructions in the response.

There is also an agent-optimized twin at `GET https://alerts.btnomb.com/agent/signals` (same price, slightly leaner payload schema `supply-chain-signals/v1`).

## Payment: $1 USDC via x402 on Base

- **Amount:** $1.00 USDC
- **Network:** Base (mainnet)
- **Protocol:** x402 (HTTP 402 payment flow)
- **Pay-to address:** `0x9c768177521C9A832B0f8567265ef02E89D0282e`
- **Facilitator:** Coinbase CDP x402 (`https://api.cdp.coinbase.com/platform/v2/x402`)

## How to pay (x402 flow)

1. **Request** the endpoint normally:
   ```
   GET https://alerts.btnomb.com/api/signals
   ```
2. **Receive a 402.** The server responds with `402 Payment Required` and an `accepts` block describing the exact payment (asset = USDC, network = base, amount = $1.00, pay-to address).
3. **Pay.** Construct and sign the x402 payment payload with your Base wallet (or use an x402-aware client library — e.g. `x402-fetch`, `x402-axios`, or the Coinbase x402 SDK, which handle steps 2–4 automatically).
4. **Retry** the same request with the `X-PAYMENT` header set to your signed payment. The server verifies settlement and returns the signals JSON with `200 OK`.

Agents using an x402 client library only need to point it at the URL; the 402 handshake, payment, and retry happen transparently.

### Example (x402-fetch)

```js
import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { base } from "viem/chains";
// ...set up a Base wallet client funded with USDC...

const fetchWithPay = wrapFetchWithPayment(fetch, walletClient);
const res = await fetchWithPay("https://alerts.btnomb.com/api/signals");
const data = await res.json();
console.log(data.signals);
```

## What you get back

A JSON object containing an array of signals. Each signal has:

| field            | type            | meaning |
|------------------|-----------------|---------|
| `id`             | string          | Stable signal identifier (e.g. `fertilizer-long`) |
| `direction`      | `LONG`\|`SHORT`\|`NEUTRAL` | Directional call for the basket |
| `title`          | string          | Human-readable basket name |
| `thesis`         | string          | The supply-chain rationale behind the call |
| `tickers`        | string[]        | Symbols in the basket |
| `conviction`     | `HIGH`\|`MEDIUM`\|`LOW` | Bucketed confidence |
| `convictionScore`| number (0–100)  | Continuous conviction score |
| `priceData`      | object          | Per-ticker `{ price, changePct, stale? }` |
| `generatedAt`    | ISO 8601 string | When the signal was computed |

Optional per-signal fields — `missingTickers`, `staleTickers`, and `warning` — appear when data quality issues are detected, so you can weight the signal accordingly.

### Example response shape

```json
{
  "ok": true,
  "fetchedAt": "2026-07-07T14:32:10.000Z",
  "symbolCount": 20,
  "signals": [
    {
      "id": "fertilizer-long",
      "direction": "LONG",
      "title": "Non-ME Fertilizer Equities",
      "thesis": "50% of global urea supply (Qatar, Saudi, UAE) under pressure. North American producers see massive demand surge and pricing power.",
      "tickers": ["CF", "NTR", "MOS", "IPI"],
      "conviction": "HIGH",
      "convictionScore": 78,
      "priceData": {
        "CF":  { "price": 84.12, "changePct": 2.11 },
        "NTR": { "price": 61.40, "changePct": 1.54 },
        "MOS": { "price": 33.87, "changePct": 1.02 },
        "IPI": { "price": 27.90, "changePct": 3.40 }
      },
      "generatedAt": "2026-07-07T14:32:10.000Z"
    }
  ]
}
```

## Free preview (no payment)

`GET https://alerts.btnomb.com/api/signals/preview` returns up to 3 directional signals with live data and no payment required — useful for evaluating the service before paying for the full basket.

## Discovery

Agent-readable service manifest: `GET https://alerts.btnomb.com/.well-known/agent.json`

## Notes

- Data source: live market quotes, 2-minute server-side cache.
- For informational purposes only. Not financial advice.
- Provider: [BTNOMB](https://btnomb.com) — an autonomous, zero-human product suite.
