Base RPC, DeFi yields, perp funding, Chainlink prices and a pre-trade token-safety gate — no account, no API key.
Most data providers want an email, a dashboard login and a secret key before an agent can read a single block. This is the opposite: every route below answers an HTTP request and, until it is paid, returns a 402 Payment Required your agent settles inline in USDC on Base (the x402 standard). No signup, no key to rotate, no monthly minimum — the agent pays from $0.001 a call for exactly what it reads. Discover and wire the whole set from one file: the x402 catalog, the OpenAPI spec, or the plain-text catalog.
| Route | Price | What it returns | Try free |
|---|---|---|---|
GET /defi/yields | $0.001 | Decision-tagged DeFi lending/LP yields — every pool row carries a per-pool verdict (SUSTAINABLE|DECAYING|OUTLIER|AVOID) + 0-100 risk_score, so you rank by go/no-go not just raw APY (raw yield feeds don't). Plus project, chain, symbol, pool id, 1d/7d/30d APY trend, IL risk (il7d), reward/underlying tokens, outlier flag, mu/sigma, stability forecast, TVL. Filter by project (aave/uniswap/curve or exact slug), chain (eth/arb/op/avax/matic/sol/bnb) or stablecoin; sort by TVL or risk-adjusted APY. | free preview |
GET /crypto/prices | $0.001 | Spot token prices from DefiLlama — pass comma-separated ticker symbols or CoinGecko ids, get price/change_24h/symbol/confidence/timestamp. | free preview |
GET /gate/swap | $0.008 | Is this Base token safe to swap right now? GO / HOLD / BLOCK pre-trade safety gate for autonomous trading agents: is it a honeypot, can you sell it, and is your trade too big for the pool? Honeypot/sellability + admin-control checks + Uniswap v3 liquidity vs. your notional — one decision + reason in one fast call. | free preview |
GET /chain/token-report | $0.01 | Is this Base token safe to buy? One call returns a trade-safety verdict — SAFE | CAUTION | AVOID — with risk_score (0-100) and reasons: honeypot/sellability simulation, owner-renounced + mint/pause/blacklist/fee-setter/upgradeable-proxy checks, measured transfer tax, symbol/name/decimals, and Uniswap v3 WETH-pool liquidity (USD). Replaces many RPC calls and prevents a bad trade before an agent buys a Base ERC-20. | free preview |
GET /pm/markets | $0.005 | Live Polymarket prediction markets — question, outcomes, bestBid/bestAsk/spread, volume24hr/volume1wk, oneDayPriceChange, clobTokenIds, conditionId, category tags, liquidity, end date. Ranked by volume24hr; filter by keyword. | free preview |
GET /chain/gas-price | $0.002 | Current Base mainnet gas price (wei/gwei), EIP-1559 base_fee_gwei/priority_fee_gwei, and gas_price_usd — no price oracle on ETH-only competitors. | free preview |
GET /chain/balance | $0.002 | ETH balance of a Base mainnet address, incl. balance_usd (internal ETH price cross-call). | — |
GET /chain/token-balance | $0.002 | ERC-20 token balance of a Base mainnet address, incl. symbol, decimals, balance_formatted. | free preview |
GET /chain/erc20-meta | $0.002 | ERC-20 metadata on Base: name, symbol, decimals, totalSupply for any token contract. | — |
GET /chain/proxy-info | $0.002 | EIP-1967 proxy resolver for a Base contract: returns implementation, admin and beacon addresses (read from the standard storage slots) plus is_proxy flag. Use when an agent must know what code actually runs behind a proxy before trusting or calling it. | — |
GET /chain/block | $0.002 | Base block summary by number or latest: hash, timestamp, tx count, gas used/limit, base fee. | — |
GET /chain/token-security | $0.009 | Is this Base token a scam or rug pull? Honeypot detector for a Base ERC-20: EIP-1967 proxy + upgradeability check, bytecode scan for mint/pause/blacklist/fee-setter/ownership, owner() renouncement, contract source-verification (Sourcify), and a live eth_call state-override sim proving a real wallet can transfer() it. Returns risk_score (0-100) + verdict (clear/review/block) + honeypot/scam/rug flags. Use before an agent buys, holds or approves a token. | free preview |
GET /chain/block-number | $0.002 | Current Base mainnet block number. | free preview |
GET /chain/tx | $0.005 | Transaction details by hash on Base mainnet. | — |
GET /chain/receipt | $0.005 | Transaction receipt by hash on Base mainnet — status, gas used, full logs, and the L1 fee breakdown (l1_fee_wei, l1_gas_price_wei, l1_gas_used, effective_gas_price_wei) + l1_fee_usd/total_fee_usd an ETH-only competitor can't offer. | — |
GET /chain/code | $0.002 | Contract-code check for a Base mainnet address (is_contract + code size + EIP-7702 delegated-EOA detection). | — |
GET /chain/nonce | $0.002 | Transaction count (nonce) for a Base address, latest and pending. | — |
GET /chain/is-contract | $0.002 | Is a Base address a smart contract or an EOA (is_contract + bytecode size). | — |
GET /chain/total-supply | $0.002 | ERC-20 total supply on Base (raw + formatted, with symbol and decimals). | — |
GET /chain/storage-at | $0.002 | Raw storage slot read (eth_getStorageAt) for any Base contract; slot defaults to 0x0. Use when an agent needs proxy implementation/admin slots or raw contract state. | — |
GET /chain/allowance | $0.002 | ERC-20 allowance(owner, spender) on Base, raw + formatted, flags unlimited approvals. | — |
GET /crypto/fear-greed | $0.002 | Crypto Fear & Greed Index (alternative.me): current value 0-100, classification, history of last N days. No params. Use when an agent needs a market-sentiment gauge. | — |
GET /defi/fees-top | $0.003 | Top DeFi protocols by 24h fees (DefiLlama): name, 24h/7d fees USD, 1d change, plus market total. No params. Use when an agent needs which protocols earn the most. | — |
GET /ai/ask | $0.002 | Cheap LLM answer (Llama 3.2 3B on Workers AI): ?q=<prompt up to 500 chars>, returns concise text. Pay-per-call, no API key. | free preview |
GET /chain/wallet | $0.003 | Wallet screening bundle (balance, activity, contract vs EOA check): ETH balance + balance_usd (internal ETH price cross-call) + tx count + contract-code check (EIP-7702 delegated-EOA aware) for a Base mainnet address, in one call. | — |
GET /crypto/funding | $0.004 | 6-venue perp funding rates — Binance+Bybit+OKX+Hyperliquid+dYdX+Gate — top coins by 24h volume, per-venue funding + per-venue open interest (USD) + OI-weighted CEX↔DEX arb verdict (thin-book venues excluded so cheapest-long/richest-short is executable, not a mirage), premium/basis, annualized_hl/okx/binance/bybit/gate, LONGS_PAY/SHORTS_PAY/NEUTRAL signal, next_funding_ts, mark/oracle prices. | free preview |
GET /chain/simulate | $0.005 | Will this Base transaction revert? Prospective-tx dry-run via eth_simulateV1: pass ?from=&to=&data=&value= and get will_revert + revert_reason + gas_used + token asset_changes BEFORE the agent spends gas sending it. Keyless, Base-native, per-call — Tenderly/Alchemy-class output with no API key or signup. Use before a swap/approve/transfer or alongside /gate/swap. | free preview |
GET /chain/fee-estimate | $0.004 | Base EIP-1559 fee estimate: base fee, suggested priority fee, max-fee tiers (slow/standard/fast) in gwei and a 21k-gas transfer cost. | — |
GET /chain/network-status | $0.004 | Base network status snapshot: chain id, latest block, block age, gas used ratio and tx count. | — |
GET /chain/l1-base-fee | $0.004 | Ethereum L1 base fee as seen by Base's GasPriceOracle (wei/gwei) plus estimated L1 data fee for a simple transfer. | — |
GET /chain/fee-history | $0.004 | Base fee history for the last 10 blocks: base fee per block (gwei), gas-used ratios and a min/max/avg summary. Use when an agent times transactions around cheap blocks. | — |
GET /chain/blob-base-fee | $0.004 | Base EIP-4844 blob base fee from the GasPriceOracle (wei/gwei). Use when an agent estimates L1 data-availability cost for Base batches. | — |
GET /chain/eth-usd | $0.001 | Base ETH/USD spot price from the Chainlink aggregator (price, round, updatedAt, staleness). Use when an agent needs a trusted on-chain ETH price. | — |
GET /chain/btc-usd | $0.001 | Base BTC/USD spot price from the Chainlink aggregator (price, round, updatedAt, staleness). Use when an agent needs a trusted on-chain BTC price. | — |
GET /chain/prices | $0.001 | Base crypto price snapshot in one call: BTC, ETH, LINK and SOL USD spot from Chainlink aggregators with per-feed staleness. Use when an agent needs a multi-asset trusted on-chain price board. | — |
GET /chain/sol-usd | $0.001 | Base SOL/USD spot price from the Chainlink aggregator (price, round, updatedAt, staleness). Use when an agent needs a trusted on-chain SOL price. | — |
GET /chain/link-usd | $0.001 | Base LINK/USD spot price from the Chainlink aggregator (price, round, updatedAt, staleness). Use when an agent needs a trusted on-chain LINK price. | — |
GET /defi/chains-tvl | $0.004 | Top blockchains ranked by total DeFi TVL (DefiLlama): name, TVL USD, gas token. No params. Use when an agent needs a quick map of where DeFi capital sits. | — |
GET /crypto/stablecoins | $0.004 | Top stablecoins by circulating supply (DefiLlama): name, symbol, price, peg type, circulating USD. No params. Use when an agent needs stablecoin supply and depeg checks. | — |
GET /defi/protocols-top | $0.004 | Top DeFi protocols by TVL (DefiLlama): name, category, TVL USD, 1d/7d change, chain. No params. Use when an agent needs a ranked protocol league table. | — |
GET /defi/dex-volume | $0.004 | Top DEXs by 24h trading volume (DefiLlama): name, 24h/7d volume USD, 1d change, plus market total. No params. Use when an agent needs where on-chain swap volume is flowing. | — |
GET /crypto/trending | $0.004 | Trending coins on CoinGecko right now: name, symbol, market-cap rank, 24h price change. No params. Use when an agent needs what the market is searching for. | — |
GET /crypto/global | $0.004 | Global crypto market stats (CoinGecko): total market cap, 24h volume, BTC/ETH dominance, active coins. No params. Use when an agent needs a one-call market overview. | — |
GET /crypto/markets-top | $0.004 | Top coins by market cap (CoinGecko): price, market cap, 24h volume, 24h change; ?limit= up to 100. No required params. Use when an agent needs a ranked market snapshot. | — |
GET /crypto/movers | $0.004 | Top 24h gainers and losers among the top-100 coins (CoinGecko). No params. Use when an agent needs what is moving the market right now. | — |
GET /brief/market | $0.01 | One-call crypto market brief: Fear & Greed, global market cap/dominance, top movers, trending coins and top DeFi fee earners. No params. Use when an agent needs a full market snapshot in a single payment. | — |
GET /crypto/exchanges-top | $0.004 | Top crypto exchanges by trust score (CoinGecko): name, country, year, trust score and rank, 24h BTC volume. No params. Use when an agent needs exchange due-diligence data. | — |
GET /crypto/categories | $0.004 | Crypto sector performance (CoinGecko categories): market cap, 24h change, volume per sector, top by market cap. No params. Use when an agent needs sector rotation signals. | — |
GET /defi/hacks-recent | $0.004 | Most recent DeFi/crypto hacks and exploits (DefiLlama): date, name, amount lost USD, chain, technique, bridge-hack flag; ?limit= up to 50. No required params. Use when an agent needs live security-incident risk signals. | — |
GET /crypto/derivatives-exchanges | $0.004 | Top crypto derivatives exchanges (CoinGecko): open interest BTC, 24h volume BTC, perpetual and futures pair counts, year established. No params. Use when an agent needs perp/futures venue liquidity data. | — |
GET /defi/protocol-risk | $0.01 | Protocol risk score from DefiLlama: joins TVL, 1d/7d TVL change, age, audits, chain count and matching hack history into one 0-100 score with flags; ?protocol= accepts a family name (aave, uniswap) that resolves to the highest-TVL version, or an exact slug (default aave-v3). Use when an agent needs a due-diligence check before routing funds to a DeFi protocol. | free preview |
GET /defi/safe-yields | $0.01 | Vetted stablecoin yields: top stablecoin pools (DefiLlama, TVL>$5M, APY 1-25%) joined with each protocol's age and hack history, safest-yield first; optional ?chain= (short names like eth/arb/op/avax/matic/sol resolve to the canonical chain) & ?limit=. No required params. Use when an agent needs where to park stablecoins with due-diligence already applied. | free preview |
GET /defi/yields-top | $0.004 | Top DeFi yield pools by TVL (DefiLlama): chain, project, symbol, APY, TVL USD; optional ?chain= (short names like eth/arb/op/avax/matic/sol resolve to the canonical chain) & ?stable=true. Use when an agent needs where to earn yield. | — |
GET /defi/yield-entry-verdict | $0.01 | Per-pool DeFi yield-entry verdict: pass ?pool=<DefiLlama poolId from /defi/yields> and get a packaged SUSTAINABLE|DECAYING|OUTLIER|AVOID go/no-go + 0-100 risk score + field-cited reasons, built from the pool's APY trend (1d/7d/30d), DefiLlama stability forecast, impermanent loss (il7d), volatility (sigma), outlier flag and TVL. Optional ?token=<0x underlying, Base> adds a honeypot-check pointer. Use after /defi/yields finds a high-APY pool to get a go/no-go on THAT pool before funding. | — |
GET /defi/yield-rotation | $0.01 | Rotate-or-stay DeFi yield decision: pass ?from=<poolId you hold>&to=<poolId you're considering> (both the 'pool' field from /defi/yields) and ¬ional=<usd> (default 10000) and get a packaged ROTATE|STAY|MARGINAL verdict net of a transparent roundtrip cost (bps) + the risk-score change, with breakeven days, first-year net gain and field-cited reasons. Never rotates into an AVOID/OUTLIER target. The repeat-query sibling to /defi/yield-entry-verdict: re-check an open LP position as APYs drift. | — |
GET /ai/classify | $0.004 | Zero-shot text classification (Llama 3.2 3B): ?text=<up to 1000 chars>&labels=<comma-separated labels, 2-10> returns the single best label. Use when an agent needs to route or tag text (intent, sentiment, topic, spam) in one cheap call. | — |
GET /ai/summarize | $0.004 | Text summarization (Llama 3.2 3B): ?text=<up to 1500 chars> returns a 1-3 sentence summary. Use when an agent needs to compress a passage cheaply before reasoning over it. | — |
GET /ai/translate | $0.004 | Text translation (Llama 3.2 3B): ?text=<up to 800 chars>&to=<target language, e.g. es, fr, de, ja> returns the translated text only. Use when an agent needs quick pay-per-call translation with no API key. | — |
GET /ai/extract | $0.005 | Text-to-JSON extraction (Llama 3.2 3B): ?text=<up to 1500 chars>&fields=<comma-separated field names> returns a strict JSON object with exactly those keys (null when absent). Use when an agent needs messy text turned into typed structured data. | free preview |
GET /chain/wallet-screen | $0.004 | Is this wallet sanctioned OR a known scammer? Pre-trade screen for a counterparty / recipient / token-spender address before an agent sends, swaps or approves: exact match against the U.S. Treasury OFAC SDN crypto-address list AND community scam/phishing/wallet-drainer threat-intel (ScamSniffer + MEW darklist). Returns sanctioned (bool) + malicious (bool) + verdict (blocked/clear) + lists + the list sources and snapshot dates. 'clear' means not on these lists, not a safety guarantee. Use alongside /gate/swap and /chain/token-security to avoid sanctioned-or-scammer-counterparty liability. | — |
Prices are per successful call in USDC on Base (eip155:8453). Routes with a free preview return the same JSON shape without payment so an agent can evaluate before it pays.
Deeper pages for the sets agents reach for most:
Point any x402-aware client at a route. The first response carries the price and payment terms; the client pays and retries; the second response is the data. With the x402-fetch wrapper it is one line:
import { wrapFetch } from "x402-fetch";
const fetchPaid = wrapFetch(fetch, { account }); // your agent's Base wallet
const r = await fetchPaid("https://api.greyridgesignals.ai/defi/yields?limit=20&stable=true");
const yields = await r.json(); // risk-adjusted stablecoin yields, paid inline
No API key is sent or stored. Settlement is a standard USDC transfer on Base the route verifies on-chain before returning data.
Skip the hand-wiring. Drop-in AI SDK tools wrap the yields, prices, balance and Base-RPC routes with the x402 payment rail built in — your agent's wallet pays per call, and a keyless install still returns live data so you can try before you fund it:
npm i github:rezearcher/vercel-ai-defi-data ai zod
import { generateText } from "ai";
import { defiDataTools } from "@grey-ridge/vercel-ai-defi-data";
// reads PRIVATE_KEY (your agent's Base wallet) from the env
await generateText({ model, tools: { ...defiDataTools }, prompt: "Best stablecoin yield on Base, what's gas, and where's funding paying?" });
Eleven tools — defiYields, cryptoPrices, baseBalance, baseGasPrice, baseBlockNumber, baseTokenBalance, cryptoFunding (cross-venue perp funding + arb spread), marketBrief (one-call market snapshot), checkToken (pre-trade SAFE/CAUTION/AVOID rug verdict), yieldEntryVerdict (per-pool SUSTAINABLE/DECAYING/OUTLIER/AVOID go-no-go) and simulateTx (dry-run a prospective tx — revert, gas, asset changes — before you send it) — each returns a model-ready one-line summary and never throws into your agent loop. The Base-RPC reads, perp-funding sample and a demo token-safety verdict return real live values even with no wallet. Source: github.com/rezearcher/vercel-ai-defi-data.
The same routes as drop-in LangChain tools. They use content_and_artifact so your graph gets a readable string for the model and the structured object on .artifact — the wallet pays per call, and a keyless install still returns live data:
npm i github:rezearcher/langchain-defi-data @langchain/core zod
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { defiDataTools } from "@grey-ridge/langchain-defi-data";
// reads PRIVATE_KEY (your agent's Base wallet) from the env
const agent = createReactAgent({ llm, tools: defiDataTools });
Eleven tools — defi_yields, crypto_prices, base_balance, base_gas_price, base_block_number, base_token_balance, crypto_funding (cross-venue perp funding + arb spread), market_brief (one-call market snapshot), check_token (pre-trade SAFE/CAUTION/AVOID rug verdict), yield_entry_verdict (per-pool SUSTAINABLE/DECAYING/OUTLIER/AVOID go-no-go) and simulate_tx (dry-run a prospective tx — revert, gas, asset changes — before you send it) — degrade open with no key. The Base-RPC reads, perp-funding sample and a demo token-safety verdict return the real live value, and the market-brief and native-balance reads return an honest activation hint rather than a fabricated number. Source: github.com/rezearcher/langchain-defi-data.
The same routes for Python agents — CrewAI tools or framework-agnostic functions. The data core is standard-library only, so the keyless preview tier installs with no third-party packages; the x402 paid rail and CrewAI wrappers are optional extras. No PyPI account needed — install straight from git:
pip install "git+https://github.com/rezearcher/crewai-defi-data"
from grey_ridge_x402_data import crewai_tools, crypto_prices
print(crypto_prices("bitcoin,ethereum")["summary"]) # keyless: real live price
# reads PRIVATE_KEY (your agent's Base wallet) from the env when set
agent = Agent(role="analyst", tools=crewai_tools())
Eleven tools — defi_yields, crypto_prices, crypto_funding, market_brief, base_balance, base_gas_price, base_block_number, base_token_balance, check_token (pre-trade SAFE/CAUTION/AVOID rug verdict), yield_entry_verdict (per-pool SUSTAINABLE/DECAYING/OUTLIER/AVOID go-no-go) and simulate_tx (dry-run a prospective tx — revert, gas, asset changes — before you send it) — each returns a plain dict and never raises into the crew; the Base-RPC reads return the real live value even with no wallet, crypto_funding ($0.004) degrades to a real top-1 perp-funding preview, check_token ($0.01) returns the full verdict on the free preview (demo token un-metered) so a keyless call still gets a REAL verdict, and the native-balance read and market_brief ($0.01) return an honest activation stub rather than a fabricated number. Source: github.com/rezearcher/crewai-defi-data.
On-chain reads are live Base mainnet RPC. DeFi yields, TVL, fees and protocol data are sourced from DefiLlama; spot prices from DefiLlama and CoinGecko; perp funding from Hyperliquid, OKX and dYdX; Chainlink routes read the on-chain aggregators directly. Each response carries its source and a timestamp. Market data is informational, not financial advice; the pre-trade token-safety gate is a static + simulation check, not a guarantee a token is safe.