API de cotação da ação GGBR4 em JSON
Consulte GGBR4 (Gerdau SA) via REST: cotação e fundamentos em JSON, com exemplos em curl, Python e Node.
Indicadores de GGBR4
| Nome | Gerdau SA |
|---|---|
| Último fechamento | R$ 25,68 (04/12/2026) |
| P/VP | 0,93 |
| Dividend yield | 3,32% |
| P/L | 18,73 |
| ROE | 4,96% |
curl
curl -H "Authorization: Bearer $SLDX_TOKEN" \ https://api.sldx.com.br/stock-price/GGBR4
Exige um token grátis: criar chave. O plano Free inclui este endpoint.
Python
import os
import requests
r = requests.get("https://api.sldx.com.br/stock-price/GGBR4", headers={"Authorization": f"Bearer {os.environ['SLDX_TOKEN']}"}, timeout=10)
r.raise_for_status()
print(r.json())
Node.js 18+
const r = await fetch("https://api.sldx.com.br/stock-price/GGBR4", { headers: { Authorization: `Bearer ${process.env.SLDX_TOKEN}` } });
console.log(await r.json());
Formato da resposta
{
"success": true,
"result": {
"ggbr4": {
"exchange_code": "BVMF",
"name": "Gerdau SA",
"current_price": number,
"high_24h": number,
"low_24h": number,
"change_24h": number,
"lastUpdated": unix timestamp
}
}
}
Também: GET /stock-fundamentals/GGBR4 (Free) e GET /stock-dividends/GGBR4 (plano pago). Detalhes na documentação.