agentsclimarketplace

Defi intelligence x402

Skill plagtech/defi-intelligence-x402

Live token prices, gas and FX oracles, swap quotes, wallet analytics, DeFi position tracking, and ENS/Basename resolution for AI agents on Base. Read on-chain market and wallet intelligence pay-per-call via x402 — no API keys, no accounts. Powered by Spraay Protocol.From its SKILL.md

Install
npx -y skills add plagtech/defi-intelligence-x402

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.0 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

DeFi Intelligence

Read-only market and wallet intelligence for agents operating on Base. This skill wraps the Spraay x402 Gateway (gateway.spraay.app): price and gas oracles, swap quotes across Base DEXes, wallet profiling, transaction history, DeFi position tracking, and ENS/Basename resolution. Every call is paid per-use with x402 in USDC — no API keys, accounts, or subscriptions.

When to use this skill

Use it when the agent needs to understand on-chain state before acting:

  • Get a live token price, gas estimate, or stablecoin FX rate
  • Quote a swap before executing one
  • Profile a wallet — balances, top tokens, activity, age, risk signals
  • Pull transaction history for an address
  • Check open DeFi positions for an address
  • Resolve an ENS name or Basename to an address (and back)

For sending value (batch pay, payroll, escrow) use the agent-payments skill in this repo. Note: /api/v1/swap/execute is included here for convenience, but a pure read agent can stop at /swap/quote.

Setup

npm install x402-client
export EVM_PRIVATE_KEY=0x...   # wallet holding USDC on Base
import { createClient } from "x402-client";
const client = createClient({
  baseUrl: "https://gateway.spraay.app",
  privateKey: process.env.EVM_PRIVATE_KEY,
});

The gateway answers an unpaid request with HTTP 402 and the price; the client pays and retries automatically.

Endpoints

Prices, gas & FX

MethodPathPriceDescription
GET/api/v1/oracle/prices$0.008Aggregated oracle price feed across multiple sources.
GET/api/v1/oracle/gas$0.005Real-time gas prices on Base.
GET/api/v1/oracle/fx$0.008Stablecoin FX rates: USDC, USDT, DAI, EURC, pyUSD, more.
GET/api/v1/prices$0.002Cached, low-latency multi-token price feed.

Wallet analytics

MethodPathPriceDescription
GET/api/v1/analytics/wallet$0.01Wallet profile: balances, top tokens, activity tier, age, risk signals.
GET/api/v1/analytics/txhistory$0.008Transaction history for any address on Base.
GET/api/v1/balances$0.005Token balance lookup for any address on Base.
GET/api/v1/tokensFREESupported tokens on Base.

Swap (Base)

MethodPathPriceDescription
GET/api/v1/swap/quote$0.008Swap quote across Uniswap V3, Aerodrome, and other Base DEXes.
GET/api/v1/swap/tokens$0.001Supported swap tokens with addresses, decimals, metadata.
POST/api/v1/swap/execute$0.015Execute a swap on Base via the MangoSwap router.

Positions & identity

MethodPathPriceDescription
GET/api/v1/defi/positions$0.01Open DeFi positions for an address across supported protocols.
GET/api/v1/resolve$0.002Resolve an ENS, Basename, or address to its canonical identity.

Examples

Live prices and gas:

const prices = await client.get("/api/v1/oracle/prices");   // { ETH: 2847.50, BTC: ... }
const gas = await client.get("/api/v1/oracle/gas");

Profile a wallet before interacting:

const profile = await client.get("/api/v1/analytics/wallet?address=0xabc...");

Quote a swap:

const quote = await client.get(
  "/api/v1/swap/quote?tokenIn=USDC&tokenOut=WETH&amount=100"
);

Resolve a Basename:

const id = await client.get("/api/v1/resolve?name=jesse.base.eth");

Notes

What ships with it: 5 files

5.1 KB alongside SKILL.md

commands/

plugin/

rules/

Keep looking

Skills are one crate of 326,149. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.