# Brazil Central Bank PTAX, Selic, CDI & IPCA Contract Indexer (`b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer`) Actor

Fetches official Central Bank of Brazil (BCB SGS & Olinda) macroeconomic series (Selic, CDI, IPCA, IGP-M, PTAX USD/EUR) and calculates automated B2B contract, lease, and treasury monetary adjustments.

- **URL**: https://apify.com/b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer.md
- **Developed by:** [Jesley Tassili de Oliveira Aguileira](https://apify.com/b2b-quant-apis) (community)
- **Categories:** AI, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$15.00 / 1,000 bcb ptax, selic, cdi or ipca contract index calculateds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Brazil Central Bank PTAX, Selic, CDI & IPCA Contract Indexer (`MCP Server` + `n8n Ready` + `REST API`)

[![MCP Server Enabled](https://img.shields.io/badge/MCP_Server-Streamable_HTTP_%26_SSE-6366F1?style=for-the-badge)](https://mcp.apify.com/?actors=b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer)
[![n8n Workflow Template](https://img.shields.io/badge/n8n-Download_Ready_Workflow-FF6D5A?style=for-the-badge\&logo=n8n)](https://raw.githubusercontent.com/jesleytassili-glitch/b2b-quant-mcp-n8n-suite/main/n8n_creator_hub_templates/brazil-bcb-ptax-sgs-financial-contract-indexer.n8n.json)
[![OpenAPI 3.1](https://img.shields.io/badge/OpenAPI_3.1-Stateless_JSON_API-00C853?style=for-the-badge)](https://github.com/jesleytassili-glitch/b2b-quant-mcp-n8n-suite)

**Fetches official Central Bank of Brazil (BCB SGS & Olinda) macroeconomic series (Selic, CDI, IPCA, IGP-M, PTAX USD/EUR) and calculates automated B2B contract, lease, and treasury monetary adjustments.**

Engineered by **[@b2b-quant-apis](https://apify.com/b2b-quant-apis)** for **scheduled Machine-to-Machine (`n8n` / `Make.com`) pipelines**, **Autonomous AI Agents (`Claude Desktop`, `Cursor IDE`, `LangChain`, `CrewAI`)**, and **Enterprise Compliance & RevOps stacks**.

***

### Why Choose `b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer`?

1. **Zero-Proxy & Zero-External-Key Architecture**: Connects directly to official primary registries and public regulatory endpoints with deterministic input sanitization and automatic retry/backoff.
2. **Quantitative Risk & Opportunity Scoring (`0–100`)**: Every output record includes a normalized quantitative score and an executive **Markdown Dossier** ready for RAG vector databases, Slack/Teams alerts, or CRM enrichment.
3. **Native Model Context Protocol (MCP) Server**: Connect directly to **Claude Desktop**, **Cursor**, **Windsurf**, or any MCP client in 1 click without deploying local infrastructure.
4. **Predictable Pay-Per-Event Pricing**: You only pay **`$0.015 USD`** per successfully processed record (`contract-index-calculated`). Zero monthly subscription fees.

***

### Transparent Pay-Per-Event (PPE) Pricing

| Billing Event Name | Event Title | Price per Event (USD) | Categories |
| :--- | :--- | :---: | :--- |
| **`contract-index-calculated`** | BCB PTAX, Selic, CDI or IPCA Contract Index Calculated | **`$0.015 USD`** | `AI, BUSINESS, AUTOMATION` |

> **Negative Profit Protection**: Failed queries, empty responses, or invalid inputs return cleanly without triggering event charges.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
| :--- | :---: | :---: | :--- | :--- |
| `indicators` | `string` | **Yes** | `"SELIC,IPCA,IGP-M,PTAX_USD"` | Comma-separated BCB indicators: SELIC (432), IPCA (433), IGP-M (189), PTAX_USD (1), CDI (12). |
| `contractBaseValueBrl` | `number` | **Optional** | `10000` | Principal value in BRL to simulate monetary adjustment against the latest indicator rate. |
| `maxResults` | `integer` | **Optional** | `5` | Maximum number of indicator records to return (1 to 20). |

#### Example Input JSON

```json
{
  "indicators": "SELIC,IPCA,IGP-M,PTAX_USD",
  "contractBaseValueBrl": 10000,
  "maxResults": 5
}
```

***

### Output Dataset Schema

Each run pushes structured JSON items to the default Apify Dataset with the following fields:

| Field Name | Type | Description |
| :--- | :---: | :--- |
| `indicatorCode` | `string` | **Indicator Code** — BCB SGS series code. |
| `indicatorName` | `string` | **Indicator Name** — Official macroeconomic indicator name. |
| `referenceDate` | `string` | **Reference Date** — Latest official publication date (DD/MM/YYYY). |
| `latestRateValue` | `number` | **Latest Rate / Value** — Latest official value or rate published by BCB. |
| `unitType` | `string` | **Unit / Periodicity** — Rate unit (% p.a., % p.m., BRL/USD). |
| `contractBaseValueBrl` | `number` | **Base Contract Value (BRL)** — Input contract principal in BRL. |
| `adjustedContractValueBrl` | `number` | **Adjusted Contract Value (BRL)** — Simulated adjusted value in BRL. |
| `financialImpactScore` | `integer` | **Financial Impact Score (0-100)** — Quantitative treasury materiality score (0-100). |
| `markdownTreasuryBrief` | `string` | **Markdown Treasury & ERP Brief** — Executive report for CFOs, ERPs, and legal contract automation. |

#### Example Output JSON

```json
[
  {
    "indicatorCode": "Sample Indicator Code",
    "indicatorName": "Sample Indicator Name",
    "referenceDate": "Sample Reference Date",
    "latestRateValue": 1500.5,
    "unitType": "Sample Unit / Periodicity",
    "contractBaseValueBrl": 1500.5,
    "adjustedContractValueBrl": 1500.5,
    "financialImpactScore": 92,
    "markdownTreasuryBrief": "Sample Markdown Treasury & ERP Brief"
  }
]
```

***

### 1-Click MCP Server Integration (Claude Desktop & Cursor IDE)

Add `b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer` as an AI Agent tool in **Claude Desktop** (`claude_desktop_config.json`) or **Cursor IDE** (`.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "brazil-bcb-ptax-sgs-financial-contract-indexer": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

- **Hosted Streamable HTTP MCP URL:** `https://mcp.apify.com/?actors=b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer`

***

### Automated Daily `n8n` Workflow Template

Download the pre-built, sanitized **n8n workflow template** with a daily `Schedule Trigger` (`07:00 AM`), `HTTP Request` node, and `CRM/Slack Webhook Router`:

- **Direct Download (`.n8n.json`):** [brazil-bcb-ptax-sgs-financial-contract-indexer.n8n.json](https://raw.githubusercontent.com/jesleytassili-glitch/b2b-quant-mcp-n8n-suite/main/n8n_creator_hub_templates/brazil-bcb-ptax-sgs-financial-contract-indexer.n8n.json)
- **Enterprise Multi-Actor Super-Pipelines:** [GitHub Repository `jesleytassili-glitch/b2b-quant-mcp-n8n-suite`](https://github.com/jesleytassili-glitch/b2b-quant-mcp-n8n-suite)

***

### Direct Stateless REST API Call (`cURL` Synchronous JSON)

Call this Actor synchronously as a standard HTTP POST micro-API and receive the JSON dataset array directly in the HTTP response:

```bash
curl -X POST "https://api.apify.com/v2/acts/b2b-quant-apis~brazil-bcb-ptax-sgs-financial-contract-indexer/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_APIFY_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"indicators": "SELIC,IPCA,IGP-M,PTAX_USD", "contractBaseValueBrl": 10000, "maxResults": 5}'
```

***

### Frequently Asked Questions (FAQ)

#### 1. Do I need to configure residential proxies or third-party API keys?

No. `b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer` runs out-of-the-box with zero external API keys and zero paid proxy requirements.

#### 2. Can I chain this Actor with other B2B compliance and lead enrichment tools?

Yes. Explore the full **25-Actor B2B Quant & Regulatory Suite** at **[apify.com/b2b-quant-apis](https://apify.com/b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer)** or import our **5 Multi-Actor Waterfall Pipelines** from **[GitHub (`jesleytassili-glitch/b2b-quant-mcp-n8n-suite`)](https://github.com/jesleytassili-glitch/b2b-quant-mcp-n8n-suite)**.

# Actor input Schema

## `indicators` (type: `string`):

Comma-separated BCB indicators: SELIC (432), IPCA (433), IGP-M (189), PTAX_USD (1), CDI (12).

## `contractBaseValueBrl` (type: `number`):

Principal value in BRL to simulate monetary adjustment against the latest indicator rate.

## `maxResults` (type: `integer`):

Maximum number of indicator records to return (1 to 20).

## Actor input object example

```json
{
  "indicators": "SELIC,IPCA,IGP-M,PTAX_USD",
  "contractBaseValueBrl": 10000,
  "maxResults": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b-quant-apis/brazil-bcb-ptax-sgs-financial-contract-indexer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/l8dAySAUEYeikl9OJ/builds/7xPtVEhh4YLpdPedT/openapi.json
