# Crypto Price Tracker — BTC, ETH & 17K+ Altcoins (`khadinakbar/crypto-price-tracker`) Actor

Fetch real-time prices, market cap, 24h/7d/30d changes, ATH/ATL, supply, dominance, and computed analytics for a watchlist of coins (BTC, ETH, SOL...) or the top N by market cap. Multi-source: CoinGecko primary, Binance fallback. PPE: $0.003/coin.

- **URL**: https://apify.com/khadinakbar/crypto-price-tracker.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 coin trackeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Crypto, DEX & Wallet Tracker — CEX + On-Chain API

**One unified API for everything an AI agent needs about crypto.** Real-time CEX prices (CoinGecko + Binance), DEX trading pairs (DexScreener — Solana, Ethereum, Base, BSC, Polygon, Arbitrum, Optimism, Avalanche, Tron), and on-chain wallet stats with PnL (GMGN — Solana, Ethereum, BSC, Base, Tron). Four modes, one output schema, one tool call. Built for AI trading agents, portfolio bots, crypto research, and DEX intelligence workflows.

### What you get

A single unified record per data point with a `recordType` discriminator (`cex-coin` / `dex-pair` / `wallet-holding`):

#### CEX coin record (mode = `watchlist` or `market`)
| Field | Type | Notes |
|---|---|---|
| `symbol` | string | Uppercase ticker (BTC, ETH, …) |
| `name` | string | "Bitcoin", "Ethereum" |
| `coingeckoId` | string | Stable slug (e.g. `bitcoin`) |
| `quoteCurrency` | string | `usd`, `eur`, `gbp`, `jpy`, `btc`, etc. |
| `price` | number | Current price in `quoteCurrency` |
| `marketCap` / `volume24h` | number | Market metrics in `quoteCurrency` |
| `change1h` / `change24h` / `change7d` / `change30d` | number | % changes |
| `ath` / `athDate` / `athChangePct` / `atl` / `atlDate` | number/string | ATH / ATL data |
| `circulatingSupply` / `totalSupply` / `maxSupply` | number | Supply metrics |
| `marketCapRank` | number | 1 = highest |
| `dominancePct` | number | % of total crypto market cap (market mode) |
| `binancePriceUsd` / `binanceVolume24hUsd` | number | Binance USDT-pair fallback |
| `priceSource` | string | `coingecko` or `binance` |

#### DEX pair record (mode = `dex`)
| Field | Type | Notes |
|---|---|---|
| `symbol` / `name` | string | Token ticker + name |
| `chain` | string | `solana`, `ethereum`, `bsc`, `base`, … |
| `address` | string | Token contract address |
| `dexId` | string | `raydium`, `uniswap`, `pancakeswap`, … |
| `pairAddress` | string | DEX pool contract |
| `priceUsd` / `priceNative` | number | USD + quote-token price |
| `liquidityUsd` / `fdvUsd` / `marketCap` | number | Pool depth + valuation |
| `volume24h` / `volume6h` / `volume1h` | number | Multi-window volume |
| `buys24h` / `sells24h` | number | Transaction counts |
| `change5m` / `change1h` / `change6h` / `change24h` | number | % changes |
| `pairCreatedAt` | string | ISO 8601 — pool age |
| `dexScreenerUrl` | string | Public DexScreener page |
| `priceSource` | string | `dexscreener` |

#### Wallet record (mode = `wallet`)
| Field | Type | Notes |
|---|---|---|
| `walletAddress` | string | The wallet you queried |
| `chain` | string | `sol`, `eth`, `bsc`, `base`, `tron` |
| `totalValueUsd` | number | Sum of holdings, USD |
| `unrealizedPnlUsd` / `realizedPnlUsd` | number | Open + closed PnL |
| `pnl7dPct` / `pnl30dPct` | number | Time-windowed PnL % |
| `winrate7dPct` / `winrate30dPct` | number | Win rate of closed trades |
| `buy7dCount` / `sell7dCount` | number | Trade volume |
| `tokenCount` / `profitableTokenCount` | number | Token breadth |
| `avgHoldingHours` | number | Mean hold duration |
| `walletTags` | string[] | GMGN labels: `smart_degen`, `kol`, `sniper`, `bundler`, `rat_trader` |
| `lastActiveAt` | string | ISO 8601 |
| `gmgnUrl` | string | Public GMGN page |
| `priceSource` | string | `gmgn` |

