Dólar
GET
https://cl.dolarapi.com/v1/cotizaciones/usdCotización del dólar estadounidense en pesos chilenos
Respuestas
Devuelve la cotización del Dólar
JSON
[
{
"compra": 0,
"venta": 0,
"ultimoCierre": 0,
"nombre": "string",
"moneda": "string",
"fechaActualizacion": "string"
}
]
Ejemplos
cURL
curl -X GET https://cl.dolarapi.com/v1/cotizaciones/usd
JavaScript
fetch("https://cl.dolarapi.com/v1/cotizaciones/usd")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("https://cl.dolarapi.com/v1/cotizaciones/usd");
Python
import requests
response = requests.get("https://cl.dolarapi.com/v1/cotizaciones/usd")
print(response.json())