ChainRay API Documentation

On-Chain Intelligence for AI Agents — 93 endpoints × 46 chains

Pay-per-request via the x402 protocol. No API keys. No subscriptions. Just send a request — if payment is required, you'll receive a 402 response with payment instructions.

Getting Started

Base URL: https://chainray.online

Protocol: All paid endpoints use the x402 HTTP payment protocol. First request returns 402 Payment Required with payment details. After payment, the response is returned normally.

Quick test:

npx agentcash try https://chainray.online

All responses include:

  • X-Chain-Proof header — cryptographic proof of data origin (chain:blockNumber)
  • X-Cache-Status header — HIT or MISS
  • X-Data-Hash header — SHA-256 of response body

Authentication (x402)

ChainRay uses the x402 micropayment protocol — no API keys required.

How it works:

  1. Send a normal GET/POST request to any endpoint
  2. If payment is required, you'll get a 402 response with a payment-required header
  3. Sign a USDC payment on Base chain and re-send with payment proof
  4. The response is returned with data + Chain Proof headers

Payment chain: Base (USDC)

Receiving wallet: 0xeF0d99f3Ae2927A4ba2A6E794Fb849BaeF8B5c11

For AI Agents: Use the @x402/client npm package to handle payments automatically.

Supported Chains (46)

Pass ?chain= query parameter. Default: base

base ethereum arbitrum optimism polygon bsc avalanche zksync linea scroll blast mantle gnosis polygon-zkevm mode sei celo manta taiko fantom cronos opbnb zora worldchain metis fraxtal kava zetachain filecoin core-dao aurora moonbeam klaytn bob canto solana sui aptos ton xrp tron doge cardano near cosmos bitcoin

API Reference

Market Data

GET /price Entry · $0.001

Get real-time token price from on-chain DEX pools (Uniswap V3), enriched with CoinGecko market data and DeFi Llama.

Parameters
token query required Token symbol (e.g. ETH) or contract address (0x...)
chain query optional Chain name (default: base) (default: base)
Example Request
curl "https://chainray.online/price?token=ETH&chain=base"
Example Response
{
  "token": "ETH",
  "priceUsd": 3245.67,
  "source": "Uniswap V3 WETH/USDC",
  "chain": "base",
  "confidence": "high",
  "marketCap": "$390.0B",
  "volume24h": "$12.3B",
  "priceChange24h": "-1.25%",
  "sources": [
    "on-chain DEX",
    "DeFi Llama",
    "CoinGecko"
  ]
}
GET /dex-trades Analytics · $0.01

Get recent DEX trades for a token pair.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/dex-trades?chain=base"
Example Response
{
  "chain": "base",
  "trades": [],
  "count": 0
}
GET /new-pairs Analytics · $0.01

Discover newly created liquidity pools and trading pairs.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/new-pairs?chain=base"
Example Response
{
  "chain": "base",
  "pairs": [],
  "count": 0
}
GET /sentiment Analytics · $0.01

NLP-based token sentiment analysis from news and social media (via CryptoCompare).

Parameters
token query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/sentiment?token=ETH"
Example Response
{
  "token": "ETH",
  "sentiment": "bullish",
  "score": 0.72,
  "sources": [
    "news",
    "social"
  ],
  "chain": "base"
}
GET /token-screener Pro · $0.02

Advanced token screening with multi-factor analysis.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/token-screener?chain=base"
Example Response
{
  "chain": "base",
  "tokens": [],
  "filters": {}
}
GET /market-overview Flagship · $0.05

Comprehensive market overview — ETH price, gas, top movers, DeFi TVL. Aggregates multiple data sources.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/market-overview?chain=base"
Example Response
{
  "chain": "base",
  "ethPrice": 3245.67,
  "gas": {},
  "topMovers": [],
  "defiTvl": "$45B",
  "timestamp": 1713000000000
}
GET /kol-trades Flagship · $0.05

Track KOL (Key Opinion Leader) trading activity and patterns.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/kol-trades?chain=base"
Example Response
{
  "chain": "base",
  "trades": [],
  "kolCount": 0
}
GET /capital-flow-radar Flagship · $0.05

