Back to Marketstack in Google Sheets
SheetXAI logo
Marketstack logo
Marketstack · Google Sheets Guide

Look Up Exchange Details by MIC Code From Marketstack in a Google Sheet

2026-05-14
5 min read

The Scenario

You are in compliance. A regulatory filing requires exchange-level metadata — country of registration, trading currency, current operational status, and standard trading hours — for 12 specific exchanges identified by their MIC codes. The filing is due next Tuesday.

You have the 12 MIC codes in column A of a Google Sheet. Columns B through F are labeled Exchange Name, Country, City, Currency, and Status — all blank. Marketstack has a per-exchange detail endpoint. Getting it into the sheet is the task.

The MIC codes came from a counterparty data feed. You have never interacted with Marketstack's API before. You have an API key.

The bad version:

  • Open Marketstack's documentation, find the exchange detail endpoint, construct a URL for the first MIC code, run it, and parse the JSON response to figure out which fields map to which columns
  • Copy the values into columns B through F for row 1, then repeat for the remaining 11 MIC codes
  • Notice that one of the MIC codes returns a 404 because the exchange was renamed and the code in your file is outdated — now you need to figure out the correct MIC and document the discrepancy for the filing

The filing requires the metadata. The API calls are not the compliance work.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the MIC codes in column A and through its Marketstack integration it can call the exchange detail endpoint for each one and fill in the adjacent columns.

For each exchange MIC code in column A, fetch the exchange details from Marketstack and write the exchange name into column B, country into column C, city into column D, currency into column E, and status into column F

What You Get

  • Exchange name in column B for each MIC code in column A
  • Country in column C, city in column D, trading currency in column E, operational status in column F
  • Any MIC code that returns no result gets a note in column B explaining that the exchange was not found — so the gap is visible rather than silent

What If the Data Is Not Quite Ready

Some MIC codes in column A might be outdated or unofficial variants

For each MIC code in column A, look up the exchange in Marketstack — if the code returns a result, write the name, country, city, currency, and status into columns B through F; if the code returns no result, write "NOT FOUND" in column B and leave the rest blank so I can review those rows manually

You also need the standard opening and closing hours in local time

For each exchange MIC code in column A, fetch the exchange details from Marketstack and write name, country, currency, and status into columns B, C, D, and E; then write the standard opening time in column F and the closing time in column G, both in local exchange time

You want a summary row at the bottom showing how many exchanges are active versus inactive

For each MIC code in column A, fetch exchange details from Marketstack and fill columns B through F with name, country, city, currency, and status; then add a summary row at the bottom of the sheet showing the count of active exchanges and the count of inactive or closed exchanges

Full compliance pipeline: look up all exchanges, flag inconsistencies, add a notes column for the filing

For each MIC code in column A, fetch the exchange details from Marketstack and fill columns B through F; in column G, note any exchange where the status is not Active, where the country does not match what is in column H (which already has the expected country from our internal records), or where Marketstack returned no result — these are the rows that need manual review for the filing

Flagging the discrepancies automatically means the compliance review is focused on the actual exceptions rather than a line-by-line comparison.

Try It

Get the 7-day free trial of SheetXAI and open the sheet with your MIC codes in column A, then ask it to fill in the exchange details from Marketstack for each row. The Marketstack integration is included in every SheetXAI plan.

See also: exporting the full exchange catalog and enriching tickers with metadata.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more