79trust / 100

Mercado Cambio

by Brazilayer Markets in Markets & finance

x402 APIPassing, checked 2 h ago

USD/BRL two ways: the official Central Bank PTAX rate and the LIVE crypto market (BTC/BRL, USDT/BRL), plus the Brazil premium (ágio): how much Brazilians pay above global price for dollar/crypto exposure. A classic emerging-market capital-flow signal, computed live from exchange prices at request time. Positive premium = capital-flight pressure; discount = inflow. Free sample, no payment: https://api.brazilayer.com/v1/mercado/amostra

GET https://api.brazilayer.com/v1/mercado/cambio

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
561 ms typical, 643 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.brazilayer.com/v1/mercado/cambio"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.brazilayer.com%2Fv1%2Fmercado%2Fcambio
const res = await pay("https://api.brazilayer.com/v1/mercado/cambio");
console.log(await res.json());

Example input

{}

Example output

{
  "cripto_ao_vivo": {
    "agio_btc_pct": 1.42,
    "agio_usdt_vs_ptax_pct": 1.47,
    "btc_brl": 630000,
    "usdt_brl": 5.51
  },
  "ptax_venda": 5.43
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402643 ms$0.002
5 h agoPassed402108 ms$0.002
9 h agoPassed402413 ms$0.002
13 h agoPassed402676 ms$0.002
16 h agoPassed402634 ms$0.002
21 h agoPassed402561 ms$0.002
23 h agoPassed402108 ms$0.002
27 h agoPassed402634 ms$0.002
32 h agoPassed40231 ms$0.002