---
title: "Alchemy 推出 Gas 价格通知功能"
description: "了解开发者如何使用 Gas 价格通知功能，在 gas 价格适合发送交易时提醒用户。"
---

# Alchemy 推出 Gas 价格通知功能

Gas price notifications 是一个新工具，开发者可以用它在 gas price 处于最优水平时提醒用户发送交易。

<ImageBlock
  src="https://media.alchemy.com/1703673142-0x-gas-notif.jpeg"
  alt="用户收到 match0x Dapp 发送的 gas 价格更新手机通知的插图。"
  width={1600}
  height={1023}
  caption="Gas 价格提醒由 Alchemy Notify 提供支持。"
  priority
/>

## 为什么需要这个工具

过去 9 个月里，Ethereum gas price 一路飙升，从[ 2020 年 1 月平均每笔交易 10 Gwei 涨到 9 月的超过 110 Gwei](https://etherscan.io/chart/gasprice)。这是十倍以上的涨幅，偶尔的价格高峰还会让[单笔交易的 gas 费用达到 99 美元](https://cointelegraph.com/news/99-gas-fees-on-ethereum-are-crippling-defis-growth)，复杂智能合约的情况下甚至高达数百美元！

除此之外，gas price 的波动幅度也很大——受实时流量波动影响，gas price 在一天之内就可能上涨三倍。

## Gas price notifications

高昂的费用直接源于网络拥堵。Alchemy Gas Price Notifications 为开发者提供了智能的实时提醒能力，让他们的用户能够在网络拥堵和 gas price 最低时把握时机发送交易。

Alchemy Gas Price Notifications 是首批能够直接把省钱的 gas 洞察带入应用的 API 之一。

<VideoCta
  title="观看 Alchemy dashboard 实际演示"
  description="30 分钟引导讲解：现场演示 dashboard 中的每个工具。"
  ctaHref="/resources/dashboard-demo"
  thumbnail={{
    src: "https://media.alchemy.com/alchemy-dashboard-demo-thumbnail.png",
    alt: "Alchemy Dashboard Demo",
  }}
/>
 

在 gas price 较低时提醒用户 -\> 他们省了钱 -\> 相比竞品，他们以后会选择你的产品。

## 3 分钟即可集成

Gas Price Notifications 是 [Alchemy Notify](https://alchemy.com/notify) 的一部分，接入你的应用只需 3 分钟。具体怎么做？很简单：

1. [注册 Alchemy](https://dashboard.alchemy.com/signup/)。
1. 创建一个 Gas Price Webhook，设置你希望收到提醒的 gas price 阈值。
1. 当 gas price 超过你设置的阈值时，Alchemy 会向你发送通知。

‍

<ImageBlock
  src="https://media.alchemy.com/1704561987-screenshot-of-configuring-the-gas-price-thresholds-using-alchemy.png"
  alt="使用 Alchemy 配置 gas 价格阈值的截图"
  width={1600}
  height={444}
  caption="配置 gas 价格 webhook。"
/>

# 这可以用来做什么？

- 交易所可以在 gas 处于最优水平时提醒客户进行交易。
- 用户可以把交易放进等待池，等 gas price 降到某个水平以下再执行。
- 自动购买[ Gas Tokens](https://gastoken.io/)。这类代币能对冲未来的费用：在 gas price 低时买入，在 gas price 高时使用。

Ethereum 开发者正在努力为主网带来可扩展性，但在此之前，用 Gas Price Notifications 帮你的用户省钱，他们会一直喜欢你。

我们随时提供帮助——如有任何问题，请访问 [Alchemy support center](https://www.alchemy.com/support)！

--

_Alchemy 提供领先的区块链开发平台，为全球 99% 国家/地区的数百万用户支撑着 75 亿美元的交易。绝大多数顶尖区块链应用都依靠 Alchemy 来支撑其产品，包括 Maker、0x、MyEtherWallet、Dharma 和 Kyber。_

*Alchemy 获得了斯坦福大学、Coinbase、Google 董事长、Charles Schwab、全球顶尖创始人和高管的支持，并曾被 [TechCrunch](https://techcrunch.com/2019/12/17/alchemy-blockchain/)、[Wired](https://www.wired.com/story/startup-aims-decrypt-blockchain-business/)、[Bloomberg](https://www.bloomberg.com/news/articles/2019-12-17/stanford-grads-get-school-s-backing-for-their-blockchain-startup) 等众多媒体报道。*

*注册[免费账户](https://dashboard.alchemy.com/signup/)。查看我们的[文档](https://www.alchemy.com/docs)。关注我们的 [Twitter](https://x.com/Alchemy) 以获取最新消息。*
