Source-backed unlock pressure
Run token-summary
A two-step execution page for wallet-capable x402 buyers: first a $0.02 bodyless paid ping, then the flagship $0.25 token-level 90-day summary.
First paid ping - $0.02
Use this cheapest bodyless route to prove the wallet can read the 402 challenge, pay Base USDC, and retry. If this returns JSON, immediately run the $0.25 token summary for the token beside a material unlock event.
import { wrapFetchWithPayment, x402HTTPClient } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const httpClient = new x402HTTPClient(client);
const response = await fetchWithPayment("https://unlockpressure.pricepilot402-arya.workers.dev/v1/unlocks/upcoming?days=90&minRisk=70");
const paid = await httpClient.processResponse(response);
console.log(paid.body);
curl -i "https://unlockpressure.pricepilot402-arya.workers.dev/v1/unlocks/upcoming?days=90&minRisk=70"
Buy token 90-day summary - $0.25
Start with SXT or replace the symbol with any token shown below. The report route remains the existing Phase 1 product: POST /v1/token/risk-summary.
import { wrapFetchWithPayment, x402HTTPClient } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const httpClient = new x402HTTPClient(client);
const response = await fetchWithPayment("https://unlockpressure.pricepilot402-arya.workers.dev/v1/token/risk-summary", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ token: "SXT", lookbackDays: 90 })
});
const paid = await httpClient.processResponse(response);
console.log(paid.body);
curl -i "https://unlockpressure.pricepilot402-arya.workers.dev/v1/token/risk-summary" \
-H "content-type: application/json" \
--data '{"token":"SXT","lookbackDays":90}'
Expected unpaid behavior
The first request without payment should return HTTP 402 and a PAYMENT-REQUIRED header. A wallet-enabled x402 client should then retry with PAYMENT-SIGNATURE or X-PAYMENT and receive JSON output.