Get total and unlocked STX supply (legacy)

Retrieves the total and unlocked STX supply in legacy format 1.0 API.

GET
/extended/v1/stx_supply/legacy_format

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.

unlockedPercentstring

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

totalStacksstring

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

totalStacksFormattedstring

Same as totalStacks but formatted with comma thousands separators

totalStacksYear2050string

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

totalStacksYear2050Formattedstring

Same as totalStacksYear2050 but formatted with comma thousands separators

unlockedSupplystring

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

unlockedSupplyFormattedstring

Same as unlockedSupply but formatted with comma thousands separators

blockHeightstring

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