# Multichain Wallet Analytics API (`merkle/wallet-analytics-api`) Actor

The fastest & cheapest API to scrape wallet trading stats across multiple blockchains. Instantly access PnL, trade history, win/loss ratio & performance metrics for any crypto wallet. Perfect for analysts, traders, and bot builders

- **URL**: https://apify.com/merkle/wallet-analytics-api.md
- **Developed by:** [Merkle](https://apify.com/merkle) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 63 total users, 1 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Multichain Wallet Analytics API (GMGN)

Multichain Wallet Analytics API (GMGN) is a lightning-fast, budget-friendly Apify actor that gathers and analyzes deep trading metrics from up to **3** crypto wallets across leading blockchains (Ethereum, BSC, Base, Solana and Blast). Perfect for analysts, traders, and bot developers, it delivers actionable PnL figures, win/loss ratios, and performance insights in seconds.

**Why Choose Multichain Wallet Analytics API (GMGN)?**

- **Fastest Analytics:** Accelerated scraping engine provides wallet stats within seconds
- **Most Cost-Effective:** Streamlined resource usage cuts down on API and proxy costs
- **Up to 3 Wallets:** Caps queries at 3 wallets per run for reliable, consistent performance
- **Deep Insights:** Comprehensive PnL ratios, trade counts, risk metrics, and more
- **Multi-Chain Coverage:** Supports Ethereum, BSC, Base, Solana, and Blast
- **Flexible Timeframes:** Retrieve data over 1-day, 7-day, 30-day, or all-time periods

### Features

- Scrape detailed statistics for up to **3** wallet addresses simultaneously
- Fetch metrics for customizable periods: **1d**, **7d**, **30d**, **all**
- Export results to Apify dataset in JSON, CSV, or Excel format
- Automatic wallet address validation and format conversion
- Multi-chain support: `eth`, `bsc`, `base`, `sol`, `blast`

### Use Cases

- **Portfolio Analysis:** Measure ROI and monitor wallet performance over time
- **Risk Profiling:** Identify high-risk trading patterns and exposure levels
- **Investor Research:** Uncover strategies and behaviors of successful wallets
- **Market Studies:** Compare asset performance and trading strategies across wallets
- **Data Science Projects:** Generate rich datasets for machine learning and statistical analysis

### Usage

1. Run this actor in the Apify console.
2. Provide inputs:
   - `walletAddresses`: Array of wallet addresses (max 3)
   - `chain`: One of `eth`, `bsc`, `base`, `sol`, `blast`
   - `period`: One of `1d`, `7d`, `30d`, `all`

#### Example Input

```json
{
    "walletAddresses": ["0xd8da6bf26964af9d7eed9e03e53415d37aa96045"],
    "chain": "eth",
    "period": "all"
}
```

### Output

The collected data is saved to the Apify dataset with the following fields:

| Field                                                                                                                                                                                                         | Description                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| `wallet_address`                                                                                                                                                                                              | Wallet address                           |
| `chain`                                                                                                                                                                                                       | Blockchain network                       |
| `period`                                                                                                                                                                                                      | Timeframe of statistics                  |
| **Trading Counts**                                                                                                                                                                                            |                                          |
| `buy`, `buy_1d`, `buy_7d`, `buy_30d`                                                                                                                                                                          | Number of buys overall and by period     |
| `sell`, `sell_1d`, `sell_7d`, `sell_30d`                                                                                                                                                                      | Number of sells overall and by period    |
| **Profit / Loss**                                                                                                                                                                                             |                                          |
| `pnl`, `pnl_1d`, `pnl_7d`, `pnl_30d`                                                                                                                                                                          | Profit/Loss ratios overall and by period |
| `all_pnl`                                                                                                                                                                                                     | All-time profit/loss ratio               |
| `realized_profit`, `realized_profit_1d`, `realized_profit_7d`, `realized_profit_30d`                                                                                                                          | Realized profits overall and by period   |
| `unrealized_profit`, `unrealized_pnl`                                                                                                                                                                         | Unrealized profit and P/L ratio          |
| `total_profit`, `total_profit_pnl`                                                                                                                                                                            | Total profit and profit/L ratio          |
| **Balances & Value**                                                                                                                                                                                          |                                          |
| `balance`, `eth_balance`, `sol_balance`, `trx_balance`, `bnb_balance`                                                                                                                                         | Token balances by chain                  |
| `total_value`                                                                                                                                                                                                 | Total wallet value                       |
| **Win Rate & Token Stats**                                                                                                                                                                                    |                                          |
| `winrate`, `token_sold_avg_profit`, `history_bought_cost`, `token_avg_cost`                                                                                                                                   | Win rate and cost metrics                |
| `token_num`, `profit_num`                                                                                                                                                                                     | Total tokens and profitable tokens count |
| `pnl_lt_minus_dot5_num`, `pnl_minus_dot5_0x_num`, `pnl_lt_2x_num`, `pnl_2x_5x_num`, `pnl_gt_5x_num`                                                                                                           | Distribution of token P/L brackets       |
| **Profile & Metadata**                                                                                                                                                                                        |                                          |
| `bind`, `avatar`, `name`, `ens`, `tags`, `tag_rank`                                                                                                                                                           | Wallet binding and identity data         |
| `twitter_name`, `twitter_username`, `twitter_bind`, `twitter_fans_num`                                                                                                                                        | Twitter profile information              |
| `followers_count`, `is_contract`, `last_active_timestamp`                                                                                                                                                     | Activity and contract status             |
| **Risk Metrics**                                                                                                                                                                                              |                                          |
| `risk.token_active`, `risk.token_honeypot`, `risk.token_honeypot_ratio`, `risk.no_buy_hold`, `risk.no_buy_hold_ratio`, `risk.sell_pass_buy`, `risk.sell_pass_buy_ratio`, `risk.fast_tx`, `risk.fast_tx_ratio` | Detailed risk indicators                 |
| **Timestamps**                                                                                                                                                                                                |                                          |
| `avg_holding_period`, `updated_at`, `refresh_requested_at`                                                                                                                                                    | Holding period and update timestamps     |

#### Example Output

```json
{
    "address": "3kebnKw7cPdSkLRfiMEALyZJGZ4wdiSRvmoN4rD1yPzV",
    "chain": "sol",
    "period": "7d",
    "buy": 581,
    "buy_1d": 115,
    "buy_7d": 581,
    "buy_30d": 1322,
    "sell": 502,
    "sell_1d": 98,
    "sell_7d": 502,
    "sell_30d": 1126,
    "pnl": -0.10828719023520679,
    "pnl_1d": 0.03140758753773306,
    "pnl_7d": -0.10828719023520679,
    "pnl_30d": -0.08746015532886187,
    "all_pnl": 0.12871069195157267,
    "realized_profit": 1684772.7576239784,
    "realized_profit_1d": 851.1409791878604,
    "realized_profit_7d": -25207.50269218135,
    "realized_profit_30d": -45563.020845507424,
    "unrealized_profit": 4110.971943821579,
    "unrealized_pnl": 0.00030513736589427,
    "total_profit": 1688883.7295678,
    "total_profit_pnl": 0.12877634799199128,
    "balance": "614.0013232",
    "eth_balance": "614.0013232",
    "sol_balance": "614.0013232",
    "trx_balance": "614.0013232",
    "bnb_balance": "614.0013232",
    "total_value": 122227.40625175112,
    "winrate": 0.4805194805194805,
    "token_sold_avg_profit": -79.02038461498856,
    "history_bought_cost": 304309.6197517237,
    "token_avg_cost": 953.948651259322,
    "token_num": 319,
    "profit_num": 148,
    "pnl_lt_minus_dot5_num": 50,
    "pnl_minus_dot5_0x_num": 115,
    "pnl_lt_2x_num": 149,
    "pnl_2x_5x_num": 5,
    "pnl_gt_5x_num": 0,
    "bind": false,
    "avatar": "https://pbs.twimg.com/profile_images/1913058996174405632/11uKxGds_400x400.jpg",
    "name": "Bastille",
    "ens": "",
    "tags": ["kol", "pump_smart", "photon", "bullx"],
    "tag_rank": {
        "bullx": 0,
        "kol": 1072,
        "photon": 0,
        "pump_smart": 35
    },
    "twitter_name": "Bastille",
    "twitter_username": "BastilleBtc",
    "twitter_bind": false,
    "twitter_fans_num": 64103,
    "followers_count": 64103,
    "is_contract": false,
    "last_active_timestamp": 1745407556,
    "risk": {
        "token_active": 319,
        "token_honeypot": 0,
        "token_honeypot_ratio": 0,
        "no_buy_hold": 7,
        "no_buy_hold_ratio": 0.02147239263803681,
        "sell_pass_buy": 2,
        "sell_pass_buy_ratio": 0.006269592476489028,
        "fast_tx": 20,
        "fast_tx_ratio": 0.06269592476489028
    },
    "avg_holding_period": 23827.617554858934,
    "updated_at": 1745407556,
    "refresh_requested_at": null
}
```

*Notes: All data is stored in Apify's default dataset.*

# Actor input Schema

## `walletAddresses` (type: `array`):

Enter the wallet addresses to check (one per line). At least one address is required. Maximum 3 addresses per run.

## `chain` (type: `string`):

Select the blockchain network (optional, defaults to Solana if empty)

## `period` (type: `string`):

Select the time period for analysis (optional, defaults to 7 days)

## Actor input object example

```json
{
  "walletAddresses": [
    "3kebnKw7cPdSkLRfiMEALyZJGZ4wdiSRvmoN4rD1yPzV"
  ],
  "chain": "sol",
  "period": "7d"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("merkle/wallet-analytics-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("merkle/wallet-analytics-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call merkle/wallet-analytics-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=merkle/wallet-analytics-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KYHUkyd7RRJWmJfIr/builds/09tFyw0tfcj1QAl3M/openapi.json
