DeFi analytics and on-chain execution via Spraay x402 — token prices, swap quotes, wallet profiling, portfolio/NFTs, DeFi positions, gas oracle, ENS, contract reads. Plus swap execution and contract writes. USDC micropayments on Base/Solana. Write ops are irreversible.
Documents
PayQL
Try itGet live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.
What it does
Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.
The skill document
PayQL — pay-per-query data from The Graph
Get live on-chain data from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~$0.01 USDC per query over x402. No API key, no account, no ETH for gas — the payment is the auth, and it's gasless (EIP-3009 transferWithAuthorization on Base).
💸 This spends real USDC. Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is not a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a dedicated, low-balance wallet — see Wallet & safety.
The loop: discover → price → query
- Discover the right live subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.
- Price it — preflight the
402challenge to read the exact USDC cost before paying (free). - Query — send GraphQL, pay the
402from your wallet, get the data + a receipt back.
Two ways to run it
A. PayQL MCP server (turnkey)
Install and wire into your harness (Claude Desktop / Code / Cursor):
{
"mcpServers": {
"payql": {
"command": "npx",
"args": ["-y", "payql"],
"env": { "PAYQL_NETWORK": "base", "PAYQL_PRIVATE_KEY": "0xYOUR_BASE_WALLET_KEY" }
}
}
}
⚠️
PAYQL_PRIVATE_KEYcan spend its wallet's USDC. Use a dedicated, low-balance Base wallet — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use option B (your harness's own wallet) or an Ampersend-managed wallet with spend caps.
Tools: search_subgraphs, get_payment_info (free price quote), query_subgraph (paid), get_subgraph_schema, wallet_status. Full recipe + example queries in references/gateway.md.
B. No install — use your harness's own wallet
If your harness already has an x402 / pay-for-service capability, hit the gateway directly:
- Gateway URL:
https://gateway.thegraph.com/api/x402/subgraphs/id/ - POST GraphQL
{"query":"..."}. On402, pay the quoted USDC amount and retry — your x402 client does this automatically.
Full no-install recipe (discovery query, pricing, examples) in references/gateway.md.
Wallet & safety
- Use a dedicated, low-balance Base wallet funded with only the USDC you intend to spend — never a primary, valuable, or reused key.
PAYQL_PRIVATE_KEYcan spend that wallet's USDC. - Fund with USDC only — payments are gasless, so no ETH is required. The per-query cost is $0.01; there are no API keys, subscriptions, or platform fees.
- This skill is for paid reads. It does not swap, trade, or auto-top-up your wallet — keep any funding or top-up a separate, human-approved action.
- Don't want a raw key in your config? Use option B (your harness's own wallet), or an Ampersend-managed wallet with server-side spend caps + allowlists (see the PayQL README).
Related skills
Use this skill when the agent needs LLM inference without an API key, persistent memory that survives across sessions, uptime monitoring, exact math, web scr...
Fetch a paywalled (HTTP 402) URL and pay for it automatically from the agent wallet's Kamino vault yield, without spending the principal. Also manages the Su...
Use Bitquery GraphQL through UXC for onchain trades, transfers, token holder analysis, balances, and market structure queries across supported networks, with...
Cheap, keyless on-chain reads for agents — native + ERC-20 balances, gas price, transaction status, token supply, ENS, nonce, across Base, Ethereum, Optimism...
Simulate a Uniswap swap before making it — amount out, effective price, price impact — computed offline from The Graph with the protocol's own concentrated-liquidity math. Also pools, token prices, pair lookup and live swap flow across Uniswap V2/V3/V4 on Ethereum, Arbitrum, Base, Polygon, Optimism and BSC. Trigger keywords: uniswap, swap, quote, price impact, slippage, how much would I get, pool, liquidity, fee tier, LP, DEX, token price, V3, V4.