### Why use this

Most crypto actors do one thing — DEX pairs OR wallet stats OR CEX prices. This one does **all three** through a single tool call with a unified schema. For an AI agent picking among tools at runtime, one tool with four modes beats four tools with bespoke shapes every time.

- **Watchlist mode** — track BTC, ETH, SOL by ticker. 5 coins = $0.015.
- **Market mode** — top 100 / 250 / 1000 by market cap. Top 100 = $0.30.
- **DEX mode** — DexScreener pairs by token address or symbol search. 5 pairs = $0.025.
- **Wallet mode** — GMGN on-chain wallet stats with PnL across SOL/ETH/BSC/Base/Tron. 1 wallet = $0.005.
- **Multi-source resilience** — CoinGecko + Binance fallback for CEX; Apify Proxy fronts GMGN's Cloudflare.
- **Unified MCP tool** — one tool name on Apify MCP gets you everything; cleaner agent UX than juggling 5 single-purpose actors.
- **No API keys** — uses free public endpoints with smart rate-limit handling.

### Pricing — Pay Per Event

| Event | Price | What it covers |
|---|---|---|
| Actor Start (per GB-RAM) | $0.00005 | One per run |
| CEX Coin Tracked | **$0.003** per coin | mode = `watchlist` or `market` |
| On-Chain Record | **$0.005** per record | mode = `dex` (one per pair) or `wallet` (one per wallet) |

Apify platform usage (compute + proxy passthrough) is billed against your Apify plan separately. Typical run uses ~0.0002 compute units.

#### Cost examples

- 5-coin watchlist (BTC, ETH, SOL, XRP, DOGE): **$0.015** + ~$0.00005 start
- 25-coin watchlist: **$0.075** + start
- Top 100 market sweep: **$0.30** + start
- 5 DEX queries × 3 pairs each (default): **$0.075** + start
- 10 wallets analyzed: **$0.05** + start

### How to use it

#### Inputs

| Field | Required | Default | Notes |
|---|---|---|---|
| `mode` | yes | `watchlist` | `watchlist` / `market` / `dex` / `wallet` |
| `symbols` | watchlist only | `["BTC","ETH","SOL","XRP","DOGE"]` | Up to 100 tickers |
| `topN` | market only | 100 | 10–1000 |
| `vsCurrency` | CEX modes | `usd` | usd, eur, gbp, jpy, cny, btc, eth |
| `useBinanceFallback` | CEX modes | `true` | Binance ticker enrichment |
| `dexQueries` | dex only | `["So11…", "PEPE"]` | Token addresses or symbol searches |
| `dexChain` | dex only | `solana` | Scope for EVM-address lookups |
| `dexMaxPairsPerToken` | dex only | 3 | 1–20 pairs per query |
| `walletAddresses` | wallet only | `["0xd8dA…"]` | EVM hex or Solana base58 |
| `walletChain` | wallet only | `eth` | sol, eth, bsc, base, tron |
| `walletPeriod` | wallet only | `7d` | 1d, 7d, 30d |
| `responseFormat` | all | `detailed` | `detailed` or `concise` (drops historical fields) |

#### CEX watchlist example (JavaScript)

