Difference between revisions of "Dashboard API"

From Veriblock Wiki
Jump to: navigation, search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
See: [[Main_Page]]
+
<languages/>
  
 +
<translate>
 +
 +
 +
<!--T:1-->
 +
See: [[Main_Page]], [[API]]
 +
 +
<!--T:6-->
 
__TOC__
 
__TOC__
  
== Overview ==
+
== Overview == <!--T:2-->
  
 +
<!--T:7-->
 
These are some of the public APIs used by the dashboard to retrieve data.
 
These are some of the public APIs used by the dashboard to retrieve data.
  
https://testnet.explore.veriblock.org
+
<!--T:8-->
 +
https://explore.veriblock.org
  
 +
<!--T:9-->
 
These are still in Testnet, and may change.
 
These are still in Testnet, and may change.
  
== Block ==
+
== Block == <!--T:3-->
  
=== block/<height> ===
+
=== block/<height> === <!--T:10-->
  
https://testnet.explore.veriblock.org/api/block/23731
+
<!--T:11-->
 +
https://explore.veriblock.org/api/block/23731
  
 +
<!--T:12-->
 
Returns same output as: block/<hash>
 
Returns same output as: block/<hash>
  
=== block/<hash> ===
+
=== block/<hash> === <!--T:13-->
  
https://testnet.explore.veriblock.org/api/block/00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B
+
<!--T:14-->
 +
https://explore.veriblock.org/api/block/00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B
  
 +
<!--T:15-->
 
<pre>
 
<pre>
 
{
 
{
Line 39: Line 53:
 
       "poPOutputs":[
 
       "poPOutputs":[
  
       ]
+
       <!--T:16-->
 +
]
 
   },
 
   },
 
   "extraNonce":"1000000",
 
   "extraNonce":"1000000",
Line 60: Line 75:
 
</pre>
 
</pre>
  
 +
<!--T:17-->
 
--
 
--
  
=== block?count=N ===
+
=== block?count=N === <!--T:18-->
  
https://testnet.explore.veriblock.org/api/block?count=3
+
<!--T:19-->
 +
https://explore.veriblock.org/api/block?count=3
  
 +
<!--T:20-->
 
<pre>
 
<pre>
 
