Get the network exchange rate to estimate costs.
This method will use 15 Compute Units.
15
Last updated 7 months ago
Returns the network's exchange rate, current and next.
OK
"1586567700.453054000"
^\d{1,10}(\.\d{1,9})?$
const response = await fetch('https://mainnet.hedera.validationcloud.io/v1/YOUR_API_KEY/api/v1/network/exchangerate', { method: 'GET', headers: {}, }); const data = await response.json();
{ "current_rate": { "cent_equivalent": 596987, "expiration_time": 1649689200, "hbar_equivalent": 30000 }, "next_rate": { "cent_equivalent": 596987, "expiration_time": 1649689200, "hbar_equivalent": 30000 }, "timestamp": "1586567700.453054000" }