```javascript
const { ApifyClient } = require('apify-client');
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('khadinakbar/crypto-price-tracker').call({
    mode: 'watchlist',
    symbols: ['BTC', 'ETH', 'SOL', 'XRP', 'DOGE'],
    vsCurrency: 'usd',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((c) => console.log(`${c.symbol}: $${c.price} (${c.change24h?.toFixed(2)}%)`));
````

#### DEX pair lookup example (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("khadinakbar/crypto-price-tracker").call(run_input={
    "mode": "dex",
    "dexQueries": [
        "So11111111111111111111111111111111111111112",  # SOL on Solana
        "0xdAC17F958D2ee523a2206206994597C13D831ec7",   # USDT on Ethereum
        "PEPE",                                          # symbol search across all chains
    ],
    "dexChain": "ethereum",  # default for hex addresses
    "dexMaxPairsPerToken": 3,
})

for pair in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{pair['symbol']} on {pair['chain']}/{pair['dexId']}: "
          f"${pair['priceUsd']} | Liq ${pair['liquidityUsd']:,.0f} | 24h Vol ${pair['volume24h']:,.0f}")
```

#### Wallet PnL example (JavaScript)

```javascript
const run = await client.actor('khadinakbar/crypto-price-tracker').call({
    mode: 'wallet',
    walletAddresses: [
        '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',  // vitalik.eth
    ],
    walletChain: 'eth',
    walletPeriod: '7d',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((w) => {
    console.log(`${w.walletAddress}: $${w.totalValueUsd?.toFixed(0)} total, ` +
                `${w.pnl7dPct?.toFixed(2)}% 7d PnL, ${w.winrate7dPct?.toFixed(1)}% winrate, ` +
                `tags: ${w.walletTags?.join(', ') || 'none'}`);
});
```

#### MCP / AI-Agent usage

This actor is registered with Apify MCP as `apify--crypto-price-tracker`. From any Claude Desktop / Cursor / GPT setup with Apify MCP enabled:

```
"Get me current prices and 24h changes for BTC, ETH, and SOL"
"What are the top 50 coins by market cap right now?"
"How far is each of these coins from its all-time high: BTC, ETH, SOL?"
"Look up DexScreener pairs for token address So11111111111111111111111111111111111111112"
"What's the PnL on Solana wallet FRWqMbQpfNvK… over the last 7 days?"
```

The agent picks the right mode, gets a flat JSON response, and reasons over price + PnL + DEX data without switching tools.

### Four modes explained

#### Watchlist mode (CEX)

Provide a list of tickers. The actor:

1. Loads CoinGecko's full coin list (cached 24h in KV store).
2. Resolves each symbol → CoinGecko ID using a curated preference map for top-50 coins.
3. Fetches `/coins/markets` in one call (up to 250 IDs per call).
4. Optionally enriches with Binance USDT-pair tickers (binance.com → binance.us auto-fallback).

#### Market mode (CEX)

Sweeps the top N coins by market cap:

1. Pages through `/coins/markets` (250 per page).
2. Computes `dominancePct` from `/global` for each coin.

#### DEX mode (NEW)

Each query in `dexQueries` is either an address (Solana base58 or EVM hex) or a symbol search:

1. Hex address → DexScreener `/tokens/v1/{chain}/{address}`.
2. Solana address → DexScreener `/tokens/v1/solana/{address}`.
3. Symbol → DexScreener `/latest/dex/search?q={query}`.
4. Top N pairs by liquidity returned per query.

#### Wallet mode (NEW)

Each wallet address is queried at GMGN's `/defi/quotation/v1/smartmoney/{chain}/walletNew/{address}?period={1d|7d|30d}`:

1. Apify Proxy fronts every request to bypass Cloudflare.
2. Browser-like headers + retry/backoff for stability.
3. Returns wallet PnL, winrate, tags, token count, and last activity.

### Reliability

