Skip to main content

QRL API - Explorer

The QRL block explorer has been built with an API endpoint to enable an easy way for developers to grab data from the QRL blockchain. This endpoint is limited in scope and may change in future iterations of the explorer.

info

The Explorer API queries the explorer node infrastructure and returns a response in either JSON or text. This is intended to simplify the process of developing tools for the QRL.

The Explore endpoint is reached at explorer.theQRL.org. The API response can be either text or json depending on the developers needs. By default JSON is returned, simply append /text to the API query.

Far an easy to read output use a browser add-on like Chrome's jsonview and browse to the endpoint.

Explorer API Methods

info

Default response is in JSON format Append /text to the end of most requests to get a simple text response https://explorer.theqrl.org/api/{REQUEST}/text

Method NameEndpointDescription
Block/api/block/#Get data from a specific block number
Transaction /api/tx/Get data from a transaction by number
Address/api/a/Get data from an address
Emission/api/emissionGet the total emission of coins to date
Emission Text/api/emission/textGet the total emission of coins to date in text format
Reward/api/rewardGet the current payout reward value
Reward Text/api/reward/textGet the current payout reward value returned in text format
Rewardshor/api/rewardshorGet the current reward in shor
Rewardshor Text/api/rewardshor/textGet the current reward in shor in text format
Blockheight/api/blockheightGet the current blockheight
Blockheight Text/api/blockheight/textGet the current blockheight in text format
Status/api/statusGet the status of the network
Miningstats/api/miningstatsGet the mining status of the network

Block By Number

Get any block details by block number.

Request

ParameterDescription
blockBlock Number

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonBlock Details in JSON Response
info

/api/block/ requests will only return in JSON format. Parse the response using json tools in a language of your choice.

cURL Example

curl -XGET https://explorer.theqrl.org/api/block/34556

Python Example

def getblockByNumber(block_number):
import requests
import json
request = requests.get('https://explorer.theqrl.org/api/block/'+block_number)
response = request.text
getBlockResp = json.loads(response)
jsonResponse = getBlockResp
return(jsonResponse)

print(getblockByNumber("34556"))

Transaction By Hash

Get data from a transaction by number

Request

ParameterDescription
transactionTransaction Hash

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonTransaction Details in JSON Response
info

/api/tx/ requests will only return in JSON format. Parse the response using json tools in a language of your choice.

cURL Example

curl -XGET https://explorer.theqrl.org/api/tx/c9656d989bce2000c794314b73882b0ebb99fa1fe58e7a466a8a64e7b851a4c6

Python Example

def getTransactionByHash(tx_hash):
import requests
import json
request = requests.get('https://explorer.theqrl.org/api/tx/'+tx_hash)
response = request.text
getTXResp = json.loads(response)
jsonResponse = getTXResp
return(jsonResponse)

print(getTransactionByHash("c9656d989bce2000c794314b73882b0ebb99fa1fe58e7a466a8a64e7b851a4c6"))

Address

Get address data by number.

Request

ParameterDescription
addressQRL Address

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonAddress Details in JSON Response
info

/api/a/ requests will only return in JSON format. Parse the response using json tools in a language of your choice.

cURL Example

curl -XGET https://explorer.theqrl.org/api/a/Q01040007a591a62c23ed27adfe3df8eb812ee5e4b73e47fb8471e8d78ecd9b4cadc325ca36d86e

Python Example

def getAddress(address):
import requests
import json
request = requests.get('https://explorer.theqrl.org/api/a/'+address)
response = request.text
getAddressResp = json.loads(response)
jsonResponse = getAddressResp
return(jsonResponse)

print(getAddress("Q01040007a591a62c23ed27adfe3df8eb812ee5e4b73e47fb8471e8d78ecd9b4cadc325ca36d86e"))

Emission

Get the total QRL emission to date.

Request

ParameterDescription
emissionemission request

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonEmission Details in JSON Response
info

/api/emission requests can return both JSON format as well as simple text.

cURL Example

curl -XGET https://explorer.theqrl.org/api/emission

Python Example

def getEmission():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/emission")
response = request.text
getEmissionResp = json.loads(response)
jsonResponse = getEmissionResp
return(jsonResponse)


print(getEmission())

Emission Text

This request will return emissions data in a textual output.

Text Request

ParameterDescription
emission/textemission text request

