Get total and unlocked STX supply

Retrieves the total and unlocked STX supply.

GET
/extended/v1/stx_supply

Query Parameters

height?Block height

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.

unanchored?boolean

Include data from unanchored (i.e. unconfirmed) microblocks

Defaultfalse

Response Body

GET request that returns network target block times

TypeScript Definitions

Use the response body type in TypeScript.

unlocked_percentstring

String quoted decimal number of the percentage of STX that have unlocked

total_stxstring

String quoted decimal number of the total circulating number of STX (at the input block height if provided, otherwise the current block height)

total_stx_year_2050string

String quoted decimal number of total circulating STX supply in year 2050. STX supply grows approx 0.3% annually thereafter in perpetuity.

unlocked_stxstring

String quoted decimal number of the STX that have been mined or unlocked

block_heightinteger

The block height at which this information was queried

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/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"
}