Worked example: an autonomous agent watches a Birkin for 30 days for $0.86
Short answer:Polling Luxe Oracle every 5 minutes for a single Birkin reference costs $0.86 over 30 days at the per-call rate. Switch to session tokens and the same workload drops to $0.86 still — sessions are the same per-query price; they just remove a settlement round trip from each call. Either way, you pay only for queries, not seats.
This is a worked example, not a customer story. The agent below is the canonical "watch a Birkin for me" workload — specific enough to reason about cost and latency end-to-end, simple enough that you can paste it into a Node script in five minutes. All numbers are derived from the live spec.
The brief
A buyer wants an autonomous agent that watches the SG Hermès store for any Birkin 25 restock and pings them on Telegram the second stock flips from false to true. Soft requirements:
- Latency from restock to alert: under one minute.
- Run for a month while they travel.
- No subscriptions; pay only what the agent uses.
Sizing the workload
One product, one region, one query per poll. With a 5-minute interval that is 12 queries/hour, 288/day, ~8,640 over 30 days.
| Strategy | Calls / 30 days | USDC cost | Per call latency |
|---|---|---|---|
| Per-call x402 | 8,640 | $8.64 | ~600 ms |
| Session ($0.01 / 10 calls) | 8,640 | $8.64 | ~50 ms |
| Session, 15-min poll | 2,880 | $2.88 | ~50 ms |
Two things to notice. First, sessions don't change the unit price — both routes are $0.001/query — they remove the per-call x402 settlement from the latency budget. Second, the dominant cost lever is your poll interval, not which auth path you pick.
The agent, in 40 lines
Pseudocode of an agent that buys a session up front, polls until stock flips, alerts on transition, and stops:
import { fetchWithPayment } from '@x402/fetch';
const API = 'https://api.luxe-oracle.com';
const MODEL = 'H086962CK0G'; // Birkin 25, SG
// 1. Buy a 10-credit session up front (one settlement, ~600 ms).
async function buySession() {
const r = await fetchWithPayment(`${API}/api/v1/sessions`, { method: 'POST' });
return (await r.json()).sessionToken;
}
// 2. Poll until in_stock, refreshing the session as needed.
async function watch() {
let token = await buySession();
let credits = 10;
while (true) {
if (credits === 0) { token = await buySession(); credits = 10; }
const res = await fetch(`${API}/api/v1/monitor/sg/hermes/${MODEL}`, { headers: { 'X-Session-Key': token }} );
const { in_stock } = await res.json();
credits--;
if (in_stock) { await notifyTelegram(MODEL); break; }
await sleep(5 * 60_000);
}
}That's the whole agent. No SDK install beyond @x402/fetch. No API key. No dashboard. The wallet that fetchWithPayment uses is pulled from your environment — it can be a fresh hot wallet funded with $1 of USDC on Base.
Latency budget
For the alerting requirement ("under one minute from restock to alert"), the chain looks like this:
| Stage | Bound |
|---|---|
| Hermès → Luxe Oracle scraper cycle | ≤ 24 h (worst case) |
| Cache write → Redis visibility | < 10 ms |
| Agent poll interval | 5 min (your choice) |
| Monitor query (session path) | ~50 ms |
| Telegram bot delivery | ~500 ms |
The dominant lag is the agent's own poll interval. Sub-minute alerting really means: tighten the poll, accept the cost, and let the request path do its job in 50 ms.
Cost optimisation, ranked
- Coarsen the poll. Going from 5 min → 15 min cuts the bill 3× with no code change other than
sleep(15 * 60_000). - Adapt the poll. Hermès is unlikely to drop stock at 03:00 SGT. Poll every 30 min outside Singapore business hours, every 5 min inside them.
- Stop on success.The snippet above breaks the loop after the first restock. Don't keep polling once the alert has fired.
- Use sessions for predictability. Per-call x402 means each call settles on-chain. Sessions amortise that — same total cost, ~12× lower per-query latency, and you avoid edge cases where a flaky network leaves a settlement hanging mid-poll.
What this is not
This worked example proves the monitoringhalf of an agentic luxury workflow — knowing when stock flips. The actual checkout still has to clear hCaptcha, address forms, and Hermès's own anti-bot. Luxe Oracle gives the signal; how you act on it (notifying a human, calling a dropshipper, queueing a manual buy session) is your agent's job, not the oracle's.
Try it yourself
- Integration docs — paste-ready Node and Python snippets.
- MCP server — wire Luxe Oracle into Claude Code or Cursor without writing the polling loop yourself.
- Anatomy of an x402 payment — what the wallet is actually signing inside
fetchWithPayment. - Inside a luxury data oracle — how the cache stays fresh underneath your polls.