# Getting Started with the Currency API

> Create an API key, make your first CurrencyCore request, and choose the conversion, rates, history, or analytics endpoint that fits your use case.

Canonical: https://currency-core.com/docs/getting-started/
Updated: 2026-11-10
Published: 2026-06-03

---
## Before you start

You need an account, an organization, and an API key. Every public endpoint is a `GET`, every response is JSON, and every failure uses the same error envelope. The examples below use the base URL `https://api.currency-core.com/v1`; substitute it directly rather than appending your own path prefix.

## 1. Create an account

Sign up at [app.currency-core.com](https://app.currency-core.com). No credit card is required for the Free plan.

## 2. Create an API key

Create an organization, then generate a key from the **API Keys** section. On the Free plan the key looks like `cc_test_xxxxxxxxxxxxxxxx`; on a paid plan you can create a live key that looks like `cc_live_xxxxxxxxxxxxxxxx`.

Send the key in the `Authorization` header:

```
Authorization: Bearer cc_live_your_key
```

Test keys work on every plan. Live keys require a paid plan, so a Free organization should use a test key while integrating. Test keys return the same reference data, count against the same monthly quota, and are capped at 60 requests per minute. See [Authentication](/docs/authentication/) for key types, headers, and rate limits.

## 3. Make your first request

<CodeTabs>
<Fragment slot="curl">

```bash
curl "https://api.currency-core.com/v1/convert?from=USD&to=EUR&amount=100" \
  -H "Authorization: Bearer YOUR_KEY"
```

</Fragment>
<Fragment slot="js">

```js
const res = await fetch(
  "https://api.currency-core.com/v1/convert?from=USD&to=EUR&amount=100",
  { headers: { Authorization: "Bearer YOUR_KEY" } },
);
const data = await res.json();
console.log(data.results[0].result);
```

</Fragment>
<Fragment slot="python">

```python

res = requests.get(
    "https://api.currency-core.com/v1/convert",
    params={"from": "USD", "to": "EUR", "amount": 100},
    headers={"Authorization": "Bearer YOUR_KEY"},
)
print(res.json()["results"][0]["result"])
```

</Fragment>
<Fragment slot="go">

```go
req, _ := http.NewRequest("GET",
	"https://api.currency-core.com/v1/convert?from=USD&to=EUR&amount=100", nil)
req.Header.Set("Authorization", "Bearer YOUR_KEY")

res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
```

</Fragment>
<Fragment slot="java">

```java
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.currency-core.com/v1/convert?from=USD&to=EUR&amount=100"))
    .header("Authorization", "Bearer YOUR_KEY")
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

</Fragment>
<Fragment slot="php">

```php
<?php
$ch = curl_init("https://api.currency-core.com/v1/convert?from=USD&to=EUR&amount=100");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_KEY"]);
echo curl_exec($ch);
curl_close($ch);
```

</Fragment>
</CodeTabs>

A successful response includes the date actually used and one result per target:

```json
{
  "from": "USD",
  "amount": 100,
  "date": "2026-11-10",
  "results": [
    { "to": "EUR", "result": 89.24, "rate": 0.8924 }
  ]
}
```

## Your first error

Every failure uses the same JSON envelope. Calling `/v1/convert` without a key returns `401 unauthorized`:

```json
{
  "error": {
    "code": "unauthorized",
    "message": "Missing API key. Send `Authorization: Bearer <key>`."
  }
}
```

Invalid input is normally a `400`, an unknown currency is `400 unknown_currency`, an unpaid invoice is `402 billing_past_due`, a plan restriction is `403 forbidden`, and too many requests is `429 rate_limited` with a `Retry-After` header. See [Errors](/docs/errors/) for the full list and retry guidance.

## All public endpoints

| Endpoint | What it returns | Plan |
|---|---|---|
| [`GET /v1/convert`](/docs/convert-endpoint/) | Convert an amount, with optional PPP adjustment | All plans |
| [`GET /v1/rates`](/docs/rates-endpoint/) | Full USD-base snapshot for a date | All plans |
| [`GET /v1/rates/:base`](/docs/rates-endpoint/) | The same snapshot rebased to another currency | All plans |
| [`GET /v1/history`](/docs/history-endpoint/) | Daily rate series for one currency | All plans; Free sees 30 days |
| [`GET /v1/history/analysis`](/docs/history-analysis-endpoint/) | Trends, comparisons, and movers | Growth and above |
| [`GET /v1/ppp`](/docs/ppp-endpoint/) | One country's PPP factor for a year | Any valid key |
| [`GET /v1/ppp/analysis`](/docs/ppp-analysis-endpoint/) | PPP trends, comparisons, and movers | Growth and above |
| [`GET /v1/volatility`](/docs/volatility-endpoint/) | Annualized volatility or a stability ranking | Growth and above |
| [`GET /v1/correlation`](/docs/correlation-endpoint/) | Return correlation against a base currency | Growth and above |
| [`GET /v1/drawdown`](/docs/drawdown-endpoint/) | Maximum drawdown with recovery dates | Growth and above |
| [`GET /v1/safe-haven`](/docs/safe-haven-endpoint/) | Composite safe-haven ranking | Growth and above |
| [`GET /v1/mean-reversion`](/docs/mean-reversion-endpoint/) | Mean-reversion score and half-life | Growth and above |
| [`GET /v1/countries`](/docs/countries/) | Country reference list | Public, no key |
| [`GET /v1/currencies`](/docs/currencies/) | Currency reference list | Public, no key |
| [`GET /v1/ai`](/docs/ai-endpoint/) | Natural-language currency answers | All plans; AI credits apply |

`/v1/history/analysis` is mounted under `/v1/history`, so its full path is `/v1/history/analysis`. `/v1/ppp/analysis` is mounted under `/v1/ppp`.

On the Free plan, history requests are limited to the last 30 days. Older dates return `403 forbidden`.

The full contract is published as an [OpenAPI 3.1 specification](/docs/openapi/). Use it to generate a typed client, import the API into your tooling, or inspect both authentication schemes. See the [OpenAPI docs](/docs/openapi/) for the raw document.

## Choose your path

- **Build a converter or price display:** start with [`/v1/convert`](/docs/convert-endpoint/), then add [`/v1/rates`](/docs/rates-endpoint/) if you need a whole snapshot. For a no-code calculator, use the [currency converter](/tools/currency-converter/).
- **Build charts and reports:** use [`/v1/history`](/docs/history-endpoint/) for the raw series and [`/v1/history/analysis`](/docs/history-analysis-endpoint/) for change, strength, and stats.
- **Build analytics:** the Growth endpoints cover volatility, correlation, drawdown, safe-haven, and mean-reversion. Each page explains how to read its score.
- **Use reference data:** [`/v1/countries`](/docs/countries/) and [`/v1/currencies`](/docs/currencies/) are public and unmetered.
- **Use an agent or spreadsheet:** see the [MCP server](/mcp-server/) and [spreadsheet setup](/docs/spreadsheets/).

## How requests work

Send the key in a header, pass parameters in the query string, and read the JSON body. There is no request body and no content type to set. Dates are UTC calendar dates in `YYYY-MM-DD` form. Amounts are numbers, and comma-separated lists are used where an endpoint accepts several currencies or countries. Responses are not wrapped in a generic `data` field: the top-level object is the result. A `2xx` status means the request was accepted, so still check the body for per-target errors such as a PPP `error` entry.

## Base URL and versioning

All endpoints live under a version prefix:

```
https://api.currency-core.com/v1
```

The version is pinned in the path, so a future `/v2` can introduce breaking changes while `/v1` keeps serving existing integrations.

## Related

- [Authentication](/docs/authentication/) for keys, headers, and rate limits
- [Errors](/docs/errors/) for error codes and retries
- [Pricing](/pricing/) for plan quotas and analytics access
- [Full API reference](/currency-api/) for the product overview
- [OpenAPI 3.1 contract](/docs/openapi/) for the machine-readable spec
- [SDKs](/docs/sdks/) for typed clients

Continue to [Authentication](/docs/authentication/) to learn about key management and rate limits.
