Get total and unlocked STX supply (legacy)
Retrieves the total and unlocked STX supply in legacy format 1.0 API.
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)
Same as totalStacks
but formatted with comma thousands separators
String quoted decimal number of total circulating STX supply in year 2050. STX supply grows approx 0.3% annually thereafter in perpetuity.
Same as totalStacksYear2050
but formatted with comma thousands separators
String quoted decimal number of the STX that have been mined or unlocked
Same as unlockedSupply
but formatted with comma thousands separators
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/legacy_format?height=777678&unanchored=true"
fetch("https://api.hiro.so//extended/v1/stx_supply/legacy_format?height=777678&unanchored=true")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so//extended/v1/stx_supply/legacy_format?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/legacy_format?height=777678&unanchored=true"
response = requests.request("GET", url)
print(response.text)
{
"unlockedPercent": "string",
"totalStacks": "string",
"totalStacksFormatted": "string",
"totalStacksYear2050": "string",
"totalStacksYear2050Formatted": "string",
"unlockedSupply": "string",
"unlockedSupplyFormatted": "string",
"blockHeight": "string"
}
{
"error": "string",
"message": "string"
}