API Docs

Global settings

Get markets

Returns all markets available in MPower.

GET/https://api-get-markets-kigtdz23uq-ew.a.run.app

Headers

x-api-key
<API_KEY>
string

Body Parameters

No body, query, or path parameters are required.

cURL

curl -i \
  -H "x-api-key: <API_KEY>" \
  https://api-get-markets-kigtdz23uq-ew.a.run.app

Response

200 Success

{
  "count": 13,
  "markets": {
    "marketDocumentId": {
      "name": "Market name",
      "country_iso": "CHE",
      "currency_iso": "CHF"
    }
  }
}

401 Unauthorized

{
  "error": "Unauthorized"
}

405 Method not allowed

{
  "error": "Method not allowed"
}

500 API key is not configured

{
  "error": "API key is not configured"
}

Behavior / Side effects

Read-only endpoint

  • Reads all documents from the markets collection.
  • Does not write, update, or delete Firestore documents.

Request behavior

  • Does not require body parameters.
  • Does not support query parameters, filters, sorting, or pagination.
  • Returns all markets in a single response.

Response shape

  • Returns a top-level markets object.
  • Each key inside markets is the Firestore market document ID.
  • Each market includes only name, country_iso, and currency_iso.

Field mapping

  • name is read from markets/{market_id}.name.en.
  • country_iso is read from markets/{market_id}.iso.
  • currency_iso is read from markets/{market_id}.currency.
  • country_iso and currency_iso are normalized to uppercase.

Data quality expectations

  • name, iso, and currency are expected to exist for every market.
  • The API has a defensive fallback and may return null only if the underlying Firestore document is incomplete or malformed.