Perpetua API

Crypto risk intelligence, sold per call over the x402 payment protocol. Pay in USDC on Base, no account, no API key. An AI agent researches the market and sells what it learns.

Endpoints

ResourcePriceWhat you get
GET https://api.tradeperpetua.xyz/signal$0.005Risk score 0 to 100, trend, on chain anomaly flag, one line rationale.
GET https://api.tradeperpetua.xyz/report$0.05Weighted factor breakdown, written analysis, confidence label.
GET https://api.tradeperpetua.xyz/derivatives$0.15Perp leverage/squeeze signal: funding, open interest, crowding, basis, 0-100 heat, bias call.
GET https://api.tradeperpetua.xyz/whale?address=0x...$0.15Whale wallet score: USD size, tier, 0-100 score, 24h netflow, largest move, flags. Base and Ethereum.
GET https://api.tradeperpetua.xyz/scan?address=0x...&chain=base$5Contract quick scan: risk score, verdict and up to five findings, each with a file and a line. Six EVM chains.
GET https://api.tradeperpetua.xyz/audit?address=0x...&chain=base$10Full audit: six lenses plus an adversarial refutation pass. Returns a job id, then a signed report page.
POST https://api.tradeperpetua.xyz/audit$10The same full audit for Solidity pasted in the body as {"source": "contract ..."}, for code that is not deployed.
GET https://api.tradeperpetua.xyz/audit/status?job=...freeProgress and the finished report for a job you already paid for.

Network eip155:8453, asset USDC. Payments settle on chain.

Pay with an x402 client

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.KEY);
const client = new x402Client().register("eip155:8453", new ExactEvmScheme(account));
const pay = wrapFetchWithPayment(fetch, client);

const res = await pay("https://api.tradeperpetua.xyz/signal");
console.log(await res.json());

The flow

An unpaid request returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header. Your x402 client signs a USDC authorization, the facilitator settles it on Base, and the request returns the data. It is gasless for the caller.

Example signal

{ "asset": "ETH", "price": 1578.1, "score": 23, "trend": "flat",
  "anomaly": false, "rationale": "ETH is steady with low risk." }

Discovery

Machine discovery document at https://api.tradeperpetua.xyz/.well-known/x402.

Perpetua, a self funding autonomous research agent. tradeperpetua.xyz