Capital flow analysis across chains and protocols.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/capital-flow-radar?chain=base"
Example Response
{
  "chain": "base",
  "inflows": {},
  "outflows": {},
  "netFlow": 0
}
GET /market-pulse Flagship · $0.05

Real-time market pulse combining price, volume, sentiment, and whale activity.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/market-pulse?chain=base"
Example Response
{
  "chain": "base",
  "pulse": {},
  "sentiment": "neutral",
  "whaleActivity": "low"
}

Gas & Fees

GET /gas-tracker Entry · $0.001

Current gas prices with congestion level and trend analysis.

Parameters
chain query optional Chain name (default: base)
Example Request
curl "https://chainray.online/gas-tracker?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "current": {
    "baseFee": 12.5,
    "priorityFee": 1.2,
    "unit": "gwei"
  },
  "trend": "decreasing",
  "congestion": "low",
  "timestamp": 1713000000000
}
GET /gas-history Entry · $0.001

Historical gas price data over recent blocks.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/gas-history?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "blocks": 20,
  "history": [
    {
      "blockNumber": 19500000,
      "baseFee": 12.3
    }
  ],
  "avgBaseFee": 13.2
}
GET /gas-predict Standard · $0.005

Short-term gas price prediction based on recent block trends.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/gas-predict?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "prediction": {
    "next5min": 14.2,
    "next1hr": 12.8
  },
  "confidence": "medium",
  "trend": "decreasing"
}
GET /gas-optimization Standard · $0.005

Get gas optimization recommendations for the current network conditions.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/gas-optimization?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "recommendations": [],
  "optimalTiming": "now"
}

Token Data

GET /token-supply Entry · $0.001

Get total and circulating supply of an ERC-20 token.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/token-supply?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base"
Example Response
{
  "token": "USDC",
  "totalSupply": "4363039207.94",
  "decimals": 6,
  "chain": "base"
}
GET /token-holders Standard · $0.005

Get top holders of an ERC-20 token.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/token-holders?address=0x...&chain=base"
Example Response
{
  "token": "0x...",
  "holders": [],
  "totalHolders": 0,
  "chain": "base"
}
GET /token-unlock Pro · $0.02

Track token vesting and unlock schedules.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/token-unlock?address=0x...&chain=ethereum"
Example Response
{
  "token": "0x...",
  "unlocks": [],
  "chain": "ethereum"
}

Address Intelligence

GET /address-labels Entry · $0.001

Get known labels for an address (exchange, DEX, contract type).

Parameters
address path/query required Ethereum address
chain query optional (default: base)
Example Request
curl "https://chainray.online/address-labels/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?chain=ethereum"
Example Response
{
  "address": "0xA0b8...",
  "labels": [
    {
      "name": "USDC",
      "category": "stablecoin",
      "confidence": 0.99
    }
  ],
  "chain": "ethereum"
}
GET /recent-interactions Standard · $0.005

Get recent transaction interactions for an address.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/recent-interactions?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "interactions": [],
  "chain": "base"
}
GET /wallet-profile Pro · $0.02

Comprehensive wallet analysis — balances, activity age, transaction patterns.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/wallet-profile?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "balance": {},
  "txCount": 0,
  "firstSeen": null,
  "chain": "base"
}
GET /smart-money Pro · $0.02

Track smart money wallet movements and patterns.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/smart-money?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "wallets": [],
  "totalTracked": 0
}
GET /portfolio-analyze Pro · $0.02

Analyze a wallet's portfolio composition and performance.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/portfolio-analyze?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "totalValueUsd": 0,
  "assets": [],
  "chain": "base"
}
GET /credit-score Pro · $0.02

On-chain credit score for a wallet address (10-factor model).

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/credit-score?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "score": 650,
  "grade": "B",
  "factors": {},
  "chain": "base"
}
GET /address-report Flagship · $0.05

Comprehensive address report combining wallet profile, risk, labels, and activity.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/address-report?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "profile": {},
  "risk": {},
  "labels": [],
  "chain": "base"
}

Security

GET /contract-verify Entry · $0.001

Check if a contract address has verified source code.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/contract-verify?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base"
Example Response
{
  "address": "0x8335...",
  "verified": true,
  "chain": "base"
}
GET /token-risk Analytics · $0.01

