| name | peer-analytics |
| description | Analyze Peer (ZKP2P) protocol health — volume, liquidity, spreads, leaderboards, attribution, and market data via the Peerlytics SDK. Use when the user wants protocol metrics, period comparisons, maker/taker rankings, or market spread analysis. |
Peer Analytics Skill
Overview
Query aggregated protocol analytics from the Peerlytics API. This skill covers protocol-level metrics — volume, liquidity, spreads, leaderboards, attribution, and market summaries. For entity-level lookups (individual deposits, intents, addresses), see the peer-explorer skill.
SDK: @peerlytics/sdk (Peerlytics class)
Setup
npm install @peerlytics/sdk
With API Key
import { Peerlytics } from '@peerlytics/sdk';
const peerlytics = new Peerlytics({
apiKey: process.env.PEERLYTICS_API_KEY,
});
With x402 (No API Key Required)
import { Peerlytics } from '@peerlytics/sdk';
const peerlytics = new Peerlytics({
x402: {
walletClient,
chainId: 8453,
},
});
Cost per query: ~$0.001-0.01 USDC depending on endpoint complexity.
Core Analytics Endpoints
Protocol Summary
Get a full snapshot of protocol health across multiple time ranges:
const summary = await peerlytics.getSummary();
Period Analytics
Query metrics for a specific time range:
const period = await peerlytics.getPeriod('3mtd');
Chunked Time-Series Data
Get granular time-series breakdowns:
const daily = await peerlytics.getChunk('mtd', 'daily');
const flows = await peerlytics.getChunk('ytd', 'flows');
Leaderboards
Query maker and taker rankings:
const leaderboard = await peerlytics.getLeaderboard({ limit: 20, offset: 0 });
Each maker entry includes: address, volumeUsd, activeDeposits, fulfilledIntents, successRatePct, realizedProfitUsd, aprPct.
Each taker entry includes: address, volumeUsd, signalCount, fulfillCount, pruneCount, successRatePct, trustScore, tier, tierCap.
Attribution
const attribution = await peerlytics.getAttribution();
const depositAttribution = await peerlytics.getDepositAttribution();
Market Data Endpoints
Market Summary (Spreads by Platform/Currency)
const market = await peerlytics.getMarketSummary({
platform: ['venmo', 'wise', 'revolut'],
currency: ['USD', 'EUR'],
includeRates: true,
});
Metadata
const currencies = await peerlytics.getCurrencies();
const platforms = await peerlytics.getPlatforms();
Common Analysis Patterns
Protocol Health Check
const summary = await peerlytics.getSummary();
const { periods, liquidity, spreads, changes } = summary;
console.log(`MTD volume: $${periods.mtd.metrics.volume}`);
console.log(`Active liquidity: $${liquidity.available} across ${liquidity.activeDeposits} deposits`);
console.log(`Current spread: ${spreads?.current_spread_bps ?? 'N/A'} bps`);
console.log(`Volume vs last month: ${changes.volume.mtd_vs_prior_month}%`);
Compare Platforms by Spread
const market = await peerlytics.getMarketSummary({
platform: ['venmo', 'wise', 'revolut', 'cashapp', 'paypal', 'zelle'],
currency: 'USD',
});
const sorted = market.markets
.filter((m) => m.median !== null)
.sort((a, b) => (a.median ?? 0) - (b.median ?? 0));
for (const m of sorted) {
const spreadBps = ((m.median! - 1) * 10000).toFixed(0);
console.log(`${m.platform}: ${spreadBps} bps median, $${m.totalLiquidity} liquidity`);
}
Period-over-Period Comparison
const mtd = await peerlytics.getPeriod('mtd');
const qtd = await peerlytics.getPeriod('3mtd');
const ytd = await peerlytics.getPeriod('ytd');
Top Maker Analysis
const { makers } = await peerlytics.getLeaderboard({ limit: 10 });
for (const maker of makers.byVolume) {
console.log(
`${maker.addressShort}: $${maker.volumeUsd} volume, ` +
`${maker.successRatePct}% fill rate, ` +
`${maker.aprPct?.toFixed(1) ?? 'N/A'}% APR`
);
}
Full API Reference
See references/analytics-api.md for complete response type definitions and all query parameters.
Related Skills
peer-explorer — Entity lookups: deposits, intents, addresses, makers, verifiers, search
peer-market — Market intelligence with indexer GraphQL queries, orderbook, quote API
check-fx-rates — Quick rate checks and spread comparisons (action skill)
Environment
| Value |
|---|
| Peerlytics API | https://peerlytics.xyz |
| Auth | X-API-Key header or x402 micropayment |
export PEERLYTICS_API_KEY="..."