MetaMask’s Gas API is now available to any developer via Infura

The Gas API, which powers the MetaMask ‘gas toggle’ feature, is now available to developers through Infura, providing the ability to optimize transactions for cost and efficiency on multiple chains with a single API key.

by Kingsley OkonkwoNovember 28, 2023
MetaMask Gas API cover

The Gas API, having been rigorously tested and proven by MetaMask, serves as a dependable source for current computational costs on EIP-1559 enabled networks. This scalable and battle-tested API powers the MetaMask Gas Estimation feature and is now accessible to developers via Infura’s trusted platform.

The Gas API is an advanced tool for web3 developers that enables them to efficiently estimate and optimize gas costs for their blockchain application. This API is a multi-chain optimization tool that offers real-time gas pricing, enhancing the speed and cost-effectiveness of transactions.

While existing solutions often focus narrowly on Ethereum and Polygon chains, the Gas API breaks these boundaries, offering support for a much wider array of blockchain networks including Ethereum, Linea, Goerli, Sepolia, Optimism, Polygon, Base, Arbitrum One, and several others, making it a truly versatile tool for web3 developers.

This open beta provides developers with early access, enabling them to optimize their blockchain transactions for cost and efficiency on multiple chains with a single API key and an opportunity to contribute feedback, aiding the development team in refining the offering.

Benefits of the Gas API for web3 developers

  1. Cost savings and transaction prioritization strategies: One of the most significant advantages of the Gas API is its ability to help developers economize and strategize transaction costs. Whether it's minimizing expenses for non-critical transactions or ensuring rapid processing for high-priority tasks, the Gas API offers a range of cost management options.
  2. Multi-chain support: The Gas API's extensive support for various blockchain networks is pivotal for developers working in multi-chain environments. This feature eliminates the need for multiple tools or APIs, consolidating transaction management into a single, efficient process.
  3. Dependability and scalability: Built on Infura's robust platform, the Gas API guarantees reliability and scalability. This assurance allows developers to focus on innovation and application development, secure in the knowledge that their transaction processes are managed efficiently and effectively.

Get started using the Gas API

The Gas API's open beta release through Infura is not just an enhancement of existing tools; it's an invitation to redefine transaction efficiency in the blockchain space.

Developers eager to integrate the Gas API can start by visiting the Gas API page and exploring the documentation. For a more hands-on learning experience, a video tutorial is available. Alternatively, you can checkout this tutorial on how to build a simple gas tracker app with Gas API and Nextjs.

To engage with the team building the Gas API, be sure to attend the upcoming Infura Community Call as it promises to provide a perfect platform for interaction, learning, and discussion. Additionally, developers can showcase their skills and leverage the Gas API’s capabilities in the upcoming ETHIndia, where you can win a $5,000 bounty in our exciting hackathon challenge.

Receive our Newsletter