Get statistics for mempool transactions
Retrieves statistics for transactions in the mempool, such as counts, ages, and fees.
Response Body
GET request that returns stats on mempool transactions
TypeScript Definitions
Use the response body type in TypeScript.
Number of tranasction in the mempool, broken down by transaction type.
Empty Object
The simple mean (average) transaction fee, broken down by transaction type. Note that this does not factor in actual execution costs. The average fee is not a reliable metric for calculating a fee for a new transaction.
Empty Object
The average time (in blocks) that transactions have lived in the mempool. The start block height is simply the current chain-tip of when the attached Stacks node receives the transaction. This timing can be different across Stacks nodes / API instances due to propagation timing differences in the p2p network.
Empty Object
The average byte size of transactions in the mempool, broken down by transaction type.
Empty Object
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
curl -X GET "https://api.hiro.so//extended/v1/tx/mempool/stats"
fetch("https://api.hiro.so//extended/v1/tx/mempool/stats")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so//extended/v1/tx/mempool/stats"
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/v1/tx/mempool/stats"
response = requests.request("GET", url)
print(response.text)
{
"tx_type_counts": {
"property1": 0,
"property2": 0
},
"tx_simple_fee_averages": {
"property1": {
"p25": 0,
"p50": 0,
"p75": 0,
"p95": 0
},
"property2": {
"p25": 0,
"p50": 0,
"p75": 0,
"p95": 0
}
},
"tx_ages": {
"property1": {
"p25": 0,
"p50": 0,
"p75": 0,
"p95": 0
},
"property2": {
"p25": 0,
"p50": 0,
"p75": 0,
"p95": 0
}
},
"tx_byte_sizes": {
"property1": {
"p25": 0,
"p50": 0,
"p75": 0,
"p95": 0
},
"property2": {
"p25": 0,
"p50": 0,
"p75": 0,
"p95": 0
}
}
}
{
"error": "string",
"message": "string"
}