How to Use Banco Central do Brasil SGS time series in opencode
Returns historical observations for a numbered BCB economic series. Use it when you know the indicator's SGS code and need measured values over time, such as the Copom's Selic target.
Prompts to try with Banco Central do Brasil SGS time series in opencode
Copy an example into opencode, or ask in your own words.
Use Banco Central do Brasil SGS time series to retrieve Selic target series 432 for January through December 2025 and add an annual-percentage chart to this project.
Use Banco Central do Brasil SGS time series to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from Banco Central do Brasil SGS time series and tell me what changed since last week.
Check Banco Central do Brasil SGS time series and summarize what you find in three bullet points.
Pull the newest data from Banco Central do Brasil SGS time series and give me the result as a table.
How to set up Banco Central do Brasil SGS time series 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 Banco Central do Brasil SGS time series
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": "bcb-gov-br/economic-data/sgs_series", "input": { "codigo": 1 } }'
Then paste one of the prompts above: opencode finds Banco Central do Brasil SGS time series on Spiral, shows the price and runs it.
Banco Central do Brasil SGS time series providers and prices
Spiral runs Banco Central do Brasil SGS time series 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 |
|---|---|---|---|
| Codigo | a number from 1 | SGS series code (e.g. 432), or a pasted https://api.bcb.gov.br/dados/serie/bcdata.sgs.<code>/... URL; the URL's own | |
| Ultimos | 1 to 20 | Return only the last N observations (server maximum 20). Mutually exclusive with the date window. |
Every API field of Banco Central do Brasil open data · Sgs series is on its tool page: open its card above.
What can you do with Banco Central do Brasil SGS time series in opencode?
Build a Brazil economic dashboard with documented BCB measures behind each chart. A coding agent can turn catalog and service descriptions into a data dictionary and add views for lending, forecasts, payments, exchange rates, and historical indicators.
Prepare a Brazil currency exposure report
Find the relevant BCB datasets, inspect Olinda resources, and identify supported PTAX currencies. Compare dollar and euro reference rates with Selic observations and Focus expectations to explain changes in an importer's planning assumptions.
Review borrowing and foreign-currency budget assumptions
Build a Brazilian business budget review using bank lending averages, Selic history, Focus expectations, and dollar and euro reference rates. Use catalog records, Olinda descriptions, and the currency directory to document the chosen measures.
Write a Brazilian retail finance brief
Compare Pix adoption and the payment-instrument mix with published lending averages and Selic history. Add Focus expectations for economic context, using catalog and Olinda descriptions to distinguish each measure's scope.
Assess conditions for entering Brazil
Prepare a market-entry evidence pack covering local borrowing costs, monetary conditions, published economic expectations, payment usage, and foreign-currency benchmarks. Catalog discovery, service descriptions, and the PTAX currency directory help identify the data behind each section.
Build a BCB data dashboard
Create separate views for lending averages, Focus expectations, payment activity, Pix adoption, exchange-rate benchmarks, and SGS observations. Keep a data dictionary from catalog records, Olinda descriptions, and PTAX currency metadata so readers can inspect what each chart measures.
Check a currency benchmark calculation
Identify the PTAX currency type, retrieve dollar and foreign-currency bulletins, and reproduce a BRL reference-rate calculation. Add the relevant SGS observations when a report also compares the currency movement with monetary conditions.
Explain lending averages in monetary context
Compare published bank lending averages with the Selic target and Focus expectations. Produce a business lending brief that distinguishes completed-loan averages, the policy target, and market forecasts.
More on Banco Central do Brasil SGS time series and opencode
Overview
Banco Central do Brasil SGS time series in other agents
Questions about Banco Central do Brasil SGS time series in opencode
Can opencode use Banco Central do Brasil SGS time series?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Banco Central do Brasil SGS time series like any built-in tool.
How much does Banco Central do Brasil SGS time series cost in opencode?
$0.00873 per call. 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 Banco Central do Brasil SGS time series in opencode?
No. Spiral runs Banco Central do Brasil SGS time series on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up Banco Central do Brasil SGS time series in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Banco Central do Brasil SGS time series runs?
Banco Central do Brasil SGS time series runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
How quickly do BCB payment statistics become available?
Monthly payment-instrument statistics are updated 17 days after month-end, while quarterly instruments are updated two months after quarter-end. SPI statistics have a daily update frequency.
How far back do Pix statistics go?
The Pix catalog gives November 30, 2020 as its coverage start and specifies monthly updates. Registered-key and registered-user stocks are month-end snapshots.
Are Focus figures BCB's own forecasts?
Focus statistics summarize expectations submitted by banks, asset managers, and other participating institutions. Statistics are calculated daily, and the market report appears on the first business day of the week.
Do published lending rates represent the rate a borrower will receive?
They are averages of completed transactions over five business days, weighted by contracted amounts. BCB says rates can differ among customers at the same institution, and some institutions may be absent because they made no relevant loans or did not report on time.
Do BCB cash statistics measure cash purchases?
Cash-in-circulation data counts banknotes and coins outstanding and excludes commemorative coins. The payment-instrument statistics cover cash withdrawals rather than all purchases made with cash.
Start using Banco Central do Brasil SGS time series 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


