# Standards and Conventions

This page covers the request and response conventions used across all CoinMarketCap Pro API endpoints: the standard response envelope, how to identify cryptocurrencies and exchanges, how request bundling works, and the date/time and versioning rules.

Each HTTP request must contain the header `Accept: application/json`. You should also send an `Accept-Encoding: deflate, gzip` header to receive data fast and efficiently.

## Response payload format

All endpoints return data in JSON format with the results of your query under `data` if the call is successful.

A `status` object is always included for both successful calls and failures when possible. It always includes the current time on the server when the call was executed as `timestamp`, the number of API call credits this call utilized as `credit_count`, and the number of milliseconds it took to process the request as `elapsed`. Any details about errors encountered can be found under the `error_code` and `error_message`. See [Rate limits, errors, and troubleshooting](/guides/errors-and-rate-limits) for details on errors.

```json
{
  "data": {
    ...
  },
  "status": {
    "timestamp": "2018-06-06T07:52:27.273Z",
    "error_code": 400,
    "error_message": "Invalid value for \"id\"",
    "elapsed": 0,
    "credit_count": 0
  }
}
```

## Cryptocurrency, exchange, and fiat currency identifiers

Cryptocurrencies, exchanges, and fiat currencies can each be identified in multiple ways:

| Entity | Preferred identifier | Alternative identifiers | Lookup endpoint |
|--------|---------------------|------------------------|-----------------|
| Cryptocurrency | `id` (e.g. `id=1` for Bitcoin) | `symbol` (e.g. `symbol=BTC`), `slug` | `/cryptocurrency/map` |
| Exchange | `id` (e.g. `id=270` for Binance) | `slug` (e.g. `slug=binance`) | `/exchange/map` |
| Fiat currency | [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) code (e.g. `USD`) | CoinMarketCap ID | `/fiat/map` |

The API supports 93 fiat currencies and 4 precious metals (XAU, XAG, XPT, XPD) for the `convert` parameter. Call [/fiat/map](/api/documentation/pro-api-reference/tools#fiat-id-map) for the complete list of supported fiat currency codes and their CoinMarketCap IDs.

> **Warning:** Using CoinMarketCap IDs is always recommended as not all cryptocurrency symbols are unique. They can also change with a cryptocurrency rebrand. If a symbol is used, the API will always default to the cryptocurrency with the highest market cap if there are multiple matches. The `convert` parameter also defaults to fiat if a cryptocurrency symbol matches a supported fiat currency. Use the `/map` endpoints to quickly find the corresponding CoinMarketCap ID for a cryptocurrency or exchange.

## Bundling API calls

Many endpoints support ID and crypto/fiat currency conversion bundling. This means you can pass multiple comma-separated values to an endpoint to query or convert several items at once. Check the `id`, `symbol`, `slug`, and `convert` query parameter descriptions in the endpoint documentation to see if this is supported for an endpoint.

Endpoints that support bundling often return data as an object map instead of an array, especially in `v1` quote and info style endpoints. Newer versions may return arrays instead, so always confirm the response shape in the endpoint reference.

For example, if you passed `symbol=BTC,ETH` to `/v1/cryptocurrency/quotes/latest` you would receive:

```json
{
  "data": {
    "BTC": {
      ...
    },
    "ETH": {
      ...
    }
  }
}
```

Or if you passed `id=1,1027` you would receive:

```json
{
  "data": {
    "1": {
      ...
    },
    "1027": {
      ...
    }
  }
}
```

Price conversions that are returned inside endpoint responses behave in the same fashion. These are enclosed in a `quote` object.

## Date and time formats

- All endpoints that require date/time parameters allow timestamps to be passed in either [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format (e.g. `2018-06-06T01:46:40Z`) or in Unix time (e.g. `1528249600`). Timestamps that are passed in ISO 8601 format support basic and extended notations; if a timezone is not included, UTC will be the default.
- All timestamps returned in JSON payloads are returned in UTC time using human-readable ISO 8601 format which follows this pattern: `yyyy-mm-ddThh:mm:ss.mmmZ`. The final `.mmm` designates milliseconds. Per the ISO 8601 spec the final `Z` is a constant that represents UTC time.
- Data is collected, recorded, and reported in UTC time unless otherwise specified.

## Versioning

The CoinMarketCap API is versioned to guarantee new features and updates are non-breaking. The current documentation includes `v1`, `v2`, and `v3` endpoints depending on the product area. Always use the version shown on the endpoint you are integrating.