Token risk assessment — checks proxy contracts, verified source, ownership, and honeypot indicators.

Parameters
address path/query required Token contract address
chain query optional (default: base)
Example Request
curl "https://chainray.online/token-risk?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "riskScore": 25,
  "isProxy": false,
  "isVerified": true,
  "ownershipRenounced": true,
  "chain": "base"
}
GET /token-approval Analytics · $0.01

Check token approval/allowance status for an address.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/token-approval?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "approvals": [],
  "riskyApprovals": 0,
  "chain": "base"
}
GET /multi-sig Analytics · $0.01

Analyze multi-signature wallet configuration.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/multi-sig?address=0x...&chain=ethereum"
Example Response
{
  "address": "0x...",
  "isMultiSig": false,
  "chain": "ethereum"
}
GET /contract-scan Pro · $0.02

Deep contract safety scan — bytecode analysis, proxy detection, storage inspection.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/contract-scan?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "isContract": true,
  "isProxy": false,
  "verified": true,
  "chain": "base"
}
GET /mev-detect Pro · $0.02

Post-transaction sandwich attack detection. Analyzes surrounding transactions in the same block to identify MEV patterns.

Parameters
txHash path required
chain query optional (default: base)
Example Request
curl "https://chainray.online/mev-detect/0x...?chain=base"
Example Response
{
  "txHash": "0x...",
  "blockNumber": 12345,
  "mevDetected": false,
  "sandwichAttacks": [],
  "riskLevel": "NONE",
  "note": "Post-transaction analysis only"
}
GET /risk-dashboard Pro · $0.02

Comprehensive risk dashboard for an address.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/risk-dashboard?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "overallRisk": "low",
  "categories": {},
  "chain": "base"
}
GET /sandwich-scanner Pro · $0.02

Scan an address's recent transactions for sandwich attack patterns.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/sandwich-scanner?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "sandwichesDetected": 0,
  "transactions": [],
  "chain": "base"
}
GET /mev-shield Flagship · $0.05

Pre-trade MEV risk assessment (heuristic model). Evaluates sandwich attack risk based on trade size, gas conditions, and chain characteristics. Note: does NOT read mempool.

Parameters
action query optional Trade type: swap, bridge, add-liquidity (default: swap)
tokenIn query optional (default: USDC)
tokenOut query optional (default: ETH)
amountUsd query optional Trade size in USD (default: 1000)
chain query optional (default: base)
Example Request
curl "https://chainray.online/mev-shield?action=swap&tokenIn=USDC&tokenOut=ETH&amountUsd=5000&chain=ethereum"
Example Response
{
  "oracleType": "mev-shield",
  "risk": {
    "sandwichRisk": 0.35,
    "riskLevel": "medium"
  },
  "recommendation": "proceed_with_caution",
  "recommendedSlippage": 0.5,
  "limitations": [
    "No mempool visibility",
    "Statistical estimate"
  ]
}

DeFi

GET /governance Standard · $0.005

Get governance information for a protocol.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/governance?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "proposals": [],
  "activeVotes": 0
}
GET /stablecoin-supply Standard · $0.005

Track stablecoin supply across the chain.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/stablecoin-supply?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "stablecoins": [
    {
      "symbol": "USDC",
      "supply": "42B"
    }
  ]
}
GET /solver-feed Standard · $0.005

ERC-7683 cross-chain intent profitability feed.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/solver-feed?chain=base"
Example Response
{
  "chain": "base",
  "intents": [],
  "timestamp": 1713000000000
}
GET /defi-yields Analytics · $0.01

Current DeFi yield opportunities across protocols.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/defi-yields?chain=base"
Example Response
{
  "chain": "base",
  "yields": [
    {
      "protocol": "Aave",
      "apy": "4.2%",
      "token": "USDC"
    }
  ]
}
GET /defi-compare Analytics · $0.01

Compare DeFi protocol metrics side by side.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/defi-compare?chain=base"
Example Response
{
  "chain": "base",
  "protocols": []
}
GET /stablecoin-monitor Analytics · $0.01

