Developer's API guide
Overview
Dactual provides a simple and powerful REST API to allow you to get our enriched blockchain data.
All requests use the application/json content type and go over https. The base
url is https://dactual.com/api/{version}/.
Requests
All requests must contain a Content-Type and Accept header with a value of application/json.
Responses are application/json content type and follow typical HTTP response status codes for success and failure.
Authentication
All our private API requests require an Authorization header with an API key like:
Authorization: apiKey {your API key}
Public resources
api/v1/guldensupply.php
Returns information about the supply of Gulden.
Request
https://dactual.com/api/v1/guldensupply.php
Arguments
None
Example
curl "https://dactual.com/api/v1/guldensupply.php"
-X GET
-H 'Content-Type: application/json'
-H 'Accept: application/json'
Returns response in JSON format
{
"success": true,
"message": "",
"result": {
"totalGulden": "473926339",
"totalPremine": "62000000",
"totalWitness": "57376091",
"totalCirculation": "411926339"
}
}
api/v1/witnessinfo.php
Returns general witness information.
Request
https://dactual.com/api/v1/witnessinfo.php
Arguments
None
Example
curl "https://dactual.com/api/v1/witnessinfo.php"
-X GET
-H 'Content-Type: application/json'
-H 'Accept: application/json'
Returns response in JSON format
{
"success": true,
"message": "",
"result": {
"totalAccounts": "791",
"inactiveAccounts": "4",
"totalAmountLocked": "58012774",
"totalWeight": "317288783"
"totalWeightAdjusted": "180788795"
}
}
Private resources
api/v1/witnessaccountinfo
Used to retrieve witness account information.
Request
https://dactual.com/api/v1/witnessaccountinfo.php
Arguments
address
String
Required
A witness address
Example
curl "https://dactual.com/api/v1/witnessaccountinfo.php"
-X POST
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: apiKey yourapikey'
-d ' {
"address": "2oUioP56Yhjpay7UvmMnkA91otLq54KN9DR4cg"
} '
Returns response in JSON format
{
"success": true,
"message": "",
"result": {
"witnessAddress": "2oUioP56Yhjpay7UvmMnkA91otLq54KN9DR4cg",
"numberOfRewards": 65,
"amountLocked": 400000,
"createdTime": 1532074030,
"lockUntilTime": 1539929188,
"weight": 2493150,
"lockFromBlock": 778189,
"lockUntilBlock": 830028,
"status": "Cooldown",
"lastRewardBlock": 788475,
"lastRewardTime": 1533696810,
"yearlyIntrest": 6.59
}
}
api/v1/multiplewitnessaccountinfo
Used to retrieve witness account information of multiple witness accounts.
Request
https://dactual.com/api/v1/multiplewitnessaccountinfo.php
Arguments
addresses
Array
Required
One or more witness addresses
Example
curl "https://dactual.com/api/v1/multiplewitnessaccountinfo.php"
-X POST
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: apiKey yourapikey'
-d ' {
"addresses": [
"2oUioP56Yhjpay7UvmMnkA91otLq54KN9DR4cg", "2A91oP56Yhjpay7UvmMnkA91otLq54KN9DR4hj", "29DR4P56Yhjpay7UvmMnkA91otLq54KN9DR491"
]
} '
Returns response in JSON format
{
"success": true,
"message": "",
"result": [
{
"witnessAddress": "2oUioP56Yhjpay7UvmMnkA91otLq54KN9DR4cg",
"numberOfRewards": 65,
"amountLocked": 400000,
"createdTime": 1532074030,
"lockUntilTime": 1539929188,
"weight": 2493150,
"lockFromBlock": 778189,
"lockUntilBlock": 830028,
"status": "Cooldown",
"lastRewardBlock": 788475,
"lastRewardTime": 1533696810,
"yearlyIntrest": 6.59
}, ...
]
}
api/v1/allwitnessaccountinfo
Used to retrieve witness account information of all active witness accounts.
Request
https://dactual.com/api/v1/allwitnessaccountsinfo.php
Arguments
None
Example
curl "https://dactual.com/api/v1/allwitnessaccountsinfo.php"
-X GET
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: apiKey yourapikey'
Returns response in JSON format
{
"success": true,
"message": "",
"result": [
{
"witnessAddress": "2oUioP56Yhjpay7UvmMnkA91otLq54KN9DR4cg",
"numberOfRewards": 65,
"amountLocked": 400000,
"createdTime": 1532074030,
"lockUntilTime": 1539929188,
"weight": 2493150,
"lockFromBlock": 778189,
"lockUntilBlock": 830028,
"status": "Cooldown",
"lastRewardBlock": 788475,
"lastRewardTime": 1533696810,
"yearlyIntrest": 6.59
}, ...
]
}
api/v1/witnessabsentinfo
Used to retrieve information about absent witness accounts of the last 24 hours.
Request
https://dactual.com/api/v1/witnessabsentinfo.php
Arguments
None
Example
curl "https://dactual.com/api/v1/witnessabsentinfo.php"
-X GET
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: apiKey yourapikey'
Returns response in JSON format
{
"success": true,
"message": "",
"result": [
{
"timestamp": 1536689887,
"witnessAddress": "2oUioP56Yhjpay7UvmMnkA91otLq54KN9DR4cg",
"delay": 210,
"orphaned": true
},
{
"timestamp": 1536686896,
"witnessAddress": "2pMvyPpxuj6Pe7nAGvsmVYnuchsof2Qj7Br2oSs",
"delay": 40,
"orphaned": true
}, ...
]
}