Get total and unlocked STX supply
Retrieves the total and unlocked STX supply.
Query Parameters
Supply details are queried from specified block height. If the block height is not specified, the latest block height is taken as default value. Note that the block height
is referred to the stacks blockchain.
Include data from unanchored (i.e. unconfirmed) microblocks
false
Response Body
GET request that returns network target block times
TypeScript Definitions
Use the response body type in TypeScript.
String quoted decimal number of the percentage of STX that have unlocked
String quoted decimal number of the total circulating number of STX (at the input block height if provided, otherwise the current block height)
String quoted decimal number of total circulating STX supply in year 2050. STX supply grows approx 0.3% annually thereafter in perpetuity.
String quoted decimal number of the STX that have been mined or unlocked
The block height at which this information was queried
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
curl -X GET "https://api.hiro.so//extended/v1/stx_supply/?height=777678&unanchored=true"
fetch("https://api.hiro.so//extended/v1/stx_supply/?height=777678&unanchored=true")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so//extended/v1/stx_supply/?height=777678&unanchored=true"
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/stx_supply/?height=777678&unanchored=true"
response = requests.request("GET", url)
print(response.text)
{
"unlocked_percent": "string",
"total_stx": "string",
"total_stx_year_2050": "string",
"unlocked_stx": "string",
"block_height": 0
}
{
"error": "string",
"message": "string"
}