How to Get, Add, and Delete Accounts (EMS Managed Cloud REST API)

This tutorial shows how to manage exchange accounts (order destinations) in the CoinAPI EMS Managed Cloud REST API: list accounts, add/update an account, delete a single account, or delete all accounts.

For the EMS Managed Cloud REST, you can authenticate using the X-CoinAPI-Key header.

Example header:

1-H"X-CoinAPI-Key: YOUR_API_KEY"


Endpoint

  • GET /v1/accounts

Optional query parameter

  • filter_exchange_id — returns a single specific account instead of the full list.
1curl-sS-X GET"<https://ems-mgmt.coinapi.io/v1/accounts>" \\
2-H"X-CoinAPI-Key: YOUR_API_KEY"

1curl-sS-X GET"<https://ems-mgmt.coinapi.io/v1/accounts?filter_exchange_id=BINANCE>" \\
2-H"X-CoinAPI-Key: YOUR_API_KEY"

Response (shape)

Returns an array of objects like:

  • exchange_id (can include an optional tag for multiple accounts on the same exchange)
  • parameters (key/value pairs with exchange-specific configuration)

Endpoint

  • POST /v1/accounts

Body fields

  • exchange_id — exchange identifier, optionally with a tag (for multiple accounts on the same exchange).
  • parameters — array of { key, value } entries required to log in to that exchange.
Tip: The tag format is supported via separators (docs list several allowed separators) so you can do things like BITSTAMP/<tag> when managing multiple accounts for the same venue.
1curl-sS-X POST"<https://ems-mgmt.coinapi.io/v1/accounts>" \\
2-H"X-CoinAPI-Key: YOUR_API_KEY" \\
3-H"Content-Type: application/json" \\
4-d'{
5    "exchange_id": "BINANCE",
6    "parameters": [
7      { "key": "PublicApiKey", "value": "YOUR_PUBLIC_KEY_VALUE" }
8    ]
9  }'

Common responses

  • 400 / 405 for invalid exchange id or validation errors.

Endpoint

  • DELETE /v1/accounts

Required query parameter

  • exchange_id — exchange identifier of the account to delete.
1curl-sS-X DELETE"<https://ems-mgmt.coinapi.io/v1/accounts?exchange_id=BITSTAMP>" \\
2-H"X-CoinAPI-Key: YOUR_API_KEY"

Common responses

  • 404 if the exchange account is not found.

Endpoint

  • DELETE /v1/accounts/all
1curl-sS-X DELETE"<https://ems-mgmt.coinapi.io/v1/accounts/all>" \\
2-H"X-CoinAPI-Key: YOUR_API_KEY"


Response

  • 200 OK
  • Auth fails: confirm you’re sending X-CoinAPI-Key and that you’re calling the Managed Cloud REST base URL (https://ems-mgmt.coinapi.io).
  • Delete returns 404: verify the exchange_id matches exactly what you see from GET /v1/accounts (including any tag, if you used one).

You’ve successfully learned how to:

  • âś… Retrieve your configured EMS accounts
  • âž• Add or update an exchange account
  • ❌ Delete a specific account
  • đź§ą Remove all accounts when needed

You now have full control over managing exchange connections within the EMS Managed Cloud REST API.

From here, you can proceed to:

  • Connecting accounts to trading workflows
  • Managing orders and positions
  • Automating account setup as part of your deployment pipeline

Happy building with CoinAPI EMS! 🚀