# Crypto Prices API - 4 Exchanges Cross-Checked, No Key, MCP (`martin10291/crypto-prices-api`) Actor

One call, a trustworthy live price for up to 50 coins. Every price is checked against Coinbase, Kraken, Binance and CoinGecko; you get the median, the spread between exchanges, outlier flags and a confidence level, so one stale or wrong source cannot fool you. Also 24h change, 24h volume and market

- **URL**: https://apify.com/martin10291/crypto-prices-api.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Developer tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Crypto Prices API - 4 Exchanges Cross-Checked, No Key, MCP

**One free price source can be stale or wrong. Which one do you trust?** This API asks Coinbase, Kraken, Binance and CoinGecko in one call and returns a single trustworthy price per coin, with the spread between exchanges and a confidence level. No API key, no login: public exchange data.

Up to 50 coins per call, USD or EUR, default input answers in a few seconds.

### Use it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/martin10291~crypto-prices-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"coins": ["BTC", "ETH", "SOL", "pepe"], "currency": "USD"}'
```

### Use it from an AI agent (MCP)

AI agents (Claude, ChatGPT, Cursor, n8n) call it as a tool through the Apify MCP server: `https://mcp.apify.com/?actors=martin10291/crypto-prices-api`. Ask the agent: "What is the price of BTC and ETH, and do the exchanges agree?"

### Output fields (one row per coin)

| Field | Meaning |
|---|---|
| `symbol`, `name`, `coingecko_id` | The coin. Input can be a ticker (BTC) or a CoinGecko id (bitcoin) |
| `currency` | USD or EUR |
| `price` | Median of all available sources |
| `sources_used` | How many of the 4 sources answered (0-4) |
| `sources` | Per source: `coinbase`, `kraken`, `binance` (price, bid, ask, ok), `coingecko` (price, ok) |
| `spread_percent` | (highest - lowest) / median x 100 |
| `outliers` | Sources that differ from the median by more than `outlierPercent` |
| `change_24h_percent` | 24h price change |
| `volume_24h_usd`, `market_cap_usd` | 24h volume and market cap (USD) |
| `confidence` | `high` = 3+ sources within the spread limit, `medium` = 2 sources (or 3+ that disagree), `low` = 1 source |
| `fx_source` | EUR only: which rate converted USD to EUR (Kraken EURUSD, CoinGecko as fallback) |
| `checked_at` | UTC time of the check |
| `error` | Set when no source knows the coin (the run does not fail) |

### Price move alerts (only new)

Schedule the Actor every 5-15 minutes with `onlyNew`. The first run stores a baseline and returns all rows with `baseline: true`. Later runs return a row only when a coin's median price moved at least `moveAlertPercent` since the last stored price for this `monitorId`, with `previous_price` and `move_percent`.

```json
{"coins": ["BTC", "ETH", "SOL"], "onlyNew": true, "moveAlertPercent": 2, "monitorId": "my-watchlist"}
```

### Example row

```json
{
  "symbol": "BTC", "name": "Bitcoin", "coingecko_id": "bitcoin", "currency": "USD",
  "price": 73939.275, "sources_used": 4, "spread_percent": 0.1332, "outliers": [],
  "sources": {"coinbase": {"ok": true, "price": 73925.55, "bid": 73925.55, "ask": 73925.56},
              "kraken": {"ok": true, "price": 73913.5, "bid": 73913.5, "ask": 73913.6},
              "binance": {"ok": true, "price": 74012.01, "bid": 74012.0, "ask": 74012.01},
              "coingecko": {"ok": true, "price": 73953.0}},
  "change_24h_percent": -1.1288, "volume_24h_usd": 33365204697.95, "market_cap_usd": 1530323767300,
  "confidence": "high", "checked_at": "2026-11-11T08:04:50Z"
}
```

### Limits

- Prices come from public exchange tickers (Coinbase Exchange, Kraken, Binance USDT pairs treated as USD, CoinGecko). Not financial advice, not tick-level trading data.
- Binance blocks some countries and cloud regions; if it is unreachable it is marked `ok: false` and the other sources are used.
- Coins not listed on an exchange show `ok: false` for that source. Unknown coins return a row with `error`.
- Pricing: $1.00 per 1,000 rows. No row is charged when the run fails.

### FAQ

**How fresh is the data?** Every run asks all 4 sources live; `checked_at` is the UTC time of the call. Nothing is cached between runs.

**What if an exchange is down or blocks the request?** That source is marked `ok: false` and the price is the median of the others. `sources_used` and `confidence` tell you how many agreed. A coin no source knows returns a row with an `error` field instead of failing the run.

**Limits?** Up to 50 coins per run. Coinbase, Kraken and Binance quote USD/USDT pairs; coins listed only on CoinGecko still get a price with `confidence: low`.

**Which coin names work?** Ticker symbols (BTC, ETH, PEPE) or CoinGecko ids (bitcoin, ethereum). Unknown symbols are looked up on CoinGecko by exact match.

# Actor input Schema

## `coins` (type: `array`):

Coin ticker symbols (BTC, ETH, SOL) or CoinGecko ids (bitcoin, pepe). Up to 50. Empty = the 5 example coins.

## `currency` (type: `string`):

Quote currency of the returned prices. EUR is converted from USD with the Kraken EUR/USD rate (CoinGecko as fallback); the output field fx_source says which was used.

## `outlierPercent` (type: `number`):

A source whose price differs from the median of all sources by more than this percent is listed in the outliers field. Confidence is high only when 3+ sources agree within this spread.

## `onlyNew` (type: `boolean`):

Return a row only when a coin's median price moved at least the move alert percent since the last run with the same Monitor ID. The first run stores the baseline and returns all rows with baseline=true. Schedule it every 5-15 minutes for price alerts.

## `moveAlertPercent` (type: `number`):

Only price moves mode: minimum price change in percent since the last stored price to return a row.

## `monitorId` (type: `string`):

Name of the saved state for Only price moves mode. Use a different ID for each separate watchlist or alert.

## Actor input object example

```json
{
  "coins": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "DOGE"
  ],
  "currency": "USD",
  "outlierPercent": 1,
  "onlyNew": false,
  "moveAlertPercent": 2,
  "monitorId": "default"
}
```

# Actor output Schema

## `results` (type: `string`):

One row per coin: median price across Coinbase, Kraken, Binance and CoinGecko, per-source prices, spread, outliers, 24h change, volume, market cap and confidence.

# 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 = {
    "coins": [
        "BTC",
        "ETH",
        "SOL",
        "XRP",
        "DOGE"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/crypto-prices-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 = { "coins": [
        "BTC",
        "ETH",
        "SOL",
        "XRP",
        "DOGE",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("martin10291/crypto-prices-api").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "coins": [
    "BTC",
    "ETH",
    "SOL",
    "XRP",
    "DOGE"
  ]
}' |
apify call martin10291/crypto-prices-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,martin10291/crypto-prices-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ncVd4Z8Mk3m6vKCGt/builds/H0efmXMZtPgEVCee4/openapi.json