Text Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
textEmission Details in simple TEXT Response

cURL Example

curl -XGET https://explorer.theqrl.org/api/emission/text

Python Example

def getEmissionText():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/emission/text")
response = request.text
getEmissionResp = json.loads(response)
jsonResponse = getEmissionResp
return(jsonResponse)


print(getEmissionText())

Reward

Get the current reward amount.

Request

ParameterDescription
rewardReward Request

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonCurrent reward Details in JSON Response
info

/api/reward requests can return both JSON format as well as simple text.

cURL Example

curl -XGET https://explorer.theqrl.org/api/reward

Python Example

def getReward():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/reward")
response = request.text
getRewardResp = json.loads(response)
jsonResponse = getRewardResp
return(jsonResponse)


print(getReward())

Reward Text

This request will return text output for the reward response.

Text Request

ParameterDescription
reward/textreward text request

Text Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
textEmission Details in simple TEXT Response

cURL Example

curl -XGET https://explorer.theqrl.org/api/reward/text

Python Example

def getRewardText():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/reward/text")
response = request.text
getRewardTextResp = json.loads(response)
jsonResponse = getRewardTextResp
return(jsonResponse)


print(getRewardText())

RewardShor

Get the current reward amount in shor.

Request

ParameterDescription
rewardshorrewardshor request

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonReward Details in shor JSON Response
info

/api/rewardshor requests can return both JSON format as well as simple text.

cURL Example

curl -XGET https://explorer.theqrl.org/api/rewardshor

Python Example

def getRewardShor():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/rewardshor")
response = request.text
getRewardShorResp = json.loads(response)
jsonResponse = getRewardShorResp
return(jsonResponse)


print(getRewardShor())

RewardShor Text

This request will return text output of reward info in shor.

Text Request

ParameterDescription
rewardshor/textrewardshor text request

Text Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
textrewardshor Details in simple TEXT Response

cURL Example

curl -XGET https://explorer.theqrl.org/api/rewardshor/text

Python Example

def getRewardShorText():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/rewardshor/text")
response = request.text
getRewardShorTextResp = json.loads(response)
jsonResponse = getRewardShorTextResp
return(jsonResponse)


print(getRewardShorText())

Blockheight

Get the current Blockheight.

Request

ParameterDescription
blockheightblockheight Request

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonBlockheight Details in JSON Response
info

/api/blockheight requests can return both JSON format as well as simple text.

cURL Example

curl -XGET https://explorer.theqrl.org/api/blockheight

Python Example

def getBlockheight():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/blockheight")
response = request.text
getBlockheightResp = json.loads(response)
jsonResponse = getBlockheightResp
return(jsonResponse)


print(getBlockheight())

Blockheight Text

This request will return text output for the current Blockheight.

Text Request

ParameterDescription
blockheight/textrewardshor text request

Text Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
textblockheight Details in simple TEXT Response

cURL Example

curl -XGET https://explorer.theqrl.org/api/blockheight/text

Python Example

def getBlockheightText():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/blockheight/text")
response = request.text
getBlockheightTextResp = json.loads(response)
jsonResponse = getBlockheightTextResp
return(jsonResponse)

print(getBlockheightText())

Network Status

Get status of the blockchain including node details.

Request

ParameterDescription
statusNetwork status

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonstatus Details in JSON Response
info

/api/status requests will only return in JSON format. Parse the response using json tools in a language of your choice.

cURL Example

curl -XGET https://explorer.theqrl.org/api/status

Python Example

def getStatus():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/status")
response = request.text
getStatusResp = json.loads(response)
jsonResponse = getStatusResp
#return(jsonResponse)
return(json.dumps(jsonResponse, indent=4, sort_keys=True))


print(getStatus())

Miningstats

Get the mining status information for the current QRL block.

Request

ParameterDescription
miningstatsNetwork status

Response

ParameterDescription
codeError Code. Only appears if any exception is triggered.
jsonstatus Details in JSON Response
info

/api/miningstats requests will only return in JSON format. Parse the response using json tools in a language of your choice.

cURL Example

curl -XGET https://explorer.theqrl.org/api/miningstats

Python Example

def getMiningStats():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/miningstats")
response = request.text
getStatusResp = json.loads(response)
jsonResponse = getStatusResp
return(json.dumps(jsonResponse, indent=4, sort_keys=True))


print(getMiningStats())