# How to List EMS-Supported Exchanges and Their Required Login Parameters

## How to List EMS-Supported Exchanges and Their Required Login Parameters

When you connect an exchange account to **CoinAPI EMS Managed Cloud**, each exchange expects a specific set of credentials (for example: API key, API secret, passphrase). The **Exchange Configuration** endpoint lets you retrieve, in one call, the list of EMS-supported exchanges along with:

* the **required login parameters** you must provide for each exchange, and
* the **location** used by that exchange inside the Managed Cloud environment.

You typically call this endpoint **before creating or validating an EMS account**, so you don’t guess which credential fields are needed.



## What you need before you start

* ✅ A CoinAPI EMS API Key
* ✅ An EMS Trading API subscription
* ✅ Any HTTP client:
  * Terminal (`curl`)
  * Postman / Insomnia
  * Browser (for simple GET requests)

## What “exchange configuration” is

In EMS Managed Cloud, **exchange configuration** is the metadata that describes how to log in to each supported exchange in this environment.

For each exchange entry, you’ll get:

* `exchange_id` Exchange identifier and optional tag identifying specific account configured when the software will be managing multiple accounts on the same exchange; for eg: `BITSTAMP` `BITSTAMP/7c177641-74bd-4dbe-9b01-2497c12a5f70`` `BITSTAMP/2574` Allowed separators between the exchange identifier and the tag: `~/.,:;!@#$%^&*-_+=.`
* `location_id` The Managed Cloud location identifier associated with that exchange.
* `required_parameters` An array listing the credential/config fields you must provide to log in for that exchange.

Why this matters:

* It prevents trial-and-error when creating exchange logins.
* It helps you build UI/forms or automation that prompts for the right fields per exchange.
* It ensures your EMS account setup is complete before you attempt to connect.

## Step-by-step: Get exchange configuration

### Step 1) Call the endpoint

**Endpoint**

* Method: `GET`
* Path: `/v1/exchanges`
* Base URL (Managed Cloud REST API): `https://ems-mgmt.coinapi.io`

**Authentication**

You can pass your API key either via:

* Header: `X-CoinAPI-Key: <YOUR_API_KEY>` (recommended), or
* Query param: `apikey=<YOUR_API_KEY>`

### Step 2) Example request (cURL)

**Using header authentication**

```typescript
curl -sS"https://ems-mgmt.coinapi.io/v1/exchanges" \
  -H"X-CoinAPI-Key: YOUR_API_KEY"
```

**Using query parameter authentication**

```typescript
curl -sS"https://ems-mgmt.coinapi.io/v1/exchanges?apikey=YOUR_API_KEY"
```

### Step 3) Understand the response

The response is a JSON array of exchange configuration objects. The documented schema looks like:

```mysql
[
	{
		"exchange_id":"string",
		"location_id":"string",
		"required_parameters":["string"]
	}
]
```

How to use each field:

* **Pick an exchange** you want to connect (match by `exchange_id`).
* Read `required_parameters` and ensure you have **all** of them ready.
* Record the `location_id` to understand the Managed Cloud placement for that exchange.

### Step 4) Practical workflow example

Let’s say you want to add an account for `EXAMPLE_EXCHANGE`.

1. Call `GET /v1/exchanges`
2. Find the object where `exchange_id` matches your target exchange
3. Use its `required_parameters` list as your checklist:
  * If it includes `apiKey` and `apiSecret`, you must provide both (and any others listed)
4. Proceed to your “add or update account” step (in the accounts endpoint) only after your credential set is complete.

This is the intended purpose of the endpoint: it tells you what’s mandatory per exchange, so your EMS account configuration won’t fail due to missing fields.

## Troubleshooting

* **401 / 403 Unauthorized**
  * Confirm you’re calling the EMS Managed Cloud base URL (`https://ems-mgmt.coinapi.io`) and sending the API key via `X-CoinAPI-Key` header (or `apikey=` query parameter).
  * Confirm that you have an active EMS Subscription.
* **Empty or unexpected results**
  * Double-check you’re using the Managed Cloud REST API endpoint (not a different CoinAPI product’s base URL).

## 🎉 Next steps

You’ve now pulled the **EMS Managed Cloud exchange configuration** list, which tells you; what credential fields are required (`required_parameters`) and which Managed Cloud location applies (`location_id`).

Use the `required_parameters` checklist for your chosen exchange, then proceed to the EMS account configuration endpoint to add the account with the correct fields on the first try.