Skip to content

New Metrics!

Compare
Choose a tag to compare
@TrevorJTClarke TrevorJTClarke released this 08 Apr 22:51
· 22 commits to master since this release
c22c98e

This release is a minor update to support "metrics" within blockchain, block and transaction methods.

There are two ways to use the methods:

  1. Get live, "windowed", realtime data, by not specifying startDate/endDate
  2. Get historical timeseries metrics, by specifying startDate/endDate

Use:

w3b.blockchain.getMetrics() // Returns realtime windowed data
w3b.block.getMetrics() // Returns realtime windowed data
w3b.block.getMetrics({startDate: 1583625600000, endDate: 1583712000000}) // Returns historical data
w3b.transaction.getMetrics() // Returns realtime windowed data
w3b.transaction.getMetrics({startDate: 1583625600000, endDate: 1583712000000}) // Returns historical data

For data & response documentation see: