Loading...
Get the network exchange rate to estimate costs.
This method will use 15 Compute Units.
15
Returns the network's exchange rate, current and next.
The consensus timestamp in seconds.nanoseconds format with an optional comparison operator
OK
596987
1649689200
30000
"1586567700.453054000"
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" }