> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mycryptoserver.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing

> How My Crypto Server turns a checkout's dollar amount into the right amount of crypto — and how to connect CoinGecko, CoinMarketCap, or Alchemy as your price source.

When a customer checks out, your order is priced in regular money — say \**$50.00**. But they pay in crypto. Something has to answer the question *"how much ETH (or BTC, or SOL) is $50 right now?"*

That something is a **pricing source**: an outside service that publishes up-to-the-minute crypto prices. My Crypto Server asks it for the current price, does the conversion, and shows the customer the exact amount to send. You connect a pricing source the same way you connect anything else — under **Dashboard → Integrations**.

This page explains, in plain terms, what pricing does, which sources you can use, and exactly where to get the keys for each.

<Note>
  **Do you even need this?** If you only ever accept **stablecoins** (USDC, USDT, DAI — coins designed to always equal one US dollar), you can skip pricing entirely. Those are converted 1-to-1 automatically. You only need a pricing source if you accept coins whose price moves — ETH, BTC, POL, SOL, BNB, and so on.
</Note>

<Warning>
  If you accept any non-stablecoin, you **must enable at least one pricing source** below. With none enabled, checkouts for those coins can't calculate an amount and will fail. (Stablecoin checkouts keep working regardless.)
</Warning>

## How it works in plain English

You can turn on **one** pricing source or **several**. Here's what happens at checkout:

1. My Crypto Server asks your **highest-priority** source for the price.
2. If that source is down or doesn't know the coin, it automatically tries the **next** source.
3. If every source is unreachable, it uses the **last price it successfully saw** (cached), so a brief outage at the price provider never blocks a sale.

Prices are briefly remembered (about 30 seconds) so a burst of checkouts doesn't hammer the provider. You don't have to manage any of this — just enable the sources you want and, optionally, set their order.

<Note>
  Turning on more than one source is a **reliability upgrade**, not a cost — it's a backup. If your main source has a hiccup, the next one quietly covers for it.
</Note>

## Your options at a glance

| Source            | Needs an API key?                | Cost                     | Best for                                      |
| ----------------- | -------------------------------- | ------------------------ | --------------------------------------------- |
| **CoinGecko**     | Optional                         | Free (key raises limits) | The simplest start — works even without a key |
| **CoinMarketCap** | Required                         | Free tier available      | A well-known alternative or backup            |
| **Alchemy**       | Reuses your existing Alchemy key | Free tier available      | If you already use Alchemy, one fewer account |

You can mix and match. A common, robust setup is **CoinGecko as the main source with CoinMarketCap as the backup**.

## Enabling a pricing source

The steps are the same for all three:

<Steps>
  <Step title="Open the tile">
    Go to **Dashboard → Integrations** and click the source you want (CoinGecko, CoinMarketCap, or Alchemy).
  </Step>

  <Step title="Paste your API key (if needed)">
    Enter the API key in the **API Key** field. The key is write-only and stored encrypted — once saved, it's never shown back to you. (CoinGecko works without a key; CoinMarketCap requires one.)
  </Step>

  <Step title="Set the priority (optional)">
    If you'll run more than one source, set **Pricing priority** — `1` is tried first, then `2`, then `3`. Leave it blank to use the default order.
  </Step>

  <Step title="Toggle on and Save">
    Switch the integration **On** and click **Save**. Changes take effect within about a minute.
  </Step>
</Steps>

***

## CoinGecko

The easiest place to start. CoinGecko publishes free crypto prices and **works without any API key** — so you can enable it and be done. Adding a free "Demo" key simply raises how many requests you're allowed to make, which is worth doing for a live store.

**Where to get a key (optional but recommended):**

