Connecting to OffBase intelligence layer — Base mainnet…
OffBaseOffBase
OffBaseOffBase

Documentation

OffBase Intelligence API

x402-powered intelligence layer on Base. Every endpoint returns political wallet data priced per request in USDC or ETH.

Quick Start

All endpoints live at https://api.offbase.xyz/v1. The first request returns HTTP 402 with payment details. Retry with the payment tx hash.

curl — discover payment requirements
# Step 1: get payment requirements
curl -i https://api.offbase.xyz/v1/intel/whale-tracker

# HTTP/1.1 402 Payment Required
# PAYMENT-REQUIRED: <base64-encoded PaymentRequired>
# { "x402Version": 2, "accepts": [...], "sessionId": "0x..." }

# Step 2: pay on Base mainnet (USDC or ETH to vault address)
# Your wallet sends USDC transfer to the vault shown in PaymentRequired.

# Step 3: retry with payment proof
curl https://api.offbase.xyz/v1/intel/whale-tracker \
  -H "X-Payment-Tx-Hash: 0x..." \
  -H "X-Payment-Session: 0x..." \
  -H "X-Wallet-Address: 0x..."

# 200 OK — intelligence data returned

Endpoints

GET$0.005 USDCScout+

/v1/intel/whale-tracker

Real-time political wallet movements above $50K. Classified by pattern.

GETup to $0.05Analyst+

/v1/intel/signal-feed

AI-classified signals: pre-vote accumulation, front-running, coordinated buys.

GET$0.002 USDCScout+

/v1/intel/wallet/:address

Full history, position estimate, and stats for a specific political wallet.

GET$0.05 USDCAnalyst+

/v1/intel/briefing?period=daily

AI-generated political intelligence briefing — daily or weekly.

POSTup to $0.10Analyst+

/v1/intel/ai/query

Natural-language query against the intelligence layer.

GETFreeFree+

/v1/intel/politicians

List all tracked political entities with metadata.

GETFreeFree+

/v1/intel/bills

Upcoming legislative votes with asset exposure and sentiment.

GETFreeFree+

/v1/bazaar

x402 Bazaar — machine-readable endpoint catalog for AI agents.

GETFreeFree+

/v1/stats

Platform-wide stats: total queries, USDC settled, agents connected.

GETFreeFree+

/v1/x402/quote?resource=...

Get a fresh 402 PaymentRequired for any resource (used by SDK).

POSTFreeFree+

/v1/x402/settle

Verify a Base tx and record settlement for a given resource.

GETFreeFree+

/v1/x402/tier?address=...

Get $OFFB holder tier for a wallet address.

x402 Headers

PAYMENT-REQUIREDresponse

Base64 PaymentRequired — issued with HTTP 402. Contains accepts[], sessionId, resource metadata.

PAYMENT-RESPONSEresponse

Base64 SettlementResponse — returned on 200 OK. Signed proof of payment for auditing.

X-Payment-Tx-Hashrequest

Your Base mainnet tx hash paying the vault. Used for on-chain verification.

X-Payment-Sessionrequest

SessionId from the 402 response. Ties payment to a specific resource request.

X-Wallet-Addressrequest

Your wallet address. Used for tier check ($OFFB balance) and payer attribution.

X-Payment-Tierresponse

Returns your resolved tier (Free / Scout / Analyst / Strategist / Sovereign) for the request.

TypeScript SDK

install
npm install @x402/axios @x402/evm viem
client usage
import { wrapAxiosWithPayment, x402Client } from "@x402/axios";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { UptoBatchEvmScheme } from "@x402/evm/batch/client";
import { privateKeyToAccount } from "viem/accounts";
import axios from "axios";

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);

const client = new x402Client();
// Register Base mainnet payment handlers
client.register("eip155:8453", new ExactEvmScheme(account));           // exact
client.register("eip155:8453", new UptoBatchEvmScheme(account));        // upto + batch

const api = wrapAxiosWithPayment(
  axios.create({ baseURL: "https://api.offbase.xyz/v1" }),
  client
);

// Auto-handles 402 → signs payment → retries
const { data } = await api.get("/intel/whale-tracker");
// data.items → WalletMovement[]

MCP Tools

OffBase registers two MCP tools in the x402 Bazaar. Any MCP-enabled AI client (Claude, GPT-4o, LangChain) can call them autonomously.

offbase_queryuptoup to $0.05

Natural language query against the full intelligence layer. Returns signals, sources, and highlights.

offbase_copyTradebatch-settlement$0.001/signal

Subscribe agent wallet to a political wallet. Receives mirrored trade signals via batch settlement channel.

ZK Private Execution

Strategist+ tier unlocks ZK execution on Base. Trades are submitted via a stealth pool with an off-chain ZK proof. The settlement is on-chain, but the origin wallet is never revealed in the public mempool.

// Flow for ZK private execution

1. Client calls /intel/copy-trade with scheme=batch-settlement

2. OffBase ZK-Stack generates execution proof off-chain

3. Proof submitted to Base L2 via stealth relayer

4. Settlement recorded without exposing follower address

5. Signed receipt returned — auditable only by follower