# Wallet Scan

The wallet resource scans a wallet address for DeFi positions and computes portfolio risk exposure.

```
GET  /v1/wallet/{address}

Scan wallet for DeFi risk exposure

Required plan: Pro
```

Analyzes a wallet address for DeFi protocol positions and returns risk data. Supports multiple address formats.

### Authentication

Required — pass API key in the X-API-Key header.

#### Supported Address Formats

| **Format** | **Example**   | **Description**                                  |
| ---------- | ------------- | ------------------------------------------------ |
| EVM        | 0x1234...abcd | Ethereum/L2 address (0x + 40 hex chars)          |
| Solana     | 5eykt4...7mc  | Solana public key (base58, 32-44 chars)          |
| ENS        | vitalik.eth   | Ethereum Name Service — resolved to EVM address  |
| SNS        | toly.sol      | Solana Name Service — resolved to Solana address |

#### Path Parameters

| **Parameter** | **Type** | **Required** | **Description**                                     |
| ------------- | -------- | ------------ | --------------------------------------------------- |
| address       | string   | Yes          | Wallet address, ENS name (.eth), or SNS name (.sol) |

#### Response Codes

| **Code** | **Meaning**                                                        |
| -------- | ------------------------------------------------------------------ |
| 200      | Success. Wallet scan results with detected positions and risk data |
| 400      | Invalid address format                                             |
| 401      | Unauthorized                                                       |
| 403      | Requires Pro plan or higher                                        |
| 404      | Could not resolve ENS/SNS name                                     |
| 502      | Name resolution failed (temporary)                                 |
| 503      | Wallet scanning service temporarily unavailable                    |

#### Example Request

```typescript
const res = await fetch("https://api.diapleo.xyz/v1/wallet/vitalik.eth", {
  headers: { "X-API-Key": process.env.DIAPLEO_API_KEY! },
});
const { data } = await res.json();
```

#### Example Response

```json
{
  "success": true,
  "data": {
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "resolvedFrom": "vitalik.eth",
    "positions": [],
    "riskSummary": {}
  }
}
```

> **Note:** The exact response shape depends on the detected positions and protocols in the wallet. The wallet scan enriches positions with Diapleo risk scores when available.

#### Chain Coverage

| Chain                                                             | Position Detection | Notes                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ethereum, Arbitrum, Base, Optimism, Polygon, and other EVM chains | Full               | Lending, LSTs, LPs, perps, yield vaults                                                                                                                                                                                                   |
| Solana                                                            | Best-effort        | Liquid staking tokens (mSOL, jitoSOL, bSOL, jupSOL, INF, fragSOL), Kamino k-tokens, and Drift / MarginFi / Jupiter / Mango positions via Zerion. Long-tail Solana protocols may be under-reported — expanding coverage is on the roadmap. |

Sanctions screening, SIWE/SIWS authentication, and SNS (`.sol`) name resolution work identically across both chains.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.diapleo.com/api-reference/endpoints/endpoints-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