<Steps>
  <Step title="Create a free CoinGecko account">
    Go to the CoinGecko **Developer Dashboard** and sign up: [coingecko.com/en/developers/dashboard](https://www.coingecko.com/en/developers/dashboard). The free plan is called **Demo**. (You can compare plans at [coingecko.com/en/api/pricing](https://www.coingecko.com/en/api/pricing).)
  </Step>

  <Step title="Create a Demo API key">
    In the dashboard, click **Add New Key** (or **Create Demo Account Key**). Copy the key — it looks like `CG-xxxxxxxxxxxxxxxxxxxx`.
  </Step>

  <Step title="Paste it into My Crypto Server">
    Dashboard → Integrations → **CoinGecko** → **API Key**, then enable and save.
  </Step>
</Steps>

| Field                | Required? | Description                                                                                               |
| -------------------- | --------- | --------------------------------------------------------------------------------------------------------- |
| **API Key**          | Optional  | A CoinGecko Demo key (`CG-…`) that raises your request limits. Leave blank to use the free, keyless tier. |
| **Pricing priority** | Optional  | Order vs other sources — `1` is tried first.                                                              |

<Note>
  Because the key is optional, an enabled CoinGecko tile with no key may show **"Not configured"** — that's expected and it still works. The badge just reflects whether a key is present.
</Note>

## CoinMarketCap

Another widely trusted price source. Unlike CoinGecko, CoinMarketCap **requires an API key** — there's no keyless option — but it offers a free tier that's plenty for pricing a checkout.

**Where to get a key:**

<Steps>
  <Step title="Sign up for a free CoinMarketCap API account">
    Go to [pro.coinmarketcap.com/signup](https://pro.coinmarketcap.com/signup) and create an account. The free tier is called **Basic**.
  </Step>

  <Step title="Copy your API key">
    After signing up you land on your account page at [pro.coinmarketcap.com/account](https://pro.coinmarketcap.com/account). Your **API Key** is shown there — copy it.
  </Step>

  <Step title="Paste it into My Crypto Server">
    Dashboard → Integrations → **CoinMarketCap** → **API Key**, then enable and save.
  </Step>
</Steps>

| Field                | Required?    | Description                                                      |
| -------------------- | ------------ | ---------------------------------------------------------------- |
| **API Key**          | **Required** | Your CoinMarketCap **Pro** API key, from your account dashboard. |
| **Pricing priority** | Optional     | Order vs other sources — `1` is tried first.                     |

<Note>
  If you enable CoinMarketCap **without** a key, it's simply skipped — it won't break checkout, and My Crypto Server falls through to your other sources.
</Note>

## Alchemy

If you already use **Alchemy** for blockchain access and payment detection (see [Platform Integrations](/integrations/platform-integrations) and [Alchemy Setup](/self-hosting/alchemy)), it can double as a price source using the **same API key** — no new account needed.

Because Alchemy is mainly a blockchain-data tool, pricing is **off by default**. You opt in with one switch:

<Steps>
  <Step title="Make sure Alchemy is already set up">
    You'll need the Alchemy integration enabled with its **API Key** filled in. If you haven't done that yet, follow [Alchemy Setup](/self-hosting/alchemy) first. (Get the key at [dashboard.alchemy.com](https://dashboard.alchemy.com/) → your app → **API Key**.)
  </Step>

  <Step title="Turn on 'Use for pricing'">
    Dashboard → Integrations → **Alchemy** → set **Use for pricing** to **Enabled**, then save.
  </Step>
</Steps>

| Field                | Required?     | Description                                                                                                        |
| -------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Use for pricing**  | —             | Set to **Enabled** to let Alchemy serve crypto prices. Leave **Disabled** to use Alchemy only for blockchain data. |
| **Pricing priority** | Optional      | Order vs other sources — `1` is tried first.                                                                       |
| **API Key**          | (already set) | The same Alchemy API key you use for blockchain access.                                                            |

## Choosing which source goes first

This only matters when you have **more than one** source enabled.

Each pricing source has a **Pricing priority** dropdown. The lower number wins — `1` is asked first, `2` is the backup, `3` after that. If you leave them all blank, the default order is **CoinGecko → CoinMarketCap → Alchemy**.

**Example — CoinGecko first, CoinMarketCap as backup:**

| Source        | Pricing priority |
| ------------- | ---------------- |
| CoinGecko     | `1`              |
| CoinMarketCap | `2`              |

Now every checkout asks CoinGecko first; only if CoinGecko fails does it quietly ask CoinMarketCap. To flip them, swap the numbers.

<Note>
  A source must be **enabled** (and, for CoinMarketCap, have a key) to be used at all — priority only orders the sources that are actually available. If only one source is on, it's always the one used, whatever its priority.
</Note>

## Troubleshooting

| Problem                                  | Fix                                                                                                                                                 |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Checkout fails with "no price available" | No pricing source is enabled for that coin. Turn on CoinGecko (easiest) under Integrations, or enable any source above. Stablecoins are unaffected. |
| CoinMarketCap seems ignored              | Confirm an **API Key** is saved and the tile is **On** — without a key it's skipped.                                                                |
| Alchemy isn't pricing                    | Set **Use for pricing → Enabled** on the Alchemy tile and confirm its API Key is present.                                                           |
| CoinGecko tile says "Not configured"     | Expected when no key is set. It still works on the free tier; add a Demo key to raise limits.                                                       |
| Prices look slightly stale               | Prices are cached for \~30 seconds and, during a provider outage, the last known price is reused. Both are normal and self-correct.                 |

<Note>
  **Stablecoins are never affected by any of this.** USDC, USDT, and DAI are always treated as exactly \$1, so stablecoin checkouts keep working even if every pricing source is offline.
</Note>