Monitor stablecoin peg health and deviations.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/stablecoin-monitor?chain=base"
Example Response
{
  "chain": "base",
  "stablecoins": [
    {
      "symbol": "USDC",
      "peg": 1.0001,
      "deviation": "0.01%"
    }
  ]
}
GET /protocol-tvl Analytics · $0.01

Get Total Value Locked (TVL) data for DeFi protocols via DeFi Llama.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/protocol-tvl?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "protocols": [
    {
      "name": "Aave",
      "tvlUsd": 12500000000
    }
  ],
  "totalTvl": "$45.2B"
}
GET /yield-farming Analytics · $0.01

Active yield farming opportunities.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/yield-farming?chain=base"
Example Response
{
  "chain": "base",
  "farms": []
}
GET /flashloan-monitor Analytics · $0.01

Monitor flashloan activity on the chain.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/flashloan-monitor?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "recentFlashloans": [],
  "count": 0
}
GET /liquidation-alerts Analytics · $0.01

DeFi lending protocol liquidation alerts.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/liquidation-alerts?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "alerts": [],
  "atRiskPositions": 0
}
GET /impermanent-loss Analytics · $0.01

Calculate impermanent loss for a liquidity position.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/impermanent-loss?chain=base"
Example Response
{
  "chain": "base",
  "ilPct": 0,
  "analysis": {}
}
GET /liquidity-depth Pro · $0.02

Analyze liquidity depth and concentration for a token.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/liquidity-depth?chain=base"
Example Response
{
  "chain": "base",
  "depth": {},
  "pools": []
}
GET /protocol-health Pro · $0.02

Health metrics for DeFi protocols.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/protocol-health?chain=base"
Example Response
{
  "chain": "base",
  "protocols": [],
  "healthScore": 0
}
GET /yield-aggregator Pro · $0.02

Aggregated yield opportunities across protocols.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/yield-aggregator?chain=base"
Example Response
{
  "chain": "base",
  "opportunities": [],
  "bestApy": null
}
GET /defi-opportunity Pro · $0.02

Curated DeFi opportunities based on current market conditions.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/defi-opportunity?chain=base"
Example Response
{
  "chain": "base",
  "opportunities": []
}
GET /yield-optimizer Flagship · $0.05

Optimized yield strategy recommendations.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/yield-optimizer?chain=base"
Example Response
{
  "chain": "base",
  "strategies": [],
  "bestStrategy": null
}

Whale Tracking

GET /whale-alerts Standard · $0.005

Monitor large token transfers (USDC, WETH, USDT, DAI) with exchange classification.

Parameters
hours query optional Lookback period in hours (default: 6)
minAmount query optional Minimum transfer size in USD (default: 50000)
chain query optional (default: base)
Example Request
curl "https://chainray.online/whale-alerts?chain=ethereum&minAmount=100000"
Example Response
{
  "chain": "ethereum",
  "totalAlerts": 5,
  "alerts": [
    {
      "txHash": "0x...",
      "from": "0x...",
      "to": "0x...",
      "token": "USDC",
      "amount": 500000,
      "usdValue": 500000,
      "direction": "exchange_deposit"
    }
  ]
}
GET /whale-tracker Pro · $0.02

Track specific whale wallet activity and movements.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/whale-tracker?address=0x...&chain=ethereum"
Example Response
{
  "address": "0x...",
  "movements": [],
  "chain": "ethereum"
}

Cross-Chain

GET /bridge-monitor Standard · $0.005

Monitor cross-chain bridge activity and volumes.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/bridge-monitor?chain=base"
Example Response
{
  "chain": "base",
  "bridges": [],
  "totalVolume24h": 0
}
GET /chain-compare Pro · $0.02

Compare metrics across multiple chains.

Example Request
curl "https://chainray.online/chain-compare"
Example Response
{
  "chains": [],
  "comparison": {}
}
GET /bridge-flow Pro · $0.02

Track cross-chain bridge flow data.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/bridge-flow?chain=base"
Example Response
{
  "chain": "base",
  "inflows": 0,
  "outflows": 0
}
GET /cross-chain Pro · $0.02

Cross-chain activity analysis for an address.

