Skip to main content

Stats API

Stats Sample‚Äč

Endpoint: https://api.defichain.com/v1/stats

Query params:

  • network: mainnet (default) / testnet
  • q: json path to get the nested json object or value, e.g. "burnInfo" or "burnInfo.address"

Sample output:

{
"chain": "main",
"blockHeight": 1673417,
"bestBlockHash": "86c43ac7fa5d3dd1961dfd1686e01cde735cf7b80f1e3ec878b118d6844bc5ba",
"difficulty": "13089393229.38818",
"medianTime": 1646276485,
"burnInfo": {
"address": "8defichainBurnAddressXXXXXXXdRQkSm",
"amount": "156002224.91060823",
"tokens": [
"7260.95539278@DFI",
"6550.00000000@ETH",
"2476.86380002@BTC",
"18232000.00000000@USDT",
"16820000.00000000@DOGE",
"19051.00000000@LTC",
"3131.00000000@BCH",
"9850000.00000000@USDC"
],
"feeburn": 232464,
"auctionburn": 437231.10787029,
"paybackburn": "34601648.85294260",
"dexfeetokens": [
"14.59099737@BTC",
"354765.08706207@DUSD"
],
"dfipaybackfee": 343912.73555533,
"dfipaybacktokens": [
"117275786.33108674@DUSD"
],
"emissionburn": "77525134.89072141"
},
"tokens": {
"max": 1200000000,
"supply": {
"total": 763742665.1929296,
"circulation": 495163548.19201285,
"foundation": 0,
"community": 24733560.03724362
},
"initDist": {
"total": 588000000,
"totalPercent": 49,
"foundation": 288120000,
"foundationPercent": 49,
"circulation": 49,
"circulationPercent": 51
}
},
"rewards": {
"anchorPercent": 0.05,
"liquidityPoolPercent": 22.5,
"communityPercent": 9.95,
"anchorReward": 0.1,
"liquidityPool": 45,
"total": 275.73744758,
"minter": 91.90329127841399,
"masternode": 91.90329127841399,
"community": 13.538708676177999,
"anchor": 0.055147489516,
"liquidity": 70.17518040911,
"options": 27.242859820904,
"unallocated": 4.770257843134,
"swap": 34.026001031372,
"futures": 34.026001031372
},
"listCommunities": {
"AnchorReward": 60.44163808,
"Burnt": "77525134.89072141"
},
"timeStamp": 1646276619502
}

interface Stats {
chain: string
blockHeight: number
bestBlockHash: string
difficulty: string
medianTime: number
burnInfo: BurnInfo
timeStamp: number
tokens: Tokens
rewards: Rewards
listCommunities: ListCommunities
}

interface BurnInfo {
address: string
amount: string
tokens: string[]
feeburn: number
auctionburn: number
paybackburn: string
dexfeetokens: string[]
dfipaybackfee: number
dfipaybacktokens: string[]
emissionburn: string
}

interface Tokens {
max: number
supply: Supply
initDist: InitDist
}

interface Supply {
total: number
circulation: number
foundation: number
community: number
}

interface InitDist {
total: number
totalPercent: number
foundation: number
foundationPercent: number
circulation: number
circulationPercent: number
}

interface Rewards {
anchorPercent: number
liquidityPoolPercent: number
communityPercent: number
total: number
community: number
minter: number
anchorReward: number
liquidityPool: number
masternode: number
anchor: number
liquidity: number
swap: number
futures: number
options: number
unallocated: number
}

interface ListCommunities {
AnchorReward: number
Burnt: string
}