How to Use Marketstack stock exchange directory in VS Code
Returns exchange names, MIC codes, locations, and websites from Marketstack’s directory. Use it to identify trading venues or build an exchange lookup; a directory entry does not guarantee price coverage.
Prompts to try with Marketstack stock exchange directory in VS Code
Copy an example into VS Code, or ask in your own words.
Use Marketstack stock exchange directory to find Nasdaq records and build an exchange picker in this project showing each name, MIC, country, and city.
Use Marketstack stock exchange directory to look up London Stock Exchange records and add the returned names, MIC codes, and websites to our market reference file.
Use Marketstack stock exchange directory to resolve XNAS and XNYS, then check whether our exchange labels match the returned venue names.
Use Marketstack stock exchange directory to collect all pages, select records located in Japan, and create a CSV with names, MIC codes, cities, and websites.
Use Marketstack stock exchange directory to retrieve Nasdaq records and compare their names, locations, and websites with our saved directory snapshot.
How to set up Marketstack stock exchange directory in VS Code
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
Use Add to VS Code on the console's Agents & MCP page, or run:
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}' - Sign in
VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.
Use the Spiral skill
- Send VS Code this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Marketstack stock exchange directory
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "marketstack/exchanges/list", "input": { "limit": 1 } }'
Then paste one of the prompts above: VS Code finds Marketstack stock exchange directory on Spiral, shows the price and runs it.
Marketstack stock exchange directory providers and prices
Spiral runs Marketstack stock exchange directory through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask VS Code for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Limit | 1 to 100 | Rows per page, from 1 to 100. Default 100. The request costs the same whatever the row count. | |
| Offset | 0 to 1000000 | Rows to skip for the next page. Default 0. |
Every API field of Marketstack · Exchanges is on its tool page: open its card above.
What can you do with Marketstack stock exchange directory in VS Code?
Build an exchange selector that displays venue names and locations alongside MIC codes. A coding agent can also reconcile exchange labels in project files against Marketstack’s directory.
Build an exchange picker
Populate a searchable trading venue selector with exchange names, MIC codes, and locations.
Check exchange labels in imported data
Compare exchange names in a portfolio import with directory records and flag ambiguous matches for review.
Create a regional venue reference
Collect the directory and organize returned exchanges by country and city for a market research brief.
Enrich market reports
Expand exchange codes in a report into readable venue names and add the returned exchange websites.
Review directory changes
Compare successive directory snapshots to identify added records and changes to names, locations, or websites.
Prepare price coverage checks
Resolve a requested trading venue to candidate MIC codes before separately checking whether its securities have price data.
More on Marketstack stock exchange directory and VS Code
Overview
Marketstack stock exchange directory in other agents
Questions about Marketstack stock exchange directory in VS Code
Can VS Code use Marketstack stock exchange directory?
Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run Marketstack stock exchange directory like any built-in tool.
How much does Marketstack stock exchange directory cost in VS Code?
Up to $0.034918 per run. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your VS Code plan is separate.
Do I need an Alexandria account to use Marketstack stock exchange directory in VS Code?
No. Spiral runs Marketstack stock exchange directory on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up Marketstack stock exchange directory in VS Code?
About two minutes: add the hosted server, then sign in.
Does VS Code wait while Marketstack stock exchange directory runs?
Marketstack stock exchange directory runs in the background. VS Code starts the run, checks on it and gives you the json when it's ready.
How many exchanges does Marketstack’s directory cover?
Marketstack documents more than 2,700 exchange records in its database. That is the directory’s scope, not a count of exchanges with available price data.
What information identifies each exchange?
Records include the exchange name, MIC code, country, city, and website. Marketstack also documents regulatory metadata for exchange records.
How can I tell whether I retrieved the complete directory?
Marketstack returns a total result count in its pagination metadata. Compare the records collected across pages with that total before treating the retrieval as complete.
Does Marketstack guarantee that every exchange record is accurate?
APILayer’s master agreement expressly disclaims warranties and liability for inaccuracies, errors, and omissions in licensed data. The directory therefore does not carry an unconditional accuracy guarantee.
Does access give me unrestricted rights to republish the directory?
APILayer’s master agreement grants only rights expressly provided in the agreement. Access alone should not be read as an unrestricted republication license.
Start using Marketstack stock exchange directory in VS Code
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into VS Code:
set up https://spiral.ai/SKILL.md


