How Hedera calculates the HBAR / USD exchange rate for SDKs… | Hedera Hedera Network Services Token Service Mint and configure tokens and accounts. Consensus Service Verifiable timestamps and ordering of events. Smart Contracts Run Solidity smart contracts. HBAR The Hedera network's native cryptocurrency. Insights How It Works Learn about Hedera from end to end. Explorers View live and historical data on Hedera. Dashboards Analyze network activity and metrics. Network Nodes Understand networks and node types. Devs Start Building Get Started Learn core concepts and build the future. Documentation Review the API and build using your favorite language. Developer Resources Integrations Plugins and microservices for Hedera. Fee Estimator Understand and estimate transaction costs. Open Source Hedera is committed to open, transparent code. Learning Center Learn about web3 and blockchain technologies. Grants Grants & accelerators for your project. Bounties Find bugs. Submit a report. Earn rewards. Ecosystem ECOSYSTEM Hedera Ecosystem Applications, developer tools, network explorers, and more. NFT Ecosystem Metrics Analyze on-chain and market NFT ecosystem metrics. CATEGORIES Web3 Applications Connect into the innovative startups decentralizing the web on Hedera. Enterprise Applications Learn about the Fortune 500 companies decentralizing the web on Hedera. Wallets & Custodians Create a Hedera account to manage HBAR, fungible tokens, and NFTs. Network Explorers Hedera mainnet and testnet graphical network explorers. Developer Tooling Third-party APIs, integrations, and plugins to build apps on Hedera. Grants & Accelerators Boost your project with support from the Hedera ecosystem. Partner Program Explore our partners to bring your vision into reality. Hedera Council Over 30 highly diversified organizations govern Hedera. Use Cases Hedera Solutions Asset Tokenization Studio Open source toolkit for tokenizing assets securely. Stablecoin Studio All-in-one toolkit for stablecoin solutions. Hedera Guardian Auditable carbon markets and traceability. Functional Use Cases Data Integrity & AI Reliable, secure, and ethically governed insights. Sustainability Enabling fair carbon markets with trust. Real-World Asset Tokenization Seamless tokenization of real-world assets and digital at scale. Consumer Engagement & Loyalty Mint, distribute, and redeem loyalty rewards. Decentralized Identity Maintain the lifecycle of credentials. Decentralized Logs Scalable, real-time timestamped events. DeFi Dapps built for the next-generation of finance. NFTs Low, fixed fees. Immutable royalties. Payments Scalable, real-time, and affordable crypto-payments. HBAR Overview Learn about Hedera's token, HBAR. Treasury Management Hedera’s report of the HBAR supply. Governance Decentralized Governance Hedera Council See the world's leading organizations that own Hedera. About Meet Hedera's Board of Directors and team. Journey Watch Hedera's journey to build an empowered digital future for all. Transparent Governance Public Policy Hedera's mission is to inform policy and regulation that impact the industry. Meeting Minutes Immutably recorded on Hedera. Roadmap Follow Hedera's roadmap in its journey to build the future. Resources Company What's New Partners Papers Careers Media Blog Technical Press Podcast Community Events Meetups Store Brand Navigation QUICKSTART How Hedera calculates the HBAR / USD exchange rate for SDKs and applications Dec 04, 2024 by Atul Mahamuni Senior Vice President of Product, Hashgraph by Keith Kowal Director of Product Management, Hashgraph Background Most blockchains peg their transaction fees to the value of a token. When the value of that token fluctuates it therefore also causes the cost of transactions on that network to also fluctuate. In contrast Hedera pegs transaction fees to a static value in USD, but with the actual fees paid in HBAR. To achieve this Hedera has developed tooling to provide regular recalibration of exchange rates. By offering consistent and transparent costs, Hedera's approach aligns with the expectations of businesses and enterprises that rely on stable operational expenses for scalability, and budget planning. As such having up-to-date and accurate USD to HBAR conversion values is an important network component across various applications and services including: 1. Network Nodes: The exchange rate of HBAR is used to determine the cost of API calls (hbar prices for API calls on Hedera are calculated using the exchange rate so that the dollar equivalent of the price will change more slowly). 2. Hedera Fee Calculator: An interactive calculator on Hedera.com to estimate your costs and a table which lists the most common API calls, with pricing converted from USD to HBAR based on current rates. 3. Public APIs: Hedera offers a RestAPI to publicize the current USD-HBAR exchange rate used by the network to calculate fees. Hedera Exchange Rate Tool To calculate the exchange rate between USD and HBAR Hedera supports an open source Exchange Rate Tool (ERT) which can be found here. The design of ERT takes into account two primary operational considerations: If ERT were to rely on a single exchange rate data point that might be abused to sway the conversion rate. Therefore ERT must support multiple inputs on the current USD-HBAR exchange rate. Cryptocurrency values can be highly volatile so the ERT applies smoothing and clipping functions to make the rates smoother that better allows users to anticipate and support their HBAR expenditures. Pulling the latest pricing from key exchanges There are many exchanges that publish exchange rates between USD & HBAR. In order to reduce threats of centralization, ERT uses rates from the following exchanges: Coinbase Binance Bitmart Bitstamp Crypto.com Every hour ERT fetches the HBAR-USD exchange rate from the above exchanges. From these exchange rates, ERT calculates a volume-weighted median using the exchange rates and trading volumes on each of the exchanges. This approach ensures that exchanges with higher trading volumes have a greater influence on the final median rate. Smoothing & Clipping ERT compares the median exchange rate value to the value used from the previous midnight. If the newly calculated median changes the rate from last night by more than a threshold (currently 25% at the time of writing this document), then we clip the change in this rate to that threshold. This prevents wild swings in the exchange rates used by the Hedera networks while allowing it to catch up with the market rate eventually. Further - because the prices of HBAR can be volatile - ERT implements clipping with a configurable floor currently set at $0.04 per HBAR. Publishing ERT Exchange Rate Once calculated, the validated and adjusted rate is packaged into an ExchangeRate file, which includes the Current Rate that is in effect, the Next Rate that should take effect, and the Expiration Time when the switchover should occur from the Current Rate to the Next Rate. The Exchange Rate Tool then uploads this file to the consensus nodes, and the consensus nodes calculate the appropriate fees in HBAR accordingly. Currently, Hedera runs three ERT instances publishing to the mainnet, testnet, and previewnet networks. The Hedera Fee calculator uses this same exchange rate value to ensure that the fees it projects accurately track the actual fees being charged on the network. In addition the ERT exchange rates are published with a REST API here. A sample request and response is shown below. Sample API Request: https://mainnet.mirrornode.hedera.com/api/v1/network/exchangerate Sample API Response: { "current_rate": { "cent_equivalent": 405644, "expiration_time": 1732654800, "hbar_equivalent": 30000 }, "next_rate": { "cent_equivalent": 409246, "expiration_time": 1732658400, "hbar_equivalent": 30000 }, "timestamp": "1732651259.496599000" } Conclusion The Hedera Exchange Rate tool is a key component that enables the Hedera network to offer stable transaction pricing. This in turn enables Hedera's transaction costs to remain predictable in terms of US Dollars and reduces the impact of market volatility strengthening the network's appeal to a wide range of stakeholders. Share This Back to blog What is gRPC, gRPC-Web, and Proxies? Ed Marquez Pragmatic Blockchain Design Patterns – Integrating Blockchain into Business Processes Michiel Mulders Zero Cost EthereumTransaction on Success: Hedera's New Fee Model for Relay Operators Oliver Thorn Hedera Adopts Chainlink Standard for Cross-Chain Interoperability To Accelerate Ecosystem Adoption Hedera Team Hedera Developer Highlights March 2025 Michiel Mulders Hedera Release Cycle Overview Ed Marquez View All Posts Sign up for the newsletter CONNECT WITH US Transparency Open Source Audits & Standards Sustainability Commitment Carbon Offsets Governance Hedera Council Public Policy Treasury Management Meeting Minutes LLC Agreement Node Requirements Community Events Meetups HBAR Telegram Developer Discord Twitter Community Support FAQ Network Status Developer Discord StackOverflow Brand Brand Guidelines Built on Hedera Logo Hedera Store About Team Partners Journey Roadmap Careers Contact General Inquiry Public Relations © 2018-2025 Hedera Hashgraph, LLC. All trademarks and company names are the property of their respective owners. All rights in the Deutsche Telekom mark are protected by Deutsche Telekom AG. All rights reserved. Hedera uses the third party marks with permission. Terms of Use  |  Privacy Policy