Get average block times

Retrieves average block times.

GET
/extended/v2/blocks/average-times

Response Body

Default Response

TypeScript Definitions

Use the response body type in TypeScript.

last_1hnumber

Average block times over the last hour (in seconds)

last_24hnumber

Average block times over the last 24 hours (in seconds)

last_7dnumber

Average block times over the last 7 days (in seconds)

last_30dnumber

Average block times over the last 30 days (in seconds)

Default Response

TypeScript Definitions

Use the response body type in TypeScript.

errorstring
message?string
[key: string]any
curl -X GET "https://api.hiro.so//extended/v2/blocks/average-times"
fetch("https://api.hiro.so//extended/v2/blocks/average-times")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.hiro.so//extended/v2/blocks/average-times"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.hiro.so//extended/v2/blocks/average-times"

response = requests.request("GET", url)

print(response.text)
{
  "last_1h": 0,
  "last_24h": 0,
  "last_7d": 0,
  "last_30d": 0
}
{
  "error": "string",
  "message": "string"
}