Per-token profit and loss breakdown for any wallet via x402-paid API on Base.
What it does
The `/api/wallet/pnl` endpoint is part of DeFi Shield, a suite of 69 paid API endpoints providing security intelligence and on-chain analytics to autonomous AI agents. This specific endpoint computes a per-token profit and loss breakdown for a given wallet address. It is one of six Wallet Intelligence endpoints offered by the platform.
Payment is handled via the x402 protocol, settling in USDC on Base. The listed price for this endpoint is $1.00 per call. Agents send a POST request with an x402 payment header, the facilitator verifies the USDC payment on Base, and the endpoint returns JSON results. Payment settles only on a successful response. The probe confirmed the endpoint is live, returning HTTP 402 as expected for an x402 endpoint awaiting payment.
DeFi Shield provides free discovery via GET requests on each endpoint path, an agent card at `/.well-known/agent-card.json`, a health endpoint listing all endpoints and pricing, and an analytics endpoint for call statistics. However, no OpenAPI schema, detailed documentation, or example request/response payloads are available from the crawled material. The exact input parameters (beyond presumably a wallet address) and the structure of the PnL response are not documented in the sources gathered.
Capabilities
Use cases
- —AI agents evaluating wallet trading performance before copy-trading
- —Portfolio dashboards computing per-token realized and unrealized PnL
- —Risk assessment tools profiling a wallet's historical returns
- —Autonomous trading agents deciding whether to follow a wallet's strategy
- —Due diligence on counterparty wallets in DeFi transactions
Fit
Best for
- —AI agents needing per-call paid wallet analytics without subscriptions
- —Autonomous DeFi agents performing wallet due diligence
- —Developers building on-chain portfolio tracking tools
Not for
- —High-frequency trading requiring sub-second latency (pay-per-call overhead)
- —Users who need free or bulk-discounted wallet analytics
- —Non-EVM chain wallet analysis (no evidence of multi-chain wallet support beyond Base settlement)
Quick start
# Discover endpoint (free)
curl https://defi-shield-hazel.vercel.app/api/wallet/pnl
# Paid request (requires x402 payment header)
curl -X POST https://defi-shield-hazel.vercel.app/api/wallet/pnl \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-token>" \
-d '{"address": "0xYourWalletAddress"}'Example
Request
{
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}Endpoint
Quality
The endpoint is confirmed live (402 challenge captured) and the landing page provides pricing and a brief description. However, there is no OpenAPI schema, no detailed documentation, no example responses, and the x402 challenge object was empty — meaning exact payment parameters (amount, asset, network) could not be independently verified from the probe. Input/output schemas are inferred.
Warnings
- —No OpenAPI or JSON schema available for request or response
- —x402 challenge object was empty — payment parameters not independently verified
- —No documentation page found (404 at /docs)
- —Example request JSON is inferred from landing page patterns, not from a schema
- —Price of $1.00 per call is sourced only from the landing page listing, not from the 402 challenge
Citations
- —The /api/wallet/pnl endpoint provides per-token profit and loss breakdown at $1.00 per callhttps://defi-shield-hazel.vercel.app
- —DeFi Shield offers 69 paid API endpoints using x402 protocol with USDC on Basehttps://defi-shield-hazel.vercel.app
- —Payment settles only on successful response; agents pay via x402 payment headerhttps://defi-shield-hazel.vercel.app
- —Free discovery available via GET on each endpoint and at /.well-known/agent-card.jsonhttps://defi-shield-hazel.vercel.app
- —Endpoint returned HTTP 402 confirming it is livehttps://defi-shield-hazel.vercel.app/api/wallet/pnl