HOW TO USE THE BLOC-EXPLORER API

Learn about the BLOC API Documentation


To invoke an API method, use GET request with params separated by slashs. The first param should be the method to invoke. The response is issue in JSON.

API ENDPOINT
https://bloc-explorer.com/api
URL Request Format
https://bloc-explorer.com/api/{method}/{param1}/{param2}



This method does not need any params it will retrieve all the "NOW" informations that are currently available inside the API

Request Example ON GET INFO
https://bloc-explorer.com/api/info
{
	"alt_blocks_count":0,
	"difficulty":6,
	"grey_peerlist_size":1,
	"height":250,
	"incoming_connections_count":4,
	"last_known_block_index":249,
	"outgoing_connections_count":3,
	"status":"OK",
	"tx_count":71,
	"tx_pool_size":0,
	"white_peerlist_size":7	
}


This is an example error that the API returns when something went wrong, you will get an message of what`s really wrong.

Request ERROR Example

{
	"error":
	{
		"code":-32603,
		"message":"JsonValue type is not STRING"
	},
	"id":false,
	"jsonrpc":"2.0"
}


API METHODS VARIANTS

API METHODS VARIANTS

This API request, will return the info server of the pool See results

https://bloc-explorer.com/api/info

This API request, get total coins return already generated coins. See results

https://bloc-explorer.com/api/total_coins

This API request, get last block details from the Block Chain Coin Explorer. See results

https://bloc-explorer.com/api/last_block

This API request, get pools stats in the Block Chain Coin Explorer. See results

https://bloc-explorer.com/api/stats

This API request, will return last 30 blocks See results

https://bloc-explorer.com/api/blocks

This API request, accepts only one parameter {HEIGHT} for the get functions. that returns the last 30 blocks from the height specified. See results

https://bloc-explorer.com/api/blocks/{HEIGHT}

This API request, required parameter {HASH} or {HEIGHT} and it will return full informations about a block See results

https://bloc-explorer.com/api/block/{HASH} or {HEIGHT}

This API request, required parameter {TRANSACTION} and it will return full informations about a transaction See results

https://bloc-explorer.com/api/transaction/{TRANSACTION}

This API request, required parameter {HEIGHT} and it will return header block information See results

https://bloc-explorer.com/api/block_header/{HEIGHT}