# BR Data API – PTAX Exchange Rate

> BR Data API – PTAX Exchange Rate is a paid API for AI agents from brasil-data-x402.wagner-proc.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Returns the official PTAX exchange rate (buy and sell BRL prices) for a given currency and date, as published by Brazil's Banco Central.

## Facts

- Endpoint: GET https://brasil-data-x402.wagner-proc.workers.dev/v1/rates/ptax?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/br-data-api-ptax-exchange-rate-12c133fe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n_Cd6hJUIxSdBBFFAZBGR

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability br-data-api-ptax-exchange-rate-12c133fe
```

Example prompt: What's the official PTAX exchange rate for USD to BRL for October 7, 2026? Give me both the buy and sell prices as published by Banco Central.

## When to prefer this

Use this endpoint when you need the official BCB PTAX exchange rate for BRL — the legally recognized rate used for Brazilian tax, accounting, and financial compliance purposes. Prefer this over generic FX APIs when the authoritative Banco Central figure is required, especially for invoicing, tax filings, or regulatory reporting in Brazil.

## Known failure modes

- No PTAX rate available for the requested date (e.g. weekends or Brazilian holidays) — may return empty or error response
- Invalid or unsupported currency code — returns error
- Future dates may not have rates published yet
- Rate limit or payment failure via x402 if USDC payment is not properly handled

## How this service works

Clean, normalized Brazilian public data (CNPJ, CEP, BCB rates, PTAX, holidays/business days, banks/ISPB) for AI agents. Paid endpoints use x402 (HTTP 402, USDC) — no signup or API key. Not affiliated with Receita Federal, Banco Central or Correios.

## Output

A JSON object containing the currency code, the official BCB buy rate in BRL, the official BCB sell rate in BRL, and the quote date (e.g. {"currency":"USD","buy_brl":4.9929,"sell_brl":4.9935,"quote_date":"2026-10-07"}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "date": {
       "type": "string"
      },
      "currency": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "buy_brl": 4.9929,
  "currency": "USD",
  "sell_brl": 4.9935,
  "quote_date": "2026-10-07"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/br-data-api-ptax-exchange-rate-12c133fe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from brasil-data-x402.wagner-proc.workers.dev](https://www.zero.xyz/host/brasil-data-x402.wagner-proc.workers.dev/llms.txt)
