On this page you will find description of all REST API services provided by the REST Web Service application of tychexplore. Some of them are
Each of these methods are explained below
Returns 30 data samples for plotting difficulty graph in tychexplore at regular interval between height 0 and top block height.
Method | Request Method | Parameter | Sample Request |
---|---|---|---|
getGraphData | GET |
‘http://explorer.tychecash.net/restapi/getGraphData’ |
Sample Response
{“id”:“self”,“blockHeaders”:[{“timestamp”:“1518206850”,“orphan_status”:“false”,“minor_version”:“0”,“height”:1712,“reward”:“303189.24102237”,
“nonce”:“68313”,“hash”:“b31689afa06daf1127ace559ffa28b836c2167f901a43fc1a69b51e34396b78c”,“major_version”:“1”,
“difficulty”:“701432”,“depth”:“49657”,“prev_hash”:“e26676ddf28f4f0b7428a24149c14f044aed15eebdfcb7b1db83444f8737f351”},
?
],“jsonrpc”:“2.0”,“status”:“SUCCESS”}
Block Search either by hash or height. Requires request parameter query as key
Method | Request Method | Parameter | Sample Request |
---|---|---|---|
getBlockBySearch | GET |
query | ‘http://explorer.tychecash.net/restapi/getBlockBySearch?query=51362’ |
Sample Response
{“id”:“self”,“result”:{“status”:“OK”,“block_header”:{“timestamp”:“1525343190”,“orphan_status”:“false”,“minor_version”:“0”,“height”:51362,“reward”:“250875.57219056”,
“nonce”:“1104312160”,“hash”:“4f725d3240fcd304318ecb11ca752bfc5e427387595856f94f65a61de2ff0ddc”,“major_version”:“1”,
“difficulty”:“36143646”,“depth”:“11”,“prev_hash”:“93ee3d85ef608a7c666deeab35763c78071f39c1023ba3d0619f08b4b5fdfe58”}},“jsonrpc”:“2.0”}
Method | Request Method | Parameter | Sample Request |
---|---|---|---|
getBlockBySearch | GET |
query | ‘http://explorer.tychecash.net/restapi/getBlockBySearch?query=e26676ddf28f4f0b7428a24149c14f044aed15eebdfcb7b1db83444f8737f351’ |
Sample Response
{“id”:“self”,“result”:{“status”:“OK”,“block_header”:{“timestamp”:“1518206844”,“orphan_status”:“false”,“minor_version”:“0”,“height”:1711,“reward”:“303190.39760195”,
“nonce”:“50334315”,“hash”:“e26676ddf28f4f0b7428a24149c14f044aed15eebdfcb7b1db83444f8737f351”,“major_version”:“1”,
“difficulty”:“697657”,“depth”:“49663”,“prev_hash”:“a823cdfc8e2fffb0513020169599e31ec22835b9976420721fd19637f480f932”}},“jsonrpc”:“2.0”}
Returns recent n blocks in descending order of height, usually used to display recently mined blocks in table . Parameters are filterslength defaults to 0, pagenum is used in logic (lastblockheight - (pagesize* pageNumber)) - i internally to get relative next set of blocks where pagesize is number of blocks to be displayed in current page.
Method | Request Method | Parameter | Sample Request |
---|---|---|---|
getGraphData | GET |
filterslength,pagenum,pagesize | ‘http://explorer.tychecash.net/restapi/getRecentBlocks?filterslength=0&pagenum=1&pagesize=10’ |
Sample Response
{“id”:“self”,“blockHeaders”:[{“timestamp”:“1525345669”,“orphan_status”:“false”,“minor_version”:“0”,“height”:51375,“reward”:“250863.13128864”,
“nonce”:“2684453221”,“hash”:“5f8bc9dc24352a9558ab1e71db907c2041ca67893f7279d13bad77c9ce4b9063”,“major_version”:“1”,
“difficulty”:“35746593”,“depth”:“10”,“prev_hash”:“0e1c8c8ca5a3dc3187ac7eedd3af66e25fd743c13bdcb3a08c7962224f937ffb”},
?
],“jsonrpc”:“2.0”,“status”:“SUCCESS”}
Returns the top most block height or the current blockchain height.
Method | Request Method | Parameter | Sample Request |
---|---|---|---|
getTotalPages | GET |
‘http://explorer.tychecash.net/restapi/getTotalPages’ |
Sample Response
51389
Returns the total mined coins in tychecash network, both numeric and word format is available in response json. Word format is rounded to integer part alone whereas numeric part is available to 8 decimal places.
Method | Request Method | Parameter | Sample Request |
---|---|---|---|
getTotalPages | GET |
‘http://explorer.tychecash.net/restapi/totalMinedCoins’ |
Sample Response
{“inWords”:“fourteen billion two hundred forty two million sixty thousand four hundred sixty six”,“totalCoins”:“14242060465.43596548”}