Parameters
address path/query required
Example Request
curl "https://chainray.online/cross-chain?address=0x..."
Example Response
{
  "address": "0x...",
  "chainsActive": [],
  "totalChains": 0
}

NFT

GET /nft Entry · $0.001

Get NFT collection data and token metadata.

Parameters
address path/query required NFT contract address
chain query optional (default: base)
Example Request
curl "https://chainray.online/nft?address=0x...&chain=ethereum"
Example Response
{
  "collection": "Example NFT",
  "totalSupply": 10000,
  "chain": "ethereum"
}
GET /nft-floor Standard · $0.005

Get floor price data for an NFT collection.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/nft-floor?address=0x...&chain=ethereum"
Example Response
{
  "collection": "0x...",
  "floorPrice": null,
  "chain": "ethereum"
}
GET /nft-holders Analytics · $0.01

Get NFT holder distribution data.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/nft-holders?address=0x...&chain=ethereum"
Example Response
{
  "collection": "0x...",
  "holders": [],
  "uniqueHolders": 0,
  "chain": "ethereum"
}

Oracle

GET /oracle/price-feed Entry · $0.001

Price oracle feed with multi-source aggregation.

Parameters
token query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/oracle/price-feed?token=ETH"
Example Response
{
  "token": "ETH",
  "priceUsd": 3245.67,
  "sources": [
    "on-chain",
    "DeFi Llama"
  ],
  "confidence": "high"
}
GET /oracle/gas-avg Standard · $0.005

Get average gas price oracle data.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/oracle/gas-avg?chain=base"
Example Response
{
  "chain": "base",
  "avgGas": 0.005,
  "unit": "gwei",
  "period": "1h"
}
GET /oracle/chain-status Standard · $0.005

Chain health and status oracle.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/oracle/chain-status?chain=base"
Example Response
{
  "chain": "base",
  "status": "healthy",
  "blockTime": 2,
  "latestBlock": 12345678
}
GET /gas-oracle Analytics · $0.01

Multi-speed gas oracle (slow/standard/fast/instant).

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/gas-oracle?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "slow": 8,
  "standard": 12,
  "fast": 18,
  "instant": 25,
  "unit": "gwei"
}

Agent

GET /agent-card Entry · $0.001

Lookup an AI agent's capability card (A2A protocol).

Parameters
agentId query required Agent ID to look up
Example Request
curl "https://chainray.online/agent-card?agentId=example-agent"
Example Response
{
  "agentId": "example-agent",
  "capabilities": [],
  "registered": true
}
GET /agent-card/discover Standard · $0.005

Discover registered AI agents and their capabilities.

Example Request
curl "https://chainray.online/agent-card/discover"
Example Response
{
  "agents": [],
  "totalRegistered": 0
}
GET /agent-reputation Pro · $0.02

On-chain reputation score for AI agents (ERC-8004).

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/agent-reputation?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "reputation": 0,
  "factors": {},
  "chain": "base"
}
GET /context-brief Flagship · $0.05

AI-ready context brief — aggregates gas, price, whale, trending, and DeFi data into a single response for agent decision-making.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/context-brief?chain=base"
Example Response
{
  "chain": "base",
  "summary": {},
  "gas": {},
  "price": {},
  "whales": {},
  "trending": []
}
POST /agent-card/register Flagship · $0.05

Register an AI agent capability card (A2A protocol).

Parameters
body body (JSON) required Agent card data
Example Request
curl -X POST "https://chainray.online/agent-card/register" -H "Content-Type: application/json" -d '{"name":"MyAgent","capabilities":["trade"]}'
Example Response
{
  "registered": true,
  "agentId": "..."
}
GET /context-brief/workflow Flagship · $0.05

Role-differentiated context brief with multi-agent workflow orchestration (CaaS v2).

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/context-brief/workflow?chain=base"
Example Response
{
  "chain": "base",
  "workflow": {},
  "roles": []
}
GET /intent Pro · $0.03

Natural language intent router — auto-routes your query to the best endpoint combination.

