Scry API

Bonding curve intelligence for AI agents. Pay-per-call with USDC on Base via x402.

How it works

1Send a GET request to any endpoint
2Receive a 402 response with payment requirements in the payment-required header
3Sign a USDC transfer authorization (EIP-3009) with your wallet
4Resend the request with the PAYMENT-SIGNATURE header
5Receive data — USDC is transferred on settlement

Quick start

Install the x402 client
npm install @x402/core @x402/evm viem
TypeScript
import { privateKeyToAccount } from 'viem/accounts';
import { x402Client, x402HTTPClient } from '@x402/core/client';
import { registerExactEvmScheme } from '@x402/evm/exact/client';

const account = privateKeyToAccount(PRIVATE_KEY);
const client = new x402Client();
registerExactEvmScheme(client, { signer: account });
const http = new x402HTTPClient(client);

// 1. Get payment requirements
const res = await fetch('https://scry.fixr.nexus/api/v1/tokens');
const paymentRequired = JSON.parse(
  atob(res.headers.get('payment-required')!)
);

// 2. Sign payment
const payload = await http.createPaymentPayload(paymentRequired);
const headers = http.encodePaymentSignatureHeader(payload);

// 3. Get data
const data = await fetch('https://scry.fixr.nexus/api/v1/tokens', { headers });
console.log(await data.json());

Payment details

NetworkBase (eip155:8453)
AssetUSDC (0x8335...0291)
Protocolx402 v2 (EIP-3009)
Treasury0xBe2C...3fa4
Min call$0.005

Endpoints

GET/api/v1/tokens
$0.01

List bonding curve tokens with signals, badges, and opportunity scores.

Parameters
countnumber= 50Number of tokens to return (max 200)
Response
{
  "tokens": [
    {
      "symbol": "EXAMPLE",
      "name": "Example Token",
      "address": "0x...",
      "creator": "0x...",
      "reserveSymbol": "HUNT",
      "currentPrice": "0.000142",
      "curvePosition": 0.12,
      "ageHours": 4.2,
      "opportunityScore": 78,
      "badges": ["Early", "Rising"],
      "signals": {
        "isEarly": true,
        "isHot": false,
        "isBreakout": false,
        "isNew": true,
        "isGraduating": false,
        "isDormant": false,
        "isRising": true
      }
    }
  ],
  "count": 50
}
GET/api/v1/signals
$0.02

Tokens with active signal badges only. Filters out dormant and unsignaled tokens.

Response
{
  "tokens": [ /* same shape as /tokens, filtered */ ],
  "count": 12
}
GET/api/v1/leaderboard
$0.01

Top trader rankings with scores and stats.

Parameters
periodstring= global"global" or "weekly"
limitnumber= 20Number of entries (max 50)
Response
{
  "rankings": [
    {
      "fid": 12345,
      "score": 842,
      "rank": 1,
      "stats": {
        "trades": 47,
        "wins": 31,
        "losses": 16,
        "predictions_won": 8,
        "predictions_lost": 3,
        "conviction_locks": 5,
        "check_in_streak": 12
      }
    }
  ],
  "total": 156,
  "period": "global"
}
GET/api/v1/token/[address]
$0.01

Full detail for a single token including curve steps, metadata, and royalties.

Parameters
addresspathToken contract address on Base
Response
{
  "token": {
    "symbol": "EXAMPLE",
    "name": "Example Token",
    "address": "0x...",
    "creator": "0x...",
    "currentPrice": "142000000000000",
    "maxSupply": "1000000000000000000000000",
    "currentSupply": "120000000000000000000000",
    "curvePosition": 0.12,
    "signals": { ... },
    "badges": ["Early"],
    "metadata": { "image": "...", "description": "..." },
    "royalties": { "buyRoyalty": 0.05, "sellRoyalty": 0.05 },
    "steps": [
      { "rangeTo": "100000", "price": "100000000000" }
    ]
  }
}
GET/api/v1/token/[address]/price
$0.005

Current price with 24-hour change percentage.

Parameters
addresspathToken contract address on Base
Response
{
  "price": {
    "currentUsdRate": 0.000142,
    "previousUsdRate": 0.000128,
    "changePercent": 10.94
  }
}

Signal reference

EarlyCurve < 20% filled
Hot10%+ 24h price change
BreakoutNear steep price step
NewCreated < 24h ago
GraduatingCurve > 80% filled
RisingPositive price momentum
DormantNo activity > 48h

Notes

All endpoints return JSON with Content-Type: application/json.

Payment is settled only after a successful response (HTTP < 400). Failed requests are never charged.

The payment-required header contains base64-encoded JSON with payment requirements.

USDC authorization uses EIP-3009 transferWithAuthorization — no on-chain approval needed.