- **Retry with backoff** — 4 retries with exponential backoff (1.5s → 24s) on 5xx errors.
- **Rate-limit aware** — 429 triggers `Retry-After`-aware backoff, 30s minimum.
- **Multi-source fallback** — CoinGecko fails → Binance fills USD prices; Binance.com 451 → Binance.US auto.
- **Cloudflare-aware** — GMGN requests use Apify Proxy + browser headers; detects HTML challenge pages and reports gracefully.
- **Coin-list cache** — the 17K-coin list is cached 24h in the actor's KV store; repeat runs skip the heavy enumeration.
- **Per-record graceful degradation** — a single failed wallet/pair doesn't tank the run; failures are logged to `summary_run.blockedAddresses` / `summary_run.queriesUnresolved`.
- **PPE limit aware** — gracefully exits when the user-set per-run PPE cap is reached, no half-charged runs.

### FAQ

**Q: How fresh is the data?**
CoinGecko refreshes every 1–5 min. Binance fallback is sub-second. DexScreener updates every block. GMGN refreshes on-chain data continuously. The `lastUpdated` field tells you exactly when each record's upstream data was refreshed.

**Q: Why am I getting fewer coins / pairs / wallets than I requested?**
Check `summary_run` in the run's KV store:

- CEX: `unresolvedSymbols` lists tickers not found on CoinGecko.
- DEX: `queriesUnresolved` lists queries with no DexScreener match.
- Wallet: `blocked` count and `blockedAddresses` list GMGN/Cloudflare blocks.

**Q: GMGN sometimes fails — why?**
GMGN is Cloudflare-protected. Apify's datacenter proxy bypasses it most of the time, but not always. If many wallets fail in one run, retry. The actor doesn't charge events for blocked addresses.

**Q: Can I get raw token transactions from a wallet?**
This actor returns wallet *summaries* (PnL, winrate, etc.). For per-trade history, see GMGN-dedicated actors. This one is designed for one MCP call → one summary view.

**Q: Is this real-time?**
On-demand polling, not WebSocket streaming. For continuous feeds, run on a schedule (1–5 min interval via Apify Schedules).

**Q: Can I mix modes in one run?**
No — each run picks one mode. Run separately for CEX + DEX + wallet, or chain them in your orchestration.

### Legal

This actor uses CoinGecko's free public API, Binance's free public ticker API, DexScreener's free public REST API, and GMGN's public quotation endpoints (via Apify Proxy). All four sources explicitly allow non-commercial polling at reasonable rates. This actor respects rate limits and adds smart backoff on 429 responses.

The data returned is the property of its respective source. Cryptocurrency prices and on-chain data change constantly — readings may be 1–5 minutes stale. **Not financial advice.** Trading cryptocurrencies and DEX tokens involves substantial risk; do your own research.

### Support