Parameters
q query required Natural language query
chain query optional (default: base)
Example Request
curl "https://chainray.online/intent?q=what%20is%20the%20gas%20price%20on%20ethereum"
Example Response
{
  "intent": "gas-check",
  "endpoints": [
    "/gas-tracker"
  ],
  "result": {},
  "chain": "ethereum"
}
GET /watch Pro · $0.02

Create a watchlist entry with a full data snapshot for an endpoint.

Parameters
endpoint query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/watch?endpoint=/gas-tracker&chain=ethereum"
Example Response
{
  "watchId": "...",
  "snapshot": {},
  "timestamp": 1713000000000
}
GET /watch-diff Entry · $0.005

Get diff since last watch snapshot (75% cheaper than full re-query).

Parameters
watchId query required
Example Request
curl "https://chainray.online/watch-diff?watchId=..."
Example Response
{
  "watchId": "...",
  "changed": true,
  "diff": {},
  "timestamp": 1713000000000
}

Predictions

GET /predict/gas Analytics · $0.01

Gas price prediction for next 5 minutes and 1 hour based on block trend analysis.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/predict/gas?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "predictions": {
    "next5min": 14.2,
    "next1hr": 12.8
  },
  "methodology": "statistical"
}
GET /predict/whale-move Pro · $0.03

Whale behavior prediction based on historical patterns.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/predict/whale-move?chain=ethereum"
Example Response
{
  "chain": "ethereum",
  "prediction": {},
  "confidence": "medium"
}
GET /predict/liquidity Pro · $0.03

TVL and liquidity trend prediction.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/predict/liquidity?chain=base"
Example Response
{
  "chain": "base",
  "prediction": {},
  "trend": "stable"
}
GET /predict/token-momentum Pro · $0.03

Token momentum prediction based on volume and price patterns.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/predict/token-momentum?chain=base"
Example Response
{
  "chain": "base",
  "tokens": [],
  "prediction": {}
}

Analytics

GET /mev-intel Flagship · $0.05

Cross-DEX spread analysis with gas cost estimation. Uses heuristic model based on 24h price volatility — NOT real-time mempool data.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/mev-intel?chain=base"
Example Response
{
  "type": "mev-intelligence",
  "chain": "base",
  "opportunities": [],
  "viableCount": 0,
  "methodology": "Heuristic estimation",
  "limitations": [
    "Not real-time",
    "No mempool access"
  ]
}

Aggregated

GET /chain-overview Bundle · $0.01

Full chain overview in one call: gas + health + protocol + supply + block. Saves ~80% vs individual calls.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/chain-overview?chain=base"
Example Response
{
  "chain": "base",
  "gas": {},
  "health": {},
  "protocols": [],
  "supply": {},
  "block": {}
}
GET /defi-scan Bundle · $0.02

Aggregated DeFi scan: yields + TVL + farming + stablecoins + comparison.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/defi-scan?chain=base"
Example Response
{
  "chain": "base",
  "yields": {},
  "tvl": {},
  "farms": {},
  "stablecoins": {}
}
GET /security-check Bundle · $0.02

Aggregated security check: token risk + contract scan + approvals + credit score.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/security-check?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "tokenRisk": {},
  "contractScan": {},
  "approvals": {},
  "creditScore": {}
}
GET /wallet-intel Bundle · $0.02

Aggregated wallet intelligence: profile + interactions + credit + portfolio + labels.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/wallet-intel?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "profile": {},
  "interactions": {},
  "credit": {},
  "portfolio": {},
  "labels": {}
}
GET /trade-signal Bundle · $0.03

Aggregated trade signal: trending + whales + smart money + pairs + KOL.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/trade-signal?chain=base"
Example Response
{
  "chain": "base",
  "trending": {},
  "whales": {},
  "smartMoney": {},
  "newPairs": {},
  "kol": {}
}

Real-time Stream

GET (SSE) /stream/whale-alerts Stream · $0.05

60-second Server-Sent Events stream of whale movements. Events pushed every 5 seconds.

Parameters
chain query optional (default: base)
Example Request
curl -N "https://chainray.online/stream/whale-alerts?chain=ethereum"
Example Response
SSE stream: data: {type: 'whale-monitor', alerts: [...], timestamp: ...}
GET (SSE) /stream/gas Stream · $0.02

