How to Use Marketstack stock exchange directory in opencode
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 opencode
Copy an example into opencode, 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 opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode 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: opencode 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 opencode 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 opencode?
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 opencode
Overview
Marketstack stock exchange directory in other agents
Questions about Marketstack stock exchange directory in opencode
Can opencode use Marketstack stock exchange directory?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Marketstack stock exchange directory like any built-in tool.
How much does Marketstack stock exchange directory cost in opencode?
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 opencode plan is separate.
Do I need an Alexandria account to use Marketstack stock exchange directory in opencode?
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 opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Marketstack stock exchange directory runs?
Marketstack stock exchange directory runs in the background. opencode 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 opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