- 📧 Issues: open one on the actor's [Issues tab](https://apify.com/khadinakbar/crypto-price-tracker/issues)
- 🐦 X: [@khadinakbar](https://x.com/khadinakbar)
- 💬 Other actors: [browse my store](https://apify.com/khadinakbar)

### Related actors

- [Stock Price Tracker](https://apify.com/khadinakbar/stock-price-tracker) — Yahoo Finance real-time quotes for stocks, ETFs, indices, forex & futures.
- [Google Finance Scraper](https://apify.com/khadinakbar/google-finance-stock-news-scraper) — stock prices + news + market data when you need traditional-finance coverage next to crypto.
- [Yahoo Finance Scraper](https://apify.com/khadinakbar/yahoo-finance-scraper) — quotes, OHLC history, financials & options for deeper TradFi research.
- [SEC EDGAR Scraper](https://apify.com/khadinakbar/sec-edgar-all-in-one-scraper) — 10-K, 8-K & 13F filings for crypto-exposed public issuers (MSTR, COIN, etc.).
- [Google News Scraper](https://apify.com/khadinakbar/google-news-scraper) — pair with crypto news monitoring across major outlets.

# Actor input Schema

## `mode` (type: `string`):

Pick one: 'watchlist' (track specific coins by ticker), 'market' (top N by market cap), 'dex' (DexScreener token/pair lookup by address or symbol on any chain), or 'wallet' (GMGN on-chain wallet stats: total value, realized/unrealized PnL, winrate, holdings). Defaults to 'watchlist'.

## `symbols` (type: `array`):

Used by mode='watchlist'. List of coin tickers (case-insensitive). Common: BTC, ETH, SOL, USDC, USDT, XRP, BNB, ADA, DOGE, AVAX, LINK, MATIC. Up to 100 symbols. Ignored in non-watchlist modes. NOT a token contract address — for DEX tokens use mode='dex' with the address.

## `topN` (type: `integer`):

Used by mode='market'. How many coins to fetch from CoinGecko, ranked by market cap descending. Page size 250; 1000 takes 4 API calls. Default 100. Range 10-1000. Ignored in non-market modes.

## `vsCurrency` (type: `string`):

Used by mode='watchlist' or 'market'. Fiat or crypto to quote prices in. Lowercase ISO code. Defaults to 'usd'. NOT used for DEX/wallet modes (those quote in USD natively).

## `useBinanceFallback` (type: `boolean`):

Used by mode='watchlist' or 'market'. When true, enriches CoinGecko data with Binance public ticker (binance.com → binance.us auto-fallback). Adds resilience to CoinGecko rate limits and exposes fresher tick data. Default true. No extra event charged.

## `dexQueries` (type: `array`):

Used by mode='dex'. List of token contract addresses (e.g. So11111111111111111111111111111111111111112 for SOL on Solana, 0xdAC17F958D2ee523a2206206994597C13D831ec7 for USDT on Ethereum) OR symbol/name searches (e.g. 'PEPE', 'BONK'). Up to 50 queries. Addresses get exact lookups; symbols search across all chains.

## `dexChain` (type: `string`):

Used by mode='dex'. Chain to scope EVM-address lookups (sol uses native parsing). Auto-detected when query is a hex address (0x…); explicit when query is a symbol. Default 'solana'. Ignored when dexQueries are all addresses.

## `dexMaxPairsPerToken` (type: `integer`):

Used by mode='dex'. How many trading pairs to return per query, sorted by liquidity descending. Default 3 (the deepest pools). Range 1-20. Each pair counts as one onchain-record event.

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

Used by mode='wallet'. List of on-chain wallet addresses to fetch GMGN stats for. Examples: Solana base58 (FRWqMbQpfNvK…) or EVM hex (0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045). Up to 50 addresses. Each address counts as one onchain-record event.

## `walletChain` (type: `string`):

Used by mode='wallet'. Chain context for the GMGN wallet lookup. Default 'sol'. NOT auto-detected — set explicitly to match your addresses.

## `walletPeriod` (type: `string`):

Used by mode='wallet'. Time window for PnL and trading-stats aggregation. '7d' is the GMGN default and best balance. '30d' gives longer-term performance; '1d' gives most recent. Default '7d'.

## `responseFormat` (type: `string`):

'detailed' returns all fields per record (~300-400 tokens/item). 'concise' drops historical fields (ATH, ATL, 7d/30d changes, supply, transaction breakdowns) for compact LLM context (~150 tokens/item). Defaults to 'detailed'.

## Actor input object example

```json
{
  "mode": "watchlist",
  "symbols": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "DOGE"
  ],
  "topN": 100,
  "vsCurrency": "usd",
  "useBinanceFallback": true,
  "dexQueries": [
    "So11111111111111111111111111111111111111112",
    "PEPE"
  ],
  "dexChain": "solana",
  "dexMaxPairsPerToken": 3,
  "walletAddresses": [
    "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  ],
  "walletChain": "eth",
  "walletPeriod": "7d",
  "responseFormat": "detailed"
}
```

# Actor output Schema

## `items` (type: `string`):

Unified dataset of CEX coins, DEX pairs, and wallet stats records. Filter by recordType. Use 'CEX Watchlist', 'DEX Pairs', or 'Wallet Stats' view to focus.

# 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 = {
    "mode": "watchlist",
    "symbols": [
        "BTC",
        "ETH",
        "SOL",
        "XRP",
        "DOGE"
    ],
    "topN": 100,
    "vsCurrency": "usd",
    "useBinanceFallback": true,
    "dexQueries": [
        "So11111111111111111111111111111111111111112",
        "PEPE"
    ],
    "dexChain": "solana",
    "dexMaxPairsPerToken": 3,
    "walletAddresses": [
        "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
    ],
    "walletChain": "eth",
    "walletPeriod": "7d",
    "responseFormat": "detailed"
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/crypto-price-tracker").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 = {
    "mode": "watchlist",
    "symbols": [
        "BTC",
        "ETH",
        "SOL",
        "XRP",
        "DOGE",
    ],
    "topN": 100,
    "vsCurrency": "usd",
    "useBinanceFallback": True,
    "dexQueries": [
        "So11111111111111111111111111111111111111112",
        "PEPE",
    ],
    "dexChain": "solana",
    "dexMaxPairsPerToken": 3,
    "walletAddresses": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"],
    "walletChain": "eth",
    "walletPeriod": "7d",
    "responseFormat": "detailed",
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/crypto-price-tracker").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 '{
  "mode": "watchlist",
  "symbols": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "DOGE"
  ],
  "topN": 100,
  "vsCurrency": "usd",
  "useBinanceFallback": true,
  "dexQueries": [
    "So11111111111111111111111111111111111111112",
    "PEPE"
  ],
  "dexChain": "solana",
  "dexMaxPairsPerToken": 3,
  "walletAddresses": [
    "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  ],
  "walletChain": "eth",
  "walletPeriod": "7d",
  "responseFormat": "detailed"
}' |
apify call khadinakbar/crypto-price-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/crypto-price-tracker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Crypto Price Tracker — BTC, ETH & 17K+ Altcoins",
        "description": "Fetch real-time prices, market cap, 24h/7d/30d changes, ATH/ATL, supply, dominance, and computed analytics for a watchlist of coins (BTC, ETH, SOL...) or the top N by market cap. Multi-source: CoinGecko primary, Binance fallback. PPE: $0.003/coin.",
        "version": "2.0",
        "x-build-id": "cvTE8cMfpvYjQ8KaK"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~crypto-price-tracker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-crypto-price-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/khadinakbar~crypto-price-tracker/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-crypto-price-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/khadinakbar~crypto-price-tracker/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-crypto-price-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "watchlist",
                            "market",
                            "dex",
                            "wallet"
                        ],
                        "type": "string",
                        "description": "Pick one: 'watchlist' (track specific coins by ticker), 'market' (top N by market cap), 'dex' (DexScreener token/pair lookup by address or symbol on any chain), or 'wallet' (GMGN on-chain wallet stats: total value, realized/unrealized PnL, winrate, holdings). Defaults to 'watchlist'.",
                        "default": "watchlist"
                    },
                    "symbols": {
                        "title": "Watchlist Symbols (CEX modes)",
                        "minItems": 0,
                        "maxItems": 100,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Used by mode='watchlist'. List of coin tickers (case-insensitive). Common: BTC, ETH, SOL, USDC, USDT, XRP, BNB, ADA, DOGE, AVAX, LINK, MATIC. Up to 100 symbols. Ignored in non-watchlist modes. NOT a token contract address — for DEX tokens use mode='dex' with the address.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "topN": {
                        "title": "Top N Coins (Market mode)",
                        "minimum": 10,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Used by mode='market'. How many coins to fetch from CoinGecko, ranked by market cap descending. Page size 250; 1000 takes 4 API calls. Default 100. Range 10-1000. Ignored in non-market modes.",
                        "default": 100
                    },
                    "vsCurrency": {
                        "title": "Quote Currency (CEX modes)",
                        "enum": [
                            "usd",
                            "eur",
                            "gbp",
                            "jpy",
                            "cny",
                            "btc",
                            "eth"
                        ],
                        "type": "string",
                        "description": "Used by mode='watchlist' or 'market'. Fiat or crypto to quote prices in. Lowercase ISO code. Defaults to 'usd'. NOT used for DEX/wallet modes (those quote in USD natively).",
                        "default": "usd"
                    },
                    "useBinanceFallback": {
                        "title": "Use Binance Fallback (CEX modes)",
                        "type": "boolean",
                        "description": "Used by mode='watchlist' or 'market'. When true, enriches CoinGecko data with Binance public ticker (binance.com → binance.us auto-fallback). Adds resilience to CoinGecko rate limits and exposes fresher tick data. Default true. No extra event charged.",
                        "default": true
                    },
                    "dexQueries": {
                        "title": "DEX Queries (DEX mode)",
                        "minItems": 0,
                        "maxItems": 50,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Used by mode='dex'. List of token contract addresses (e.g. So11111111111111111111111111111111111111112 for SOL on Solana, 0xdAC17F958D2ee523a2206206994597C13D831ec7 for USDT on Ethereum) OR symbol/name searches (e.g. 'PEPE', 'BONK'). Up to 50 queries. Addresses get exact lookups; symbols search across all chains.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "dexChain": {
                        "title": "DEX Chain (DEX mode)",
                        "enum": [
                            "solana",
                            "ethereum",
                            "bsc",
                            "base",
                            "polygon",
                            "arbitrum",
                            "optimism",
                            "avalanche",
                            "tron"
                        ],
                        "type": "string",
                        "description": "Used by mode='dex'. Chain to scope EVM-address lookups (sol uses native parsing). Auto-detected when query is a hex address (0x…); explicit when query is a symbol. Default 'solana'. Ignored when dexQueries are all addresses.",
                        "default": "solana"
                    },
                    "dexMaxPairsPerToken": {
                        "title": "Max Pairs Per Token (DEX mode)",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Used by mode='dex'. How many trading pairs to return per query, sorted by liquidity descending. Default 3 (the deepest pools). Range 1-20. Each pair counts as one onchain-record event.",
                        "default": 3
                    },
                    "walletAddresses": {
                        "title": "Wallet Addresses (Wallet mode)",
                        "minItems": 0,
                        "maxItems": 50,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Used by mode='wallet'. List of on-chain wallet addresses to fetch GMGN stats for. Examples: Solana base58 (FRWqMbQpfNvK…) or EVM hex (0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045). Up to 50 addresses. Each address counts as one onchain-record event.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "walletChain": {
                        "title": "Wallet Chain (Wallet mode)",
                        "enum": [
                            "sol",
                            "eth",
                            "bsc",
                            "base",
                            "tron"
                        ],
                        "type": "string",
                        "description": "Used by mode='wallet'. Chain context for the GMGN wallet lookup. Default 'sol'. NOT auto-detected — set explicitly to match your addresses.",
                        "default": "eth"
                    },
                    "walletPeriod": {
                        "title": "Wallet Stats Period (Wallet mode)",
                        "enum": [
                            "1d",
                            "7d",
                            "30d"
                        ],
                        "type": "string",
                        "description": "Used by mode='wallet'. Time window for PnL and trading-stats aggregation. '7d' is the GMGN default and best balance. '30d' gives longer-term performance; '1d' gives most recent. Default '7d'.",
                        "default": "7d"
                    },
                    "responseFormat": {
                        "title": "Response Format",
                        "enum": [
                            "detailed",
                            "concise"
                        ],
                        "type": "string",
                        "description": "'detailed' returns all fields per record (~300-400 tokens/item). 'concise' drops historical fields (ATH, ATL, 7d/30d changes, supply, transaction breakdowns) for compact LLM context (~150 tokens/item). Defaults to 'detailed'.",
                        "default": "detailed"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