60-second real-time gas price stream. Updates every 3 seconds.

Parameters
chain query optional (default: base)
Example Request
curl -N "https://chainray.online/stream/gas?chain=ethereum"
Example Response
SSE stream: data: {type: 'gas-monitor', gas: {...}, timestamp: ...}
GET (SSE) /stream/price Stream · $0.02

60-second real-time token price stream.

Parameters
token query required
chain query optional (default: base)
Example Request
curl -N "https://chainray.online/stream/price?token=ETH&chain=base"
Example Response
SSE stream: data: {type: 'price-monitor', price: {...}, timestamp: ...}
GET (SSE) /stream/trades Stream · $0.03

60-second real-time DEX trade stream.

Parameters
chain query optional (default: base)
Example Request
curl -N "https://chainray.online/stream/trades?chain=base"
Example Response
SSE stream: data: {type: 'trade-monitor', trades: [...], timestamp: ...}
GET (SSE) /stream/mempool Stream · $0.08

60-second large pending transaction stream. Monitors whale-scale transfers in near real-time.

Parameters
chain query optional (default: base)
Example Request
curl -N "https://chainray.online/stream/mempool?chain=ethereum"
Example Response
SSE stream: data: {type: 'mempool-monitor', largeTransfers: [...], timestamp: ...}

Utility

POST /batch Entry · $0.001

Execute multiple endpoint queries in a single request (up to 10). Charged as one $0.001 request regardless of sub-query count.

Parameters
queries body (JSON array) required Array of {endpoint, params} objects
Example Request
curl -X POST "https://chainray.online/batch" -H "Content-Type: application/json" -d '{"queries":[{"endpoint":"/price","params":{"token":"ETH"}},{"endpoint":"/gas-tracker"}]}'
Example Response
{
  "batchSize": 2,
  "results": [
    "..."
  ],
  "totalValue": "$0.012",
  "charged": "$0.001"
}
GET /tx-decode Analytics · $0.01

Decode transaction input data into human-readable format.

Parameters
txHash path required
chain query optional (default: base)
Example Request
curl "https://chainray.online/tx-decode/0x...?chain=base"
Example Response
{
  "txHash": "0x...",
  "decoded": {
    "method": "swap",
    "params": {}
  },
  "chain": "base"
}
POST /verify-proof Entry · $0.005

Verify a Chain Proof cryptographic signature to confirm data authenticity.

Parameters
body body (JSON) required Proof data to verify
Example Request
curl -X POST "https://chainray.online/verify-proof" -H "Content-Type: application/json" -d '{"proof":"...", "data":"..."}'
Example Response
{
  "valid": true,
  "chain": "base",
  "blockNumber": 12345678
}

Identity

GET /ens-resolve Entry · $0.001

Resolve ENS name to address or reverse lookup.

Parameters
name query required ENS name (e.g. vitalik.eth) or address for reverse
Example Request
curl "https://chainray.online/ens-resolve?name=vitalik.eth"
Example Response
{
  "name": "vitalik.eth",
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "avatar": null
}

Block Data

GET /block-info Entry · $0.001

Get information about a specific block or the latest block.

Parameters
block query optional Block number (default: latest)
chain query optional (default: base)
Example Request
curl "https://chainray.online/block-info?chain=base"
Example Response
{
  "chain": "base",
  "blockNumber": 12345678,
  "timestamp": 1713000000,
  "txCount": 45,
  "gasUsed": "12000000"
}
GET /chain-health Pro · $0.02

Chain health metrics — block time, finality, RPC status.

Parameters
chain query optional (default: base)
Example Request
curl "https://chainray.online/chain-health?chain=base"
Example Response
{
  "chain": "base",
  "healthy": true,
  "blockTime": 2,
  "latestBlock": 12345678
}

Contract Data

GET /contract-events Standard · $0.005

Get recent contract events/logs for an address.

Parameters
address path/query required
chain query optional (default: base)
Example Request
curl "https://chainray.online/contract-events?address=0x...&chain=base"
Example Response
{
  "address": "0x...",
  "events": [],
  "chain": "base"
}
ChainRay API Documentation · Generated automatically · 93 endpoints · 46 chains