[
 
[
Line 123: Line 141:
  
  
=== block/<height>/transactions ===
+
=== block/<height>/transactions === <!--T:21-->
  
https://testnet.explore.veriblock.org/api/block/29995/transactions
+
<!--T:22-->
 +
https://explore.veriblock.org/api/block/29995/transactions
  
 +
<!--T:23-->
 
<pre>
 
<pre>
 
[
 
[
Line 150: Line 170:
 
</pre>
 
</pre>
  
== Address ==
+
== Address == <!--T:4-->
  
=== address/<id> ===
+
=== address/<id> === <!--T:24-->
  
https://testnet.explore.veriblock.org/api/address/V7aFSJpHHpbfsVTQPuYbDeL97A5aik
+
<!--T:25-->
 +
https://explore.veriblock.org/api/address/V7aFSJpHHpbfsVTQPuYbDeL97A5aik
  
 +
<!--T:26-->
 
<pre>
 
<pre>
 
{   
 
{   
Line 166: Line 188:
 
</pre>
 
</pre>
  
== Transaction ==
+
== Transaction == <!--T:27-->
  
=== tx/<TxId> ===
+
=== tx/<TxId> === <!--T:28-->
  
https://testnet.explore.veriblock.org/api/tx/771CE6D2B1BCEB4FBDC1A9BBFA7EBDD78A5E8AFEAAF87A96C301407566F6E73B
+
<!--T:29-->
 +
https://explore.veriblock.org/api/tx/771CE6D2B1BCEB4FBDC1A9BBFA7EBDD78A5E8AFEAAF87A96C301407566F6E73B
  
 +
<!--T:30-->
 
<pre>
 
<pre>
 
{
 
{
Line 197: Line 221:
 
</pre>
 
</pre>
  
 +
== Stats == <!--T:5-->
  
== Stats ==
+
=== stats/banner === <!--T:31-->
 
 
=== stats/banner ===
 
  
 +
<!--T:32-->
 
Contains the banner message.
 
Contains the banner message.
 
If type=warning or critical, then something is not ideal.
 
If type=warning or critical, then something is not ideal.
  
https://testnet.explore.veriblock.org/api/stats/banner
+
<!--T:33-->
 +
https://explore.veriblock.org/api/stats/banner
 
<pre>
 
<pre>
 
{
 
{
Line 216: Line 241:
  
  
=== stats/network ===
+
=== stats/network === <!--T:34-->
  
https://testnet.explore.veriblock.org/api/stats/network
+
<!--T:35-->
 +
https://explore.veriblock.org/api/stats/network
  
 +
<!--T:36-->
 
<pre>
 
<pre>
 
{   
 
{   
Line 258: Line 285:
 
   "blockPopTxs":[   
 
   "blockPopTxs":[   
  
   ],
+
   <!--T:37-->
 +
],
 
   "totalPopTxs":0,
 
   "totalPopTxs":0,
 
   "totalPopTxPerBlock":0,
 
   "totalPopTxPerBlock":0,
Line 270: Line 298:
 
</pre>
 
</pre>
  
=== stats/download===
+
=== stats/download=== <!--T:38-->
  
https://testnet.explore.veriblock.org/api/stats/download
+
<!--T:39-->
 +
https://explore.veriblock.org/api/stats/download
  
 +
<!--T:40-->
 
Note that "mirror1" acts as a placeholder, and there is also mirror2 and mirror3.
 
Note that "mirror1" acts as a placeholder, and there is also mirror2 and mirror3.
  
 +
<!--T:41-->
 
<pre>
 
<pre>
 
{
 
{
Line 288: Line 319:
 
</pre>
 
</pre>
  
=== stats/summary ===
+
=== stats/summary === <!--T:42-->
  
https://testnet.explore.veriblock.org/api/stats/summary
+
<!--T:43-->
 +
https://explore.veriblock.org/api/stats/summary
  
 +
<!--T:44-->
 
Provides summary stats such as Circulating Supply, Average Pop/sec, etc...
 
Provides summary stats such as Circulating Supply, Average Pop/sec, etc...
  
 
+
<!--T:45-->
 
<pre>
 
<pre>
 
{
 
{
   "lastUpdated": 1545344296,
+
   "lastUpdated": 1545423078,
 
   "supply": {
 
   "supply": {
     "circulatingSupply": "37631790.02412736",
+
     "circulatingSupply": "37862879.92187944",
 
     "maxSupply": "2100000000",
 
     "maxSupply": "2100000000",
     "totalPowAfterBlock1": "11862243.75000000",
+
     "totalPowAfterBlock1": "11975643.75000000",
     "totalPopAfterBlock1": "11864430.65710838",
+
     "totalPopAfterBlock1": "11982120.55486046",
 
     "totalReflectedInBlock1": "13905115.61701898"
 
     "totalReflectedInBlock1": "13905115.61701898"
 
   },
 
   },
 
   "pop": {
 
   "pop": {
     "avgPopPerVbkBlock": "14.06180556",
+
     "avgPopTxPerVbkBlock_last1day": 9.17,
     "avgEndorsementsPerVbkBlockKeystone": "34.17482517",
+
    "avgEndorsementsPerVbk_last1day": 9.52,
     "avgEndorsementsPerVbkBlockNotKeystone": "14.13695911"
+
    "avgEndorsementsPerVbkBlockKeystone_last1day": 23.31,
 +
     "avgEndorsementsPerVbkBlockNotKeystone_last1day": 8.76,
 +
    "totalPopTxCount_last1day": 26833,
 +
     "totalBtxTxCount_last1day": 324447,
 +
    "popPercentTxCount_last1day": 8.27
 
   }
 
   }
 
}
 
}
 
</pre>
 
</pre>
  
 +
<!--T:46-->
 
Note that per circulating supply, the first block reflects totals from the previous testnet phase. Therefore supply is divided into 3 groups:
 
Note that per circulating supply, the first block reflects totals from the previous testnet phase. Therefore supply is divided into 3 groups:
  
 +
<!--T:47-->
 
* First block --> reflects all coinage from previous testnet phase, which combines both PoW and PoP together
 
* First block --> reflects all coinage from previous testnet phase, which combines both PoW and PoP together
 
* After first block --> PoP
 
* After first block --> PoP
 
* After first block --> PoW
 
* After first block --> PoW
  
 +
<!--T:48-->
 
PoP stats look at the last 24 hours.
 
PoP stats look at the last 24 hours.
  
=== stats/pools ===
 
  
https://testnet.explore.veriblock.org/api/stats/pools
+
=== stats/node_count_per_day===
 +
 
 +
https://explore.veriblock.org/api/stats/node_count_per_day
 +
 
 +
<pre>
 +
[
 +
  {
 +
    "date": "2021-09-02",
 +
    "count": 6
 +
  },
 +
  {
 +
    "date": "2021-09-01",
 +
    "count": 10
 +
  },
 +
  {
 +
    "date": "2021-08-31",
 +
    "count": 36
 +
  },
 +
  ...
 +
]
 +
</pre>
 +
 
 +
=== stats/pools === <!--T:49-->
 +
 
 +
NOTE: Can see community pools here: https://miningpoolstats.stream/veriblock (3rd party site)
 +
 
 +
<!--T:50-->
 +
https://explore.veriblock.org/api/stats/pools
 +
 
 +
<!--T:51-->
 +
Developer Pool
  
Provides list of known community pools
 
  
 +
<!--T:52-->
 
Also checks IP and merges with geo-data  
 
Also checks IP and merges with geo-data  
  
 +
<!--T:53-->
 
<pre>
 
<pre>
  
 +
<!--T:54-->
 
{
 
{
 
   "lastUpdated": 1545411350,
 
   "lastUpdated": 1545411350,
Line 361: Line 432:
 
   ]
 
   ]
 
}
 
}
 +
</pre>
 +
 +
== Altchain ==
 +
 +
=== altchain/summary ===
 +
 +
https://explore.veriblock.org/api/altchain/summary
 +
 +
<pre>
 +
[
 +
  {
 +
    "altchainId": "252980111103",
 +
    "name": "Bitcoin Squared",
 +
    "symbol": "BTCSQ",
 +
    "maxContainingVbkBlockheight": 2930516,
 +
    "vbkBlockTimestamp": "1644266151"
 +
  },
 +
  ...
 +
]
 +
</pre>
 +
 +
=== altchain/<id>/transactions ===
 +
 +
https://explore.veriblock.org/api/altchain/252980111103/transactions?count=50
 +
 +
<pre>
 +
[
 +
  {
 +
    "vbkBlockNumber": 2930522,
 +
    "vbkBlockHash": "000000000461F96340823111D4F75EAE9C77AF5B21384117",
 +
    "vbkTxId": "59E3170BC33A3B5A690EB76238CA25F72F9FE012E8F4399B7A0B0E5F46FC1640",
 +
    "altchainBlockHash": "",
 +
    "altchainEndorsedBlockHash": "",
 +
    "altchainEndorsedBlockHeight": 0,
 +
    "vbkBlockTimestamp": "1644266313"
 +
  },
 +
  ...
 +
]
 +
</pre>
 +
 +
 +
</translate>

Latest revision as of 20:41, 7 February 2022

Other languages:


See: Main_Page, API

Overview

These are some of the public APIs used by the dashboard to retrieve data.

https://explore.veriblock.org

These are still in Testnet, and may change.

Block

block/<height>

https://explore.veriblock.org/api/block/23731

Returns same output as: block/<hash>

block/<hash>

https://explore.veriblock.org/api/block/00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B

{
   "coinbaseTransaction":{
      "txId":"56FADC13E5358B308190A7FEF195E4AE4E94A2A61602A17153A7610B166430E7",
      "poWCoinbaseAmount":"3500000000",
      "poPCoinbaseAmount":"0",
      "poWFeeShare":"0",
      "poPFeeShare":"1",
      "poWOutputs":[
         {
            "address":"V8dy5tWcP7y36kxiJwxKPKUrWAJbjs",
            "amount":"3500000000"
         }
      ],
      "poPOutputs":[

      ]
   },
   "extraNonce":"1000000",
   "number":23731,
   "timestamp":1523471236,
   "hash":"00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B",
   "previousHash":"00000001729191297AEB9CB938DE9EC887B93A720DE10D78",
   "difficulty":73356734,
   "winningNonce":424815302,
   "transactionCount":1,
   "poPTransactionCount":6,
   "fees":"1",
   "poWCoinbaseReward":"3500000000",
   "poPCoinbaseReward":"0",
   "coinbaseReward":"3500000000",
   "size":61,
   "ledgerHash":"2C52EAAED1675B9627F584C8E290A026AAD5AB69529E421B",
   "minerComment":"Default NodeCore Pool Software"
}

--

block?count=N

https://explore.veriblock.org/api/block?count=3

[
   {
      "number":30008,
      "timestamp":1525202495,
      "hash":"00000011528B98032F9AEC7E2D8185855A7F6E42BBDCF634",
      "previousHash":"00000000687DF0843C4935466516B2CB2B5BE1C716423619",
      "difficulty":68038033,
      "winningNonce":1520483838,
      "transactionCount":1,
      "poPTransactionCount":0,
      "fees":"1",
      "poWCoinbaseReward":"3500000000",
      "poPCoinbaseReward":"0",
      "coinbaseReward":"3500000000",
      "size":61,
      "ledgerHash":"F45C0EE48C87FCDE139F7637D92EB2B80EE4C816EA461A62",
      "minerComment":"Default NodeCore Pool Software"
   },
   {
      "number":30007,
      "timestamp":1525202401,
      "hash":"00000000687DF0843C4935466516B2CB2B5BE1C716423619",
      "previousHash":"0000000040823C53285580CF2A98A38ED1454A6B25686B80",
      "difficulty":68038033,
      "winningNonce":-1117829961,
      "transactionCount":1,
      "poPTransactionCount":0,
      "fees":"1",
      "poWCoinbaseReward":"3500000000",
      "poPCoinbaseReward":"0",
      "coinbaseReward":"3500000000",
      "size":61,
      "ledgerHash":"2E7FD03953299272B08E3565827E245ECBC982E912ABDBB1",
      "minerComment":"Default NodeCore Pool Software"
   },
   {
      "number":30006,
      "timestamp":1525202368,
      "hash":"0000000040823C53285580CF2A98A38ED1454A6B25686B80",
      "previousHash":"000000009071102F01E46BE606674B2EE642EFDB7A5CF21A",
      "difficulty":68038033,
      "winningNonce":-1540725286,
      "transactionCount":1,
      "poPTransactionCount":0,
      "fees":"1",
      "poWCoinbaseReward":"3500000000",
      "poPCoinbaseReward":"0",
      "coinbaseReward":"3500000000",
      "size":61,
      "ledgerHash":"D1148AFDB81421DAC904DBA5B0CF45781C39F932CBC623FE",
      "minerComment":"Default NodeCore Pool Software"
   }
]


block/<height>/transactions

https://explore.veriblock.org/api/block/29995/transactions

[
   {
      "timestamp":1525201652,
      "signedState":"Signed",
      "type":"Standard",
      "sourceAddress":"V7aFSJpHHpbfsVTQPuYbDeL97A5aik",
      "sourceAmount":"3500000000",
      "outputs":[
         {
            "address":"VDd3rkzM4GLEvdYuHftQNx3dSDS22s",
            "amount":"3499999999"
         }
      ],
      "transactionFee":"1",
      "merklePath":"",
      "size":61,
      "txId":"16CCBF1D4E84BE4FEB3812E2493B9F1079F16D92DBBFD59A960F83C803E89447",
      "blockHash":"00000000B096AF506FE36A2679A1A8452C72B4A718C7FAE8"
   }
]

Address

address/<id>

https://explore.veriblock.org/api/address/V7aFSJpHHpbfsVTQPuYbDeL97A5aik

{  
   "address":"V7aFSJpHHpbfsVTQPuYbDeL97A5aik",
   "balance":"17500000006",
   "blocksMined":"2142",
   "transactionCount":2137,
   "poPTransactionCount":0
}

Transaction

tx/<TxId>

https://explore.veriblock.org/api/tx/771CE6D2B1BCEB4FBDC1A9BBFA7EBDD78A5E8AFEAAF87A96C301407566F6E73B

{
   "txId":"771CE6D2B1BCEB4FBDC1A9BBFA7EBDD78A5E8AFEAAF87A96C301407566F6E73B",
   "blockNumber":29998,
   "blockHash":"000000115757C1BA2C357E9E1015F69A613765B88B40AC62",
   "timestamp":1525201752,
   "signatureState":"Signed",
   "type":"Standard",
   "sourceAddress":"V7aFSJpHHpbfsVTQPuYbDeL97A5aik",
   "sourceAmount":"3500000000",
   "outputs":[
      {
         "address":"VDd3rkzM4GLEvdYuHftQNx3dSDS22s",
         "amount":"3499999999"
      }
   ],
   "transactionFee":"1",
   "data":"",
   "bitcoinTransaction":"",
   "endorsedBlockHeader":"",
   "merklePath":"",
   "size":61
}

Stats

stats/banner

Contains the banner message. If type=warning or critical, then something is not ideal.

https://explore.veriblock.org/api/stats/banner

{
  "type": "warning",
  "icon": "icon-exclamation",
  "title": "BlockExplorer cache is behind",
  "subtitle": "New blocks and transactions may not show up, balances may not reflect more recent transactions"
}


stats/network

https://explore.veriblock.org/api/stats/network

{  
   "lastBlock":{  
      "hash":"00000004D1C58D4CA8B97C7A02F7D0C76ED685AFED0969E0",
      "height":30015,
      "time":1525202800
   },
   "lastBtcBlock":{  
      "hash":"",
      "height":-1,
      "time":-1
   },
   "hashRate":3756787,
   "difficulty":"68038033",
   "blockTimes":[  
      42,
      40,
      29,
      66,
      47,
      57,
      15,
      185,
      116,
      75,
      28,
      33,
      94,
      10,
      118,
      65,
      22,
      54,
      4,
      32
   ],
   "blockPopTxs":[  

   ],
   "totalPopTxs":0,
   "totalPopTxPerBlock":0,
   "txSec":0.014654348518636508,
   "blocksizeAvg":"57.3 B",
   "feeByte":"0.02",
   "popBlock":0,
   "bitcoinUse":0,
   "payoutPop":"0 V$"
}

stats/download

https://explore.veriblock.org/api/stats/download

Note that "mirror1" acts as a placeholder, and there is also mirror2 and mirror3.

{
  "nodecore_all_zip": "https://github.com/VeriBlock/nodecore-releases/releases/download/v0.3.9/veriblock-nodecore-all-0.3.9.zip",
  "nodecore_all_tar": "https://github.com/VeriBlock/nodecore-releases/releases/download/v0.3.9/veriblock-nodecore-all-0.3.9.tar",
  "bootstrapfile_zip":  "http://mirror1.veriblock.org/nodecore-bootstrap-229000.zip",
  "bootstrapfile_tar":  "http://mirror1.veriblock.org/nodecore-bootstrap-229000.tar.gz",
  "gpu_miner_linux_zip": "https://github.com/VeriBlock/nodecore-pow-cuda-miner/releases/download/v0.3.7/nodecore-pow-cuda-miner-linux-0.3.7.zip",
  "gpu_miner_linux_tar": "https://github.com/VeriBlock/nodecore-pow-cuda-miner/releases/download/v0.3.7/nodecore-pow-cuda-miner-linux-0.3.7.tar",
  "gpu_miner_windows_zip": "https://github.com/VeriBlock/nodecore-pow-cuda-miner/releases/download/v0.3.7/nodecore-pow-cuda-miner-windows-0.3.7-cuda-9.2.zip"
}

stats/summary

https://explore.veriblock.org/api/stats/summary

Provides summary stats such as Circulating Supply, Average Pop/sec, etc...

{
  "lastUpdated": 1545423078,
  "supply": {
    "circulatingSupply": "37862879.92187944",
    "maxSupply": "2100000000",
    "totalPowAfterBlock1": "11975643.75000000",
    "totalPopAfterBlock1": "11982120.55486046",
    "totalReflectedInBlock1": "13905115.61701898"
  },
  "pop": {
    "avgPopTxPerVbkBlock_last1day": 9.17,
    "avgEndorsementsPerVbk_last1day": 9.52,
    "avgEndorsementsPerVbkBlockKeystone_last1day": 23.31,
    "avgEndorsementsPerVbkBlockNotKeystone_last1day": 8.76,
    "totalPopTxCount_last1day": 26833,
    "totalBtxTxCount_last1day": 324447,
    "popPercentTxCount_last1day": 8.27
  }
}

Note that per circulating supply, the first block reflects totals from the previous testnet phase. Therefore supply is divided into 3 groups:

  • First block --> reflects all coinage from previous testnet phase, which combines both PoW and PoP together
  • After first block --> PoP
  • After first block --> PoW

PoP stats look at the last 24 hours.


stats/node_count_per_day

https://explore.veriblock.org/api/stats/node_count_per_day

[
  {
    "date": "2021-09-02",
    "count": 6
  },
  {
    "date": "2021-09-01",
    "count": 10
  },
  {
    "date": "2021-08-31",
    "count": 36
  },
  ...
]

stats/pools

NOTE: Can see community pools here: https://miningpoolstats.stream/veriblock (3rd party site)

https://explore.veriblock.org/api/stats/pools

Developer Pool


Also checks IP and merges with geo-data


{
  "lastUpdated": 1545411350,
  "message": "This data is provided by each pool's public web page.",
  "highestBlockchainHeight": 273355,
  "pools": [
    {
      "poolName": "Name here",
      "poolUrl": "http://url-here:8500",
      "isPoolUp": true,
      "poolMiningBlock": 273356,
      "blockchainHeight": 273355,
      "isMiningOnTopBlock": true,
      "miningOnTopOfBlockHash": "000000000000E171601C94453AFB779F5FFE0EB896A4A56F",
      "gapFromBestBlock": 0,
      "fee": 1.0,
      "network": "TestNet",
      "recentHashRate": "156591112095",
      "uptimeHours": 539,
      "poolType": "GPU",
      "appVersion": "0.3.9-rc.9",
      "appVersionSortable": "3009",
      "lastUpdatedNMinutesAgo": 0,
      "ipAddress": "IP-here",
      "geoLongitude": 116.3889,
      "geoLatitude": 39.9288,
      "geoCity": "City-here",
      "geoCounty": "Country-here"
    }
  ]
}

Altchain

altchain/summary

https://explore.veriblock.org/api/altchain/summary

[
  {
    "altchainId": "252980111103",
    "name": "Bitcoin Squared",
    "symbol": "BTCSQ",
    "maxContainingVbkBlockheight": 2930516,
    "vbkBlockTimestamp": "1644266151"
  },
  ...
]

altchain/<id>/transactions

https://explore.veriblock.org/api/altchain/252980111103/transactions?count=50

[
  {
    "vbkBlockNumber": 2930522,
    "vbkBlockHash": "000000000461F96340823111D4F75EAE9C77AF5B21384117",
    "vbkTxId": "59E3170BC33A3B5A690EB76238CA25F72F9FE012E8F4399B7A0B0E5F46FC1640",
    "altchainBlockHash": "",
    "altchainEndorsedBlockHash": "",
    "altchainEndorsedBlockHeight": 0,
    "vbkBlockTimestamp": "1644266313"
  },
  ...
]