# TradeSonar — dYdX Whale PnL Lookup

> TradeSonar — dYdX Whale PnL Lookup is a paid API for AI agents from api.tradesonar.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Returns realized PnL, funding paid/received, and position count for a specific dYdX on-chain address, with block-level data freshness stamping.

## Facts

- Endpoint: GET https://api.tradesonar.io/v1/whales/%7Baddress%7D/pnl?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tradesonar-dydx-whale-pnl-lookup-99ff2c04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QXmouhlxH3pgJtr7e-neh

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tradesonar-dydx-whale-pnl-lookup-99ff2c04
```

Example prompt: Pull the on-chain PnL breakdown for dYdX address dydx1abc123xyz — I want to see realized PnL, total funding paid and received, and how fresh the data is.

## When to prefer this

Use this endpoint when you need realized PnL and funding cost breakdown for a specific dYdX perpetuals trader by wallet address. Prefer this over general market endpoints when your goal is evaluating a specific wallet's historical profitability, funding drag, or trade count — e.g. for copy-trading vetting, smart-money attribution, or on-chain due diligence. Not suited for market-wide signals or real-time price data.

## Known failure modes

- Invalid or malformed dYdX address returns a 400/404 error
- Address with no dYdX trading history may return zero values across all fields
- Replica lag may cause stale data during high-throughput periods (indicated in data_as_of field)
- Payment of 0.002 USDC required per call — missing or failed x402 payment returns 402 Payment Required
- Network or upstream dYdX node issues may cause temporary unavailability

## How this service works

TradeSonar: dYdX on-chain smart-money, funding and crowding signals. Every response is stamped with data_as_of freshness (block height + replica lag).

## Output

A JSON object containing the address's realized PnL in USD, total funding paid in USD, total funding received in USD, and the number of positions traded, along with a data_as_of timestamp including block height and replica lag indicating data freshness.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "positionCount": 0,
   "fundingPaidUsd": "...",
   "realizedPnlUsd": "...",
   "fundingReceivedUsd": "..."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tradesonar-dydx-whale-pnl-lookup-99ff2c04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradesonar.io](https://www.zero.xyz/host/api.tradesonar.io/llms.txt)
