# Coinbase Rates Scraper: Crypto & Fiat Exchange Rates (`arman-bd/coinbase-exchange-rates-scraper`) Actor

Scrape Coinbase exchange rates: any base currency against every supported fiat and crypto, plus spot, buy and sell prices. Simple, fast and completely unauthenticated.

- **URL**: https://apify.com/arman-bd/coinbase-exchange-rates-scraper.md
- **Developed by:** [Arman Hossain](https://apify.com/arman-bd) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.37 / 1,000 rate scrapeds

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/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

## Coinbase Rates Scraper: Crypto & Fiat Exchange Rates

![Coinbase Rates Scraper: Any base currency against every currency Coinbase supports, crypto and fiat, plus the spot, buy and sell quote for the pairs you name](https://api.apify.com/v2/key-value-stores/ZQOcNAOHrIgTacAmy/records/coinbase-exchange-rates-scraper.jpg)

**Coinbase Rates Scraper** reads Coinbase's public exchange-rate feed: pick any base currency, crypto or fiat, and get its rate against **every currency Coinbase supports**, about 640 of them per call. Optionally add the spot, buy and sell quote for the specific pairs you care about.

One request per base currency. No credentials to manage.

**Agent skill: [SKILL.md](https://api.apify.com/v2/key-value-stores/t7YoTxpZEJOWvw4Ug/records/coinbase-exchange-rates-scraper.md)**

```
https://api.apify.com/v2/key-value-stores/t7YoTxpZEJOWvw4Ug/records/coinbase-exchange-rates-scraper.md
```

### What you get

- **Every currency Coinbase supports, from one call** — around 640 quotes per base currency, crypto and fiat side by side, as one flat row per base/quote pair.
- **Spot, buy and sell quotes** for the specific pairs you name, which is what shows you the spread rather than only the mid-rate.
- **Rates as numbers**, not the strings the feed sends, with an ISO 8601 timestamp on every row so a series can be built by appending runs.
- **`null` that means something**: a missing `spotPrice` says the pair is not tradable or price lookups were switched off, never that a column was dropped.
- **A `RUN_SUMMARY`** naming the base currencies requested, the rows saved for each, and any base the feed rejected.
- **No credentials to manage.**

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `baseCurrencies` | array | `["BTC"]` | Currency codes to price *from*, crypto (`BTC`, `ETH`, `SOL`) or fiat (`USD`, `EUR`, `GBP`). One request each. Case and separators are normalised. |
| `quoteCurrencies` | array | `[]` | Keep only these quote currencies. Empty saves every quote Coinbase returns, about 636 rows per base. |
| `includeSpotPrices` | boolean | `true` | Also call `/v2/prices` for each pair to add spot, buy and sell. |

**Which combinations make sense**

- `includeSpotPrices` costs **three extra requests per pair**, so it is only applied when `quoteCurrencies` is non-empty and the run stays within 60 pairs (bases × quotes). Outside that the Actor logs a warning, skips the price lookups and still saves every rate. `RUN_SUMMARY.spotPricesIncluded` tells you which happened.
- Leaving `quoteCurrencies` empty is the right move for a full snapshot; naming three or four quotes is the right move for a dashboard.
- A base currency that is not on Coinbase's list answers HTTP 400 and is recorded as a failure; a *quote* currency Coinbase does not publish is simply skipped and listed in `RUN_SUMMARY.unsupportedQuotes`.

```json
{
 "baseCurrencies": ["BTC", "ETH", "EUR"],
 "quoteCurrencies": ["USD", "EUR", "GBP"],
 "includeSpotPrices": true
}
```

### Output

One dataset item per **base/quote pair**. Rates are numbers, not the strings Coinbase sends.

```json
{
 "baseCurrency": "BTC",
 "quoteCurrency": "USD",
 "rate": 64515.83,
 "spotPrice": 64506.665,
 "buyPrice": 64508.545,
 "sellPrice": 64508.545,
 "timestamp": "2026-08-06T11:30:07.310Z",
 "scrapedAt": "2026-08-06T11:30:07.862Z"
}
```

| Field | Meaning |
|---|---|
| `baseCurrency` | The currency being priced, as Coinbase echoes it back |
| `quoteCurrency` | The currency it is priced in |
| `rate` | How many units of `quoteCurrency` one unit of `baseCurrency` buys |
| `spotPrice` | Coinbase spot price for the pair, `null` when price lookups are skipped or the pair is not tradable |
| `buyPrice`, `sellPrice` | Coinbase buy and sell quotes for the pair, including its spread |
| `timestamp` | When the rate snapshot for this base currency was fetched |
| `scrapedAt` | When this row was written |

A `RUN_SUMMARY` record in the key-value store holds the run's counts, which base currencies failed and which requested quotes Coinbase does not publish:

```json
{
 "basesRequested": 4,
 "basesSaved": 3,
 "basesFailed": 1,
 "failures": [
 { "baseCurrency": "NOTREAL", "error": "rejected: base currency not recognized" }
 ],
 "ratesSaved": 9,
 "spotPricesIncluded": true,
 "unsupportedQuotes": [
 { "baseCurrency": "BTC", "quoteCurrency": "ZZZ" }
 ],
 "filters": {
 "baseCurrencies": ["BTC", "ETH", "EUR", "NOTREAL"],
 "quoteCurrencies": ["USD", "EUR", "GBP", "ZZZ"],
 "includeSpotPrices": true
 },
 "finishedAt": "2026-08-06T11:30:10.318Z"
}
```

### Use cases

**Multi-currency pricing in a product.** One base, every quote, refresh hourly and you have a complete conversion table for your checkout.

```json
{
 "baseCurrencies": ["USD"],
 "quoteCurrencies": [],
 "includeSpotPrices": false
}
```

**Treasury FX conversion.** Pin the handful of currencies your books actually use and keep the buy/sell spread alongside the mid rate.

```json
{
 "baseCurrencies": ["USD", "EUR", "GBP"],
 "quoteCurrencies": ["USD", "EUR", "GBP", "JPY", "CHF"],
 "includeSpotPrices": true
}
```

**Simple crypto price display.** A few coins against a few fiats, with the tradable spot price rather than just the reference rate.

```json
{
 "baseCurrencies": ["BTC", "ETH", "SOL"],
 "quoteCurrencies": ["USD", "EUR"],
 "includeSpotPrices": true
}
```

### Limits and behaviour

- **One call, hundreds of pairs.** A single `exchange-rates` request returns ~636 quotes. Billing is per base currency for exactly that reason.
- **Spot prices are budgeted.** They need three requests per pair, so they are only fetched for an explicit, ≤60-pair quote list. Above that the Actor warns and skips them rather than firing two thousand requests.
- **A failing base never aborts the run.** An unrecognised base returns HTTP 400, is recorded in `RUN_SUMMARY.failures`, and the run moves on. The Actor only throws if *every* base currency fails.
- **Unsupported pairs degrade. They do not fail.** A `/v2/prices` 404 leaves `spotPrice`, `buyPrice` and `sellPrice` as `null`; the rate row is still saved.
- **Transient errors are retried.** 429 and 5xx get three attempts with linear backoff. HTTP 400 and 404 fail fast, because retrying a wrong currency code never helps.
- **Requests are paced** at ~100 ms between priced pairs.
- **Public data only.** No authentication, no personal data, no access-control bypass.

### FAQ

**Do I need a proxy?** No. Proxy configuration is not required to run this Actor.

**Do I need a Coinbase account or API key?** No. You supply no credentials.

**What happens if a source is unavailable?** It is reported in `RUN_SUMMARY.failures` and the run continues with the remaining base currencies.

**Can I schedule it?** Yes, that is the intended use. One request per base currency makes minute-level polling cheap.

**What is the difference between `rate` and `spotPrice`?** `rate` comes from Coinbase's reference exchange-rate table. `spotPrice` is the price on Coinbase's trading books for that specific pair. They track closely but are not identical, and only `spotPrice` has a matching `buyPrice`/`sellPrice` spread.

**Why are my spot prices null?** Either `includeSpotPrices` was off, the run exceeded the 60-pair budget (check `RUN_SUMMARY.spotPricesIncluded`), or Coinbase does not trade that pair.

**Does it cover fiat-to-fiat?** Yes. `EUR` → `USD` works exactly like `BTC` → `USD`, and Coinbase publishes rates for around 160 fiat currencies alongside the crypto ones.

**Can I integrate it with something else?** Yes, Apify API, client libraries, webhooks, scheduled runs, dataset exports (JSON/CSV/Excel) or MCP. Output is structured JSON.

# Actor input Schema

## `baseCurrencies` (type: `array`):

Currency codes to price from. crypto (BTC, ETH, SOL) or fiat (USD, EUR, GBP). One request each. Leave empty to default to BTC.

## `quoteCurrencies` (type: `array`):

Keep only these quote currencies. Leave empty to save every quote Coinbase returns. about 640 rows per base currency.

## `includeSpotPrices` (type: `boolean`):

Also call /v2/prices for each pair to add the spot, buy and sell quote. Requires a non-empty quote list and is skipped above 60 pairs per run, because it costs three extra requests per pair.

## Actor input object example

```json
{
  "baseCurrencies": [
    "BTC",
    "ETH",
    "USD"
  ],
  "quoteCurrencies": [
    "USD",
    "EUR",
    "GBP",
    "JPY"
  ],
  "includeSpotPrices": true
}
```

# Actor output Schema

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

Every record the run produced.

## `runsummary` (type: `string`):

The RUN\_SUMMARY record from the run's key-value store.

# 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 = {
    "baseCurrencies": [
        "BTC",
        "ETH"
    ],
    "quoteCurrencies": [
        "USD",
        "EUR",
        "GBP"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arman-bd/coinbase-exchange-rates-scraper").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 = {
    "baseCurrencies": [
        "BTC",
        "ETH",
    ],
    "quoteCurrencies": [
        "USD",
        "EUR",
        "GBP",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("arman-bd/coinbase-exchange-rates-scraper").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 '{
  "baseCurrencies": [
    "BTC",
    "ETH"
  ],
  "quoteCurrencies": [
    "USD",
    "EUR",
    "GBP"
  ]
}' |
apify call arman-bd/coinbase-exchange-rates-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,arman-bd/coinbase-exchange-rates-scraper"
        }
    }
}

```

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/GWwemXzG6aYZZy7NS/builds/g8HDOvLxlyYzMwqTy/openapi.json
