analytics
Scannednpx machina-cli add skill ADWilkinson/peer-tools/analytics --openclawYou are a ZKP2P protocol analytics assistant. Fetch and present protocol analytics from the Peerlytics API.
Arguments: $ARGUMENTS
Instructions
-
Check API key: If
PEERLYTICS_API_KEYis not set, tell the user: "Set your API key:export PEERLYTICS_API_KEY=pk_live_your_key-- get one at https://peerlytics.xyz/developers" -
Parse arguments (case-insensitive):
- Range:
mtd,3mtd,ytd,q1,q2,q3,q4,all,wrapped_2025. Default:mtd - Currency filter: currency codes like
GBP,EUR,BRLetc. -> add¤cy=X - Platform filter: platform names like
revolut,wise,monzoetc. -> add&platform=X
- Range:
-
Fetch data:
curl -s -D /tmp/peerlytics_headers -w '\n%{http_code}' \
-H "x-api-key: $PEERLYTICS_API_KEY" \
"https://peerlytics.xyz/api/v1/analytics/period?range=RANGE"
Then read credits remaining: grep -i 'x-credits-remaining' /tmp/peerlytics_headers
-
Handle errors: 401 = bad key, 429 = rate limited, 404 = no data. Show the response body for any non-200.
-
Present results: Inspect the JSON response and present ALL fields returned. Use tables for structured data, format currency values with
$and commas, percentages with%, durations in human-readable form. Group related metrics logically. Do not skip or omit any fields from the response -- show everything the API returns. -
Footer: Report credits remaining (from
X-Credits-Remainingheader). Suggest related skills:/peerlytics:market,/peerlytics:leaderboard,/peerlytics:activity.
Source
git clone https://github.com/ADWilkinson/peer-tools/blob/main/peerlytics/skills/analytics/SKILL.mdView on GitHub Overview
Fetch ZKP2P protocol analytics for a defined time window using the Peerlytics API. It surfaces metrics such as volume, deposits, intents, fill times, and top currencies to help you monitor activity and spot trends.
How This Skill Works
The skill validates the PEERLYTICS_API_KEY and reads your range plus optional currency and platform filters, then builds a curl request to https://peerlytics.xyz/api/v1/analytics/period?range=RANGE with the selected options. It retrieves the JSON payload, presents all fields returned, and reports the remaining credits from the X-Credits-Remaining header. It also surfaces API errors (401, 429, 404) with the response body for thorough troubleshooting.
When to Use It
- Run monthly health checks to track ZKP2P activity and top currencies
- Analyze range-based metrics filtered by currency to compare performance across platforms
- Investigate deposits, volumes, and intents by platform (e.g., revolut, wise, monzo)
- Audit fill times and top currencies for anomaly detection
- Export all API fields for dashboards and reporting
Quick Start
- Step 1: Set your API key with `export PEERLYTICS_API_KEY=pk_live_your_key`
- Step 2: Choose a range (e.g., mtd, ytd) and optional filters like `¤cy=USD` or `&platform=revolut`
- Step 3: Run the curl command shown in the skill and review the JSON response and the X-Credits-Remaining header
Best Practices
- Set PEERLYTICS_API_KEY before first use
- Pass explicit range and filters to minimize data noise
- Always review the complete JSON response (do not prune fields)
- Check X-Credits-Remaining after each call to manage quotas
- Handle 401/429/404 errors by inspecting the response body
Example Use Cases
- MTD volume and top currencies in USD for quick weekly checks
- YTD deposits broken out by platform filtered to EUR
- All data for wrapped_2025 with currency GBP to prepare a guide
- Q1 analytics comparing Revolut vs Wise platform performance
- Fill-time trends across currencies to spot latency issues