GasPriceのestimate
Ethereumのgas priceはその時の状況に応じて変化します。
そのため、Gaspriceの適正値を探すことはとても重要です。
そこで、gas priceのestimateに使えるAPIを探してみました。
※2018年7月30日時点での調査結果です。
調査方法
ethgasstationのウェブサイトの
- SafeLow (<30m)
- Standard (<5m)
- Fast (<2m)
をベースに考えてみました。
SafeLow | Standard | Fast |
---|---|---|
1.1 | 1.1 | 4 |
ethgasstation
有名なEthGasStationが提供しているAPIです。
https://ethgasstation.info/json/ethgasAPI.json
SafeLow | Standard | Fast |
---|---|---|
11 | 11 | 40 |
APIは、ウェブサイトと比べて10倍大きいです。
mycrypto
myetherwalletと分裂したmycryptが用いているapiです。
ソースコード
https://dev.blockscale.net/api/gasexpress.json
SafeLow | Standard | Fast |
---|---|---|
1 | 1 | 4 |
大体Ethgasstationのウェブサイトの値と同じくらいです。
etherchain.org
ethgasstationのgas price oracleを元に取得しています
https://www.etherchain.org/api/gasPriceOracle
SafeLow | Standard | Fast |
---|---|---|
1 | 1.001 | 3.1 |
大体Ethgasstationのウェブサイトの値と同じくらいです。
結果
現時点で、ethGasStationのgas価格が高すぎるので、GasPriceの算出には他のAPIを利用することを検討に入れてもいいかなと思います。