Introduction
About the platform
ChainRider API is a cloud service for BTC and DASH blockchain management and exploration. We offer RESTful API services to enable other applications to easily and safely explore multiple blockchains. This includes receiving notifications of predefined events or transactions, customizing payment forwarding options, and other rich functionality for BTC and DASH payment processors. ChainRider supports cross-origin resource sharing (CORS), to allow for secure interactions within your application. Our services are often invaluable for distributed applications based on smart contracts. ChainRider integrates with the Ethereum smart contract oracle service, Oraclize, in order to ease the use of BTC and Dash as the digital currency of choice for settling smart contract transactions. This enables notarization of data obtained from the ChainRider API and use of payment forwarding, event detection and other ChainRider services for full confidence within your smart contracts.
Registration
Registration on the platform is straightforward and requires minimum effort from your side. You can register here and obtain a free token for testing the API. Once the registration form has been submitted you will receive a verification email. Please verify your email address in order to speed up the onboarding process and start using the APIs
Authentication
The ChainRider service uses web tokens for authentication. The token is passed as a parameter to all GET and DELETE requests. For all POST and PUT requests, token should be added in the request body.
The token could be obtained by signing up for an account at ChainRider.
The URL examples throughout this documentation use <token>
as a placeholder. For these examples to work, you need to substitute the value with your own access token.
API Resources and versions
All available resources follow the same URL pattern shown below:
https://api.chainrider.io/<API_VERSION>/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/
Currently, only v1
version of ChainRider API exists. Any future updates to the API which might implicate breaking API compatibility will result in introducing new API versions accordingly. The API versioning will ensure maintaining backwards compatibility with existing integrations.
Currently supported blockchains are provided within the table below:
Digital currency | Blockchain | Base URL |
---|---|---|
Dash | Main | https://api.chainrider.io/v1/dash/main |
Dash | Testnet | https://api.chainrider.io/v1/dash/testnet |
Token usage
The following API allows you to check current status of your web token including information about token usage on hourly and daily base. This API does not follow abovementioned URL pattern as the same token is used for all resources.
POST /v1/ratelimit/
Get token usage
Parameter | In | Type | Required | Description |
---|---|---|---|---|
token | body | String | True | Web token for which current rate limit and status is requested. |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TokenUsageObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/ratelimit/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/ratelimit/";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/ratelimit/',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/ratelimit/',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/ratelimit/',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/ratelimit/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}
Example response
{
"message":{
"hour":{
"usage":2,
"limit":300,
"time_left":1857
},
"day":{
"usage":2,
"limit":3000,
"time_left":34257
},
"forward":{
"usage":0,
"limit":3,
"time_left":1675857
}
}
}
Smart Contracts
Data and services provided by ChainRider are often invaluable for different distributed applications based on smart contracts. Below you can find more info on how ChainRider service could be used to feed smart contracts with data about addresses, transactions, payment forwards, etc from different blockchains.
Oraclize support
Chainrider supports API requests thru Oraclize service. This allows you to fetch any data provided by ChainRider APIs in your smart contract or create payment forwards from within the smart contract.
Important notice
In order to support TLSNotary Proof one needs to use https://api-dot-vizlorepaymentprocessor.appspot.com/v1/
instead of https://api.chainrider.io/v1/
domain in requests.
Oraclize POST example
For POST requests, one needs to make sure to add \n
prior to data payload which informs Oraclize to send data in application/json
format instead of application/x-www-form-urlencoded
format which is default one. GET requests could be send without any changes.
An example for creating a paymentforward with TLSNotary proof and fetch payment address could be found on the right side.
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | payment_address |
Code samples
oraclize_query(
"URL",
"json(https://api-dot-vizlorepaymentprocessor.appspot.com/v1/bitcoin/testnet/paymentforward).payment_address",
'\n{
"destination_address": "2MxAS7QfBDQspHxmY4g4i92tLNTPH4r2DTZ",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}'
);
# Result
mkN6PfXfF6b8dfBrRM9kyVu6zxqzTLXYZ5
<?php
oraclize_query(
"URL",
"json(https://api-dot-vizlorepaymentprocessor.appspot.com/v1/bitcoin/testnet/paymentforward).payment_address",
'\n{
"destination_address": "2MxAS7QfBDQspHxmY4g4i92tLNTPH4r2DTZ",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}'
);
?>
# Result
mkN6PfXfF6b8dfBrRM9kyVu6zxqzTLXYZ5
oraclize_query(
"URL",
"json(https://api-dot-vizlorepaymentprocessor.appspot.com/v1/bitcoin/testnet/paymentforward).payment_address",
'\n{
"destination_address": "2MxAS7QfBDQspHxmY4g4i92tLNTPH4r2DTZ",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}'
);
# Result
mkN6PfXfF6b8dfBrRM9kyVu6zxqzTLXYZ5
oraclize_query(
"URL",
"json(https://api-dot-vizlorepaymentprocessor.appspot.com/v1/bitcoin/testnet/paymentforward).payment_address",
'\n{
"destination_address": "2MxAS7QfBDQspHxmY4g4i92tLNTPH4r2DTZ",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}'
);
# Result
mkN6PfXfF6b8dfBrRM9kyVu6zxqzTLXYZ5
oraclize_query(
"URL",
"json(https://api-dot-vizlorepaymentprocessor.appspot.com/v1/bitcoin/testnet/paymentforward).payment_address",
'\n{
"destination_address": "2MxAS7QfBDQspHxmY4g4i92tLNTPH4r2DTZ",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}'
);
# Result
mkN6PfXfF6b8dfBrRM9kyVu6zxqzTLXYZ5
oraclize_query(
"URL",
"json(https://api-dot-vizlorepaymentprocessor.appspot.com/v1/bitcoin/testnet/paymentforward).payment_address",
'\n{
"destination_address": "2MxAS7QfBDQspHxmY4g4i92tLNTPH4r2DTZ",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
}'
);
# Result
mkN6PfXfF6b8dfBrRM9kyVu6zxqzTLXYZ5
Blockchain APIs
The set of APIs below provides insight into the network status and general information about the corresponding blockchain selected by specifying endpoint for digital currency and blockchain type.
General information
GET /status
Get general information about the blockchain.
Parameter | In | Type | Required | Description |
---|---|---|---|---|
q | query | String | True | Please use geInfo as value |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockchainInfoObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getInfo&token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getInfo&token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getInfo&token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params: {'q': 'getInfo', 'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params={'q': 'getInfo', 'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getInfo&token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
Current difficulty
GET /status
Get current difficulty for the blockchain.
Parameter | In | Type | Required | Description |
---|---|---|---|---|
q | query | String | True | Please use getDifficulty as value |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockchainDifficultyObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getDifficulty&token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"difficulty": 41610185.00844856
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getDifficulty&token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"difficulty": 41610185.00844856
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getDifficulty&token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"difficulty": 41610185.00844856
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params: {'q': 'getDifficulty', 'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"difficulty": 41610185.00844856
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params={'q': 'getDifficulty', 'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"difficulty": 41610185.00844856
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getDifficulty&token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"difficulty": 41610185.00844856
}
Best Block hash
GET /status
Get best block hash for the blockchain.
Parameter | In | Type | Required | Description |
---|---|---|---|---|
q | query | String | True | Please use getBestBlockHash as value |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockchainBestBlockObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getBestBlockHash&token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getBestBlockHash&token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getBestBlockHash&token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params: {'q': 'getBestBlockHash', 'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params={'q': 'getBestBlockHash', 'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getBestBlockHash&token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
Last Block hash
GET /status
Get last block hash for the blockchain.
Parameter | In | Type | Required | Description |
---|---|---|---|---|
q | query | String | True | Please use getLastBlockHash as value |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockchainLastBlockObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getLastBlockHash&token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getLastBlockHash&token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getLastBlockHash&token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params: {'q': 'getLastBlockHash', 'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status',
params={'q': 'getLastBlockHash', 'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/status?q=getLastBlockHash&token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
Blockchain Data Sync status
GET /sync
Get blockchain data sync status
Parameter | In | Type | Required | Description |
---|---|---|---|---|
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockchainDataSyncObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/sync?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/sync?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/sync?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/sync',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/sync',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/sync?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
Budget Proposals
GET /listproposal
List budget proposals for a blockchain
Parameter | In | Type | Required | Description |
---|---|---|---|---|
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Array BlockchainProposalsObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/listproposal?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
},
{
"Hash":"9de1ad25b9e5e329ff53fc7fc5a2dadb817d1b84bf4578b152f91b931fde9208",
"DataObject":
{
"end_epoch":1518714343,
"name":"DashRed-Dec2017-Feb2018",
"payment_address":"XxJLNc5eharc5BtKLTCrZGTXhQaUiQzDws",
"payment_amount":36,
"start_epoch":1510987903,
"type":1,
"url":"https://www.dashcentral.org/p/DashRed-Dec2017-Feb2018"
},
"AbsoluteYesCount":250,
"YesCount":318,
"NoCount":68,
"AbstainCount":15
}
]
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/listproposal?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
},
{
"Hash":"9de1ad25b9e5e329ff53fc7fc5a2dadb817d1b84bf4578b152f91b931fde9208",
"DataObject":
{
"end_epoch":1518714343,
"name":"DashRed-Dec2017-Feb2018",
"payment_address":"XxJLNc5eharc5BtKLTCrZGTXhQaUiQzDws",
"payment_amount":36,
"start_epoch":1510987903,
"type":1,
"url":"https://www.dashcentral.org/p/DashRed-Dec2017-Feb2018"
},
"AbsoluteYesCount":250,
"YesCount":318,
"NoCount":68,
"AbstainCount":15
}
]
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/listproposal?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
},
{
"Hash":"9de1ad25b9e5e329ff53fc7fc5a2dadb817d1b84bf4578b152f91b931fde9208",
"DataObject":
{
"end_epoch":1518714343,
"name":"DashRed-Dec2017-Feb2018",
"payment_address":"XxJLNc5eharc5BtKLTCrZGTXhQaUiQzDws",
"payment_amount":36,
"start_epoch":1510987903,
"type":1,
"url":"https://www.dashcentral.org/p/DashRed-Dec2017-Feb2018"
},
"AbsoluteYesCount":250,
"YesCount":318,
"NoCount":68,
"AbstainCount":15
}
]
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/listproposal',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
},
{
"Hash":"9de1ad25b9e5e329ff53fc7fc5a2dadb817d1b84bf4578b152f91b931fde9208",
"DataObject":
{
"end_epoch":1518714343,
"name":"DashRed-Dec2017-Feb2018",
"payment_address":"XxJLNc5eharc5BtKLTCrZGTXhQaUiQzDws",
"payment_amount":36,
"start_epoch":1510987903,
"type":1,
"url":"https://www.dashcentral.org/p/DashRed-Dec2017-Feb2018"
},
"AbsoluteYesCount":250,
"YesCount":318,
"NoCount":68,
"AbstainCount":15
}
]
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/listproposal',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
},
{
"Hash":"9de1ad25b9e5e329ff53fc7fc5a2dadb817d1b84bf4578b152f91b931fde9208",
"DataObject":
{
"end_epoch":1518714343,
"name":"DashRed-Dec2017-Feb2018",
"payment_address":"XxJLNc5eharc5BtKLTCrZGTXhQaUiQzDws",
"payment_amount":36,
"start_epoch":1510987903,
"type":1,
"url":"https://www.dashcentral.org/p/DashRed-Dec2017-Feb2018"
},
"AbsoluteYesCount":250,
"YesCount":318,
"NoCount":68,
"AbstainCount":15
}
]
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/listproposal?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
},
{
"Hash":"9de1ad25b9e5e329ff53fc7fc5a2dadb817d1b84bf4578b152f91b931fde9208",
"DataObject":
{
"end_epoch":1518714343,
"name":"DashRed-Dec2017-Feb2018",
"payment_address":"XxJLNc5eharc5BtKLTCrZGTXhQaUiQzDws",
"payment_amount":36,
"start_epoch":1510987903,
"type":1,
"url":"https://www.dashcentral.org/p/DashRed-Dec2017-Feb2018"
},
"AbsoluteYesCount":250,
"YesCount":318,
"NoCount":68,
"AbstainCount":15
}
]
Budget Proposal by hash
GET /getproposal/< proposal_hash >
Get budget proposal by proposal hash for a blockchain
Parameter | In | Type | Required | Description |
---|---|---|---|---|
proposal_hash | path | String | True | Hash of the proposal |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockchainProposalObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/getproposal/<PROPOSAL_HASH>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/getproposal/<PROPOSAL_HASH>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/getproposal/<PROPOSAL_HASH>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/getproposal/<PROPOSAL_HASH>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/getproposal/<PROPOSAL_HASH>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/getproposal/<PROPOSAL_HASH>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
Block APIs
This set of APIs provides insight in the blockchain on block level.
Block by hash
GET /block/< block_hash >
Get Block by hash
Parameter | In | Type | Required | Description |
---|---|---|---|---|
block_hash | path | String | True | Hash of the block |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/block/<BLOCK_HASH>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/block/<BLOCK_HASH>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/block/<BLOCK_HASH>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/block/<BLOCK_HASH>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/block/<BLOCK_HASH>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/block/<BLOCK_HASH>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
Block hash by index
GET /blockindex/< block_index >
Get Block hash by index
Parameter | In | Type | Required | Description |
---|---|---|---|---|
block_index | path | String | True | Index of the block |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlockHashObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blockindex/<BLOCK_INDEX>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blockindex/<BLOCK_INDEX>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blockindex/<BLOCK_INDEX>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blockindex/<BLOCK_INDEX>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blockindex/<BLOCK_INDEX>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blockindex/<BLOCK_INDEX>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
Raw Block by hash
GET /rawblock/< block_hash >
Get Raw Block by hash
Parameter | In | Type | Required | Description |
---|---|---|---|---|
block_hash | path | String | True | Hash of the block |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | RawBlockObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawblock/<BLOCK_HASH>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawblock/<BLOCK_HASH>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawblock/<BLOCK_HASH>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawblock/<BLOCK_HASH>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawblock/<BLOCK_HASH>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawblock/<BLOCK_HASH>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
Blocks by date
GET /blocks
Get Blocks by date
Parameter | In | Type | Required | Description |
---|---|---|---|---|
limit | query | Intiger | False | Number of blocks to fetch, if omitted all blocks for specified day are returned |
blockDate | query | Date YYYY-MM-DD | False | If omitted current day is returned |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | BlocksPaginatedObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blocks?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blocks?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blocks?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blocks',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blocks',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/blocks?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
Transaction APIs
This set of APIs provides insight into the blockchain on a transaction level.
Transaction by hash
GET /tx/< tx_hash >
Get Transaction by hash
Parameter | In | Type | Required | Description |
---|---|---|---|---|
tx_hash | path | String | True | Hash of the transaction |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TransactionObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/<TX_HASH>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/<TX_HASH>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/<TX_HASH>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/<TX_HASH>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/<TX_HASH>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/<TX_HASH>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
Raw Transaction by hash
GET /rawtx/< tx_hash >
Get Raw Transaction by hash
Parameter | In | Type | Required | Description |
---|---|---|---|---|
tx_hash | path | String | True | Hash of the transaction |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | RawTxObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawtx/<TX_HASH>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"rawtx":"0100000002c0fb5ea95c97cfaf7bd769bbb25ff850d47e311b7e865e0e74574c2242b0d8f2010000006b483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228affffffffef2852c0cd90eca6549952d09df44183b559b32b69486e225ae8cb845064512c010000006b483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2ffffffff01df13591b000000001976a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac00000000"
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawtx/<TX_HASH>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"rawtx":"0100000002c0fb5ea95c97cfaf7bd769bbb25ff850d47e311b7e865e0e74574c2242b0d8f2010000006b483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228affffffffef2852c0cd90eca6549952d09df44183b559b32b69486e225ae8cb845064512c010000006b483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2ffffffff01df13591b000000001976a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac00000000"
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawtx/<TX_HASH>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"rawtx":"0100000002c0fb5ea95c97cfaf7bd769bbb25ff850d47e311b7e865e0e74574c2242b0d8f2010000006b483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228affffffffef2852c0cd90eca6549952d09df44183b559b32b69486e225ae8cb845064512c010000006b483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2ffffffff01df13591b000000001976a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac00000000"
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawtx/<TX_HASH>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"rawtx":"0100000002c0fb5ea95c97cfaf7bd769bbb25ff850d47e311b7e865e0e74574c2242b0d8f2010000006b483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228affffffffef2852c0cd90eca6549952d09df44183b559b32b69486e225ae8cb845064512c010000006b483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2ffffffff01df13591b000000001976a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac00000000"
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawtx/<TX_HASH>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"rawtx":"0100000002c0fb5ea95c97cfaf7bd769bbb25ff850d47e311b7e865e0e74574c2242b0d8f2010000006b483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228affffffffef2852c0cd90eca6549952d09df44183b559b32b69486e225ae8cb845064512c010000006b483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2ffffffff01df13591b000000001976a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac00000000"
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/rawtx/<TX_HASH>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"rawtx":"0100000002c0fb5ea95c97cfaf7bd769bbb25ff850d47e311b7e865e0e74574c2242b0d8f2010000006b483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228affffffffef2852c0cd90eca6549952d09df44183b559b32b69486e225ae8cb845064512c010000006b483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2ffffffff01df13591b000000001976a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac00000000"
}
Transactions for Block
GET /txs
Get Transactions for a Block
Parameter | In | Type | Required | Description |
---|---|---|---|---|
block | query | String | True | Block hash |
pageNum | query | Integer | False | Zero based index for fetching corresponding page of results. If ommited only first page is returned. Number of transactions per page is 10 |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TxBlockObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?block=<BLOCK_HASH>&token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"version":1,
"locktime":0,
"vin":
[
{
"coinbase":"03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f",
"sequence":0,
"n":0
}
],
"vout":
[
{
"value":"1.67336414",
"n":0,
"scriptPubKey":
{
"hex":"76a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088ac",
"asm":"OP_DUP OP_HASH160 ee5c2e032d02f6f7b08fcc21e0025f0baeb056b0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"1.67336407",
"n":1,
"scriptPubKey":
{
"hex":"76a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac",
"asm":"OP_DUP OP_HASH160 9d0d46f36bc90aef04803b53fb5f76c5c4325ced OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xq1FptCQXMfmjfsN6QxYUeGhzCFm94TrQj"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"isCoinBase":true,
"valueOut":3.34672821,
"size":150,
"txlock":false
},
{
"txid":"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57",
"version":1,
"locktime":855969,
"vin":
[
{
"txid":"ec980b387297820ab29c2b0ccda5b09409e07d4f0601bbe3cd99ddf0d9d78607",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738",
"asm":"304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc[ALL] 02cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738"
},
"addr":"Xd5KDD6kjC2iyQGjWqZWi3HWoMqC92faUp",
"valueSat":6224500,
"value":0.062245,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.01000000",
"n":0,
"scriptPubKey":
{
"hex":"76a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88ac",
"asm":"OP_DUP OP_HASH160 8a3b9c1327cf24f99f57d95cb0ecf10342a6417c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoHkVUhRtpQCWPTTH6veSuPrjFq3rdJv6b"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"0.05111500",
"n":1,
"scriptPubKey":
{
"hex":"76a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088ac",
"asm":"OP_DUP OP_HASH160 e99064a50c9756e7dcef5eff03c4e35fd927bbc0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XwypFZWwD3Le91Smtw7shA52rQqFcoF3bv"
],
"type":"pubkeyhash"
},
"spentTxId":"dc2cc56bfc11d1afea9e1407923fe6879963b66de6f3069b59afd7f27f22f514",
"spentIndex":0,
"spentHeight":855991
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"valueOut":0.061115,
"size":225,
"valueIn":0.062245,
"fees":0.00113,
"txlock":false
}
]
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?block=<BLOCK_HASH>&token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"version":1,
"locktime":0,
"vin":
[
{
"coinbase":"03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f",
"sequence":0,
"n":0
}
],
"vout":
[
{
"value":"1.67336414",
"n":0,
"scriptPubKey":
{
"hex":"76a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088ac",
"asm":"OP_DUP OP_HASH160 ee5c2e032d02f6f7b08fcc21e0025f0baeb056b0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"1.67336407",
"n":1,
"scriptPubKey":
{
"hex":"76a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac",
"asm":"OP_DUP OP_HASH160 9d0d46f36bc90aef04803b53fb5f76c5c4325ced OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xq1FptCQXMfmjfsN6QxYUeGhzCFm94TrQj"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"isCoinBase":true,
"valueOut":3.34672821,
"size":150,
"txlock":false
},
{
"txid":"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57",
"version":1,
"locktime":855969,
"vin":
[
{
"txid":"ec980b387297820ab29c2b0ccda5b09409e07d4f0601bbe3cd99ddf0d9d78607",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738",
"asm":"304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc[ALL] 02cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738"
},
"addr":"Xd5KDD6kjC2iyQGjWqZWi3HWoMqC92faUp",
"valueSat":6224500,
"value":0.062245,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.01000000",
"n":0,
"scriptPubKey":
{
"hex":"76a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88ac",
"asm":"OP_DUP OP_HASH160 8a3b9c1327cf24f99f57d95cb0ecf10342a6417c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoHkVUhRtpQCWPTTH6veSuPrjFq3rdJv6b"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"0.05111500",
"n":1,
"scriptPubKey":
{
"hex":"76a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088ac",
"asm":"OP_DUP OP_HASH160 e99064a50c9756e7dcef5eff03c4e35fd927bbc0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XwypFZWwD3Le91Smtw7shA52rQqFcoF3bv"
],
"type":"pubkeyhash"
},
"spentTxId":"dc2cc56bfc11d1afea9e1407923fe6879963b66de6f3069b59afd7f27f22f514",
"spentIndex":0,
"spentHeight":855991
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"valueOut":0.061115,
"size":225,
"valueIn":0.062245,
"fees":0.00113,
"txlock":false
}
]
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?block=<BLOCK_HASH>&token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"version":1,
"locktime":0,
"vin":
[
{
"coinbase":"03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f",
"sequence":0,
"n":0
}
],
"vout":
[
{
"value":"1.67336414",
"n":0,
"scriptPubKey":
{
"hex":"76a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088ac",
"asm":"OP_DUP OP_HASH160 ee5c2e032d02f6f7b08fcc21e0025f0baeb056b0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"1.67336407",
"n":1,
"scriptPubKey":
{
"hex":"76a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac",
"asm":"OP_DUP OP_HASH160 9d0d46f36bc90aef04803b53fb5f76c5c4325ced OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xq1FptCQXMfmjfsN6QxYUeGhzCFm94TrQj"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"isCoinBase":true,
"valueOut":3.34672821,
"size":150,
"txlock":false
},
{
"txid":"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57",
"version":1,
"locktime":855969,
"vin":
[
{
"txid":"ec980b387297820ab29c2b0ccda5b09409e07d4f0601bbe3cd99ddf0d9d78607",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738",
"asm":"304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc[ALL] 02cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738"
},
"addr":"Xd5KDD6kjC2iyQGjWqZWi3HWoMqC92faUp",
"valueSat":6224500,
"value":0.062245,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.01000000",
"n":0,
"scriptPubKey":
{
"hex":"76a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88ac",
"asm":"OP_DUP OP_HASH160 8a3b9c1327cf24f99f57d95cb0ecf10342a6417c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoHkVUhRtpQCWPTTH6veSuPrjFq3rdJv6b"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"0.05111500",
"n":1,
"scriptPubKey":
{
"hex":"76a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088ac",
"asm":"OP_DUP OP_HASH160 e99064a50c9756e7dcef5eff03c4e35fd927bbc0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XwypFZWwD3Le91Smtw7shA52rQqFcoF3bv"
],
"type":"pubkeyhash"
},
"spentTxId":"dc2cc56bfc11d1afea9e1407923fe6879963b66de6f3069b59afd7f27f22f514",
"spentIndex":0,
"spentHeight":855991
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"valueOut":0.061115,
"size":225,
"valueIn":0.062245,
"fees":0.00113,
"txlock":false
}
]
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs',
params: {'block': <BLOCK_HASH>, 'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"version":1,
"locktime":0,
"vin":
[
{
"coinbase":"03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f",
"sequence":0,
"n":0
}
],
"vout":
[
{
"value":"1.67336414",
"n":0,
"scriptPubKey":
{
"hex":"76a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088ac",
"asm":"OP_DUP OP_HASH160 ee5c2e032d02f6f7b08fcc21e0025f0baeb056b0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"1.67336407",
"n":1,
"scriptPubKey":
{
"hex":"76a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac",
"asm":"OP_DUP OP_HASH160 9d0d46f36bc90aef04803b53fb5f76c5c4325ced OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xq1FptCQXMfmjfsN6QxYUeGhzCFm94TrQj"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"isCoinBase":true,
"valueOut":3.34672821,
"size":150,
"txlock":false
},
{
"txid":"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57",
"version":1,
"locktime":855969,
"vin":
[
{
"txid":"ec980b387297820ab29c2b0ccda5b09409e07d4f0601bbe3cd99ddf0d9d78607",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738",
"asm":"304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc[ALL] 02cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738"
},
"addr":"Xd5KDD6kjC2iyQGjWqZWi3HWoMqC92faUp",
"valueSat":6224500,
"value":0.062245,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.01000000",
"n":0,
"scriptPubKey":
{
"hex":"76a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88ac",
"asm":"OP_DUP OP_HASH160 8a3b9c1327cf24f99f57d95cb0ecf10342a6417c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoHkVUhRtpQCWPTTH6veSuPrjFq3rdJv6b"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"0.05111500",
"n":1,
"scriptPubKey":
{
"hex":"76a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088ac",
"asm":"OP_DUP OP_HASH160 e99064a50c9756e7dcef5eff03c4e35fd927bbc0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XwypFZWwD3Le91Smtw7shA52rQqFcoF3bv"
],
"type":"pubkeyhash"
},
"spentTxId":"dc2cc56bfc11d1afea9e1407923fe6879963b66de6f3069b59afd7f27f22f514",
"spentIndex":0,
"spentHeight":855991
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"valueOut":0.061115,
"size":225,
"valueIn":0.062245,
"fees":0.00113,
"txlock":false
}
]
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs',
params={'block': <BLOCK_HASH>, 'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"version":1,
"locktime":0,
"vin":
[
{
"coinbase":"03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f",
"sequence":0,
"n":0
}
],
"vout":
[
{
"value":"1.67336414",
"n":0,
"scriptPubKey":
{
"hex":"76a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088ac",
"asm":"OP_DUP OP_HASH160 ee5c2e032d02f6f7b08fcc21e0025f0baeb056b0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"1.67336407",
"n":1,
"scriptPubKey":
{
"hex":"76a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac",
"asm":"OP_DUP OP_HASH160 9d0d46f36bc90aef04803b53fb5f76c5c4325ced OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xq1FptCQXMfmjfsN6QxYUeGhzCFm94TrQj"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"isCoinBase":true,
"valueOut":3.34672821,
"size":150,
"txlock":false
},
{
"txid":"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57",
"version":1,
"locktime":855969,
"vin":
[
{
"txid":"ec980b387297820ab29c2b0ccda5b09409e07d4f0601bbe3cd99ddf0d9d78607",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738",
"asm":"304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc[ALL] 02cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738"
},
"addr":"Xd5KDD6kjC2iyQGjWqZWi3HWoMqC92faUp",
"valueSat":6224500,
"value":0.062245,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.01000000",
"n":0,
"scriptPubKey":
{
"hex":"76a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88ac",
"asm":"OP_DUP OP_HASH160 8a3b9c1327cf24f99f57d95cb0ecf10342a6417c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoHkVUhRtpQCWPTTH6veSuPrjFq3rdJv6b"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"0.05111500",
"n":1,
"scriptPubKey":
{
"hex":"76a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088ac",
"asm":"OP_DUP OP_HASH160 e99064a50c9756e7dcef5eff03c4e35fd927bbc0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XwypFZWwD3Le91Smtw7shA52rQqFcoF3bv"
],
"type":"pubkeyhash"
},
"spentTxId":"dc2cc56bfc11d1afea9e1407923fe6879963b66de6f3069b59afd7f27f22f514",
"spentIndex":0,
"spentHeight":855991
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"valueOut":0.061115,
"size":225,
"valueIn":0.062245,
"fees":0.00113,
"txlock":false
}
]
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?block=<BLOCK_HASH>&token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"version":1,
"locktime":0,
"vin":
[
{
"coinbase":"03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f",
"sequence":0,
"n":0
}
],
"vout":
[
{
"value":"1.67336414",
"n":0,
"scriptPubKey":
{
"hex":"76a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088ac",
"asm":"OP_DUP OP_HASH160 ee5c2e032d02f6f7b08fcc21e0025f0baeb056b0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"1.67336407",
"n":1,
"scriptPubKey":
{
"hex":"76a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac",
"asm":"OP_DUP OP_HASH160 9d0d46f36bc90aef04803b53fb5f76c5c4325ced OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xq1FptCQXMfmjfsN6QxYUeGhzCFm94TrQj"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"isCoinBase":true,
"valueOut":3.34672821,
"size":150,
"txlock":false
},
{
"txid":"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57",
"version":1,
"locktime":855969,
"vin":
[
{
"txid":"ec980b387297820ab29c2b0ccda5b09409e07d4f0601bbe3cd99ddf0d9d78607",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738",
"asm":"304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc[ALL] 02cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738"
},
"addr":"Xd5KDD6kjC2iyQGjWqZWi3HWoMqC92faUp",
"valueSat":6224500,
"value":0.062245,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.01000000",
"n":0,
"scriptPubKey":
{
"hex":"76a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88ac",
"asm":"OP_DUP OP_HASH160 8a3b9c1327cf24f99f57d95cb0ecf10342a6417c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoHkVUhRtpQCWPTTH6veSuPrjFq3rdJv6b"
],
"type":"pubkeyhash"
},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null
},
{
"value":"0.05111500",
"n":1,
"scriptPubKey":
{
"hex":"76a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088ac",
"asm":"OP_DUP OP_HASH160 e99064a50c9756e7dcef5eff03c4e35fd927bbc0 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XwypFZWwD3Le91Smtw7shA52rQqFcoF3bv"
],
"type":"pubkeyhash"
},
"spentTxId":"dc2cc56bfc11d1afea9e1407923fe6879963b66de6f3069b59afd7f27f22f514",
"spentIndex":0,
"spentHeight":855991
}
],
"blockhash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"blockheight":855987,
"confirmations":47,
"time":1524120132,
"blocktime":1524120132,
"valueOut":0.061115,
"size":225,
"valueIn":0.062245,
"fees":0.00113,
"txlock":false
}
]
}
Transactions for Address
GET /txs
Get Transactions for an Address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | query | String | True | Address string |
pageNum | query | Integer | False | Zero based index for fetching corresponding page of results. If ommited only first page is returned. Number of transactions per page is 10 |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TxBlockObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?address=<ADDRESS>&token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54498,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54628,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?address=<ADDRESS>&token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54498,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54628,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?address=<ADDRESS>&token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54498,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54628,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs',
params: {'address': <ADDRESS>, 'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54498,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54628,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs',
params={'address': <ADDRESS>, 'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54498,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54628,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/txs?address=<ADDRESS>&token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"pagesTotal":1,
"txs":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54498,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54628,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
Transactions for multiple Addresses - GET
GET /addrs/< address1 >,< address2 >,...,< addressn >/txs
Get Transactions for multiple Addresses
Parameter | In | Type | Required | Description |
---|---|---|---|---|
addr | path | String Aray(address) | True | Array of comma separated address strings |
from | query | Integer | False | Starting number of tx |
to | query | Integer | False | Ending number of tx |
noAsm | query | Integer | False | Default is 0. If set to 1 Asm info will be ommitted for tx. |
noScriptSig | query | Integer | False | Default is 0. If set to 1 Script Signature info will be ommitted for tx. |
noSpent | query | Integer | False | Default is 0. If set to 1 Spent info will be ommitted for tx. |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TxAddressesObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/<ADDRESS1>,<ADDRESS2>,..,<ADDRESSn>/txs?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/<ADDRESS1>,<ADDRESS2>,..,<ADDRESSn>/txs?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/<ADDRESS1>,<ADDRESS2>,..,<ADDRESSn>/txs?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/<ADDRESS1>,<ADDRESS2>,..,<ADDRESSn>/txs',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/<ADDRESS1>,<ADDRESS2>,..,<ADDRESSn>/txs',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/<ADDRESS1>,<ADDRESS2>,..,<ADDRESSn>/txs?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
Transactions for multiple Addresses - POST
POST /addrs/txs
Get Transactions for multiple Addresses by using POST method
Parameter | In | Type | Required | Description |
---|---|---|---|---|
addrs | body | String Aray(address) | True | Array of comma separated address strings |
from | body | Integer | False | Starting number of tx |
to | body | Integer | False | Ending number of tx |
noAsm | body | Integer | False | Default is 0. If set to 1 Asm info will be ommitted for tx. |
noScriptSig | body | Integer | False | Default is 0. If set to 1 Script Signature info will be ommitted for tx. |
noSpent | body | Integer | False | Default is 0. If set to 1 Spent info will be ommitted for tx. |
token | body | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TxAddressesObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/txs \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
<?php
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/txs";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/txs',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/txs',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/txs',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/txs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"addrs": "XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA,XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA,XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou",
"token": <TOKEN>
}
Example response
{
"totalItems":2,
"from":0,
"to":2,
"items":
[
{
"txid":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"version":1,
"locktime":801535,
"vin":
[
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb896495501210366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0",
"asm":"304402202e06975207a5326fe4ade7ed08216d5cf06f26f0adc31953dafa1ea7b2097733022005c179c4f7433f5141d3010a6cf79f36f6548c18ea01537ca7cdd22fb8964955[ALL] 0366f76060de6b69852732eaf3e97ec1152da0a785394441a669fe1bb8d0f1f0c0"
},
"addr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"valueSat":4339433988,
"value":43.39433988,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.52760000",
"n":0,
"scriptPubKey":
{
"hex":"76a9147d412940d1dce226cb39f9aade2b45a8139410c388ac",
"asm":"OP_DUP OP_HASH160 7d412940d1dce226cb39f9aade2b45a8139410c3 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"Xn78Mi21PMiHt9WP4L53jGM4YmFJW1Byt1"
],
"type":"pubkeyhash"
},
"spentTxId":"cbdad5342e7adf96653ebd0cb975c87c968d9a42183c6ca9f89a352f440bfe1f",
"spentIndex":1,
"spentHeight":819533
},
{
"value":"42.86671328",
"n":1,
"scriptPubKey":
{
"hex":"76a9148c20711bed045fe94b1594bef74d1e70a122088388ac",
"asm":"OP_DUP OP_HASH160 8c20711bed045fe94b1594bef74d1e70a1220883 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoTmJD185yqptsbpB8P86iUDepNc7ew9dC"
],
"type":"pubkeyhash"
},
"spentTxId":"517ac0dcde42d24e1a9738ca2a3a74aea67a9f8a2eab1c64caa8b1efe08de0e9",
"spentIndex":0,
"spentHeight":801545
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54505,
"time":1515541051,
"blocktime":1515541051,
"valueOut":43.39431328,
"size":225,
"valueIn":43.39433988,
"fees":0.0000266,
"txlock":false
},
{
"txid":"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66",
"version":1,
"locktime":801405,
"vin":
[
{
"txid":"ce2c051f45574c447cbb1508437acaf760e79236b7f86c97a15ff11d0ab8e33e",
"vout":1,
"sequence":4294967294,
"n":0,
"scriptSig":
{
"hex":"47304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e01210294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a",
"asm":"304402207d37e412bf8e6566ae1943655a8a243af34fccfd7c8f34f61c36a4994a670ba30220239db5c02e257733ed05b9d2c02f7f189501617055836f59e93a45f5e145031e[ALL] 0294ab06f824009afde98adceb3bc8839dbf3caeb2a337fbb2a6df8060d5bc2f9a"
},
"addr":"XnVQXrresaPrAA81qcYhCrHRpkAvDGixus",
"valueSat":4345623837,
"value":43.45623837,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"0.06187190",
"n":0,
"scriptPubKey":
{
"hex":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"asm":"OP_DUP OP_HASH160 8b82df11f146d6203ca9ce7a67e75f37444c408b OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4"
],
"type":"pubkeyhash"
},
"spentTxId":"a36a7ef65a34b1205142aad9f7e4a1cccb972c3e685d0e205174ff98c2f3ce07",
"spentIndex":0,
"spentHeight":801900
},
{
"value":"43.39433988",
"n":1,
"scriptPubKey":
{
"hex":"76a91469ddad658bc7e99ece553836f0139db1ea55c33988ac",
"asm":"OP_DUP OP_HASH160 69ddad658bc7e99ece553836f0139db1ea55c339 OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA"
],
"type":"pubkeyhash"
},
"spentTxId":"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"spentIndex":0,
"spentHeight":801537
}
],
"blockhash":"000000000000001af3534c0f771f9342a02818821fe98dad10f309ae56855c86",
"blockheight":801407,
"confirmations":54635,
"time":1515520337,
"blocktime":1515520337,
"valueOut":43.45621178,
"size":225,
"valueIn":43.45623837,
"fees":0.00002659,
"txlock":false
}
]
}
Send Raw Transaction
POST /tx/send
Send/broadcast Raw Transaction
Parameter | In | Type | Required | Description |
---|---|---|---|---|
rawtx | body | String | True | Raw signed transaction as hex string |
token | body | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TxSendObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
<?php
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/send";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/send',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/send',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/send',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/send");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"rawtx": "01000000017b1eabe0209b1fe794124575ef807057c77ada2138ae4fa8d6c4de0398a14f3f00000000494830450221008949f0cb400094ad2b5eb399d59d01c14d73d8fe6e96df1a7150deb388ab8935022079656090d7f6bac4c9a94e0aad311a4268e082a725f8aeae0573fb12ff866a5f01ffffffff01f0ca052a010000001976a914cbc20a7664f2f69e5355aa427045bc15e7c6c77288ac00000000",
"token": <TOKEN>
}
Example response
{
"txid": "c7736a0a0046d5a8cc61c8c3c2821d4d7517f5de2bc66a966011aaa79965ffba"
}
Instant Send Transaction
POST /tx/sendix
Send/broadcast Raw Transaction
Parameter | In | Type | Required | Description |
---|---|---|---|---|
rawtx | body | String | True | Raw signed transaction as hex string |
token | body | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | TxSendObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/sendix \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
<?php
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/sendix";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/sendix',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/sendix',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/sendix',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/tx/sendix");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"rawtx": "01000000017b1eabe0209b1fe794124575ef807057c77ada2138ae4fa8d6c4de0398a14f3f00000000494830450221008949f0cb400094ad2b5eb399d59d01c14d73d8fe6e96df1a7150deb388ab8935022079656090d7f6bac4c9a94e0aad311a4268e082a725f8aeae0573fb12ff866a5f01ffffffff01f0ca052a010000001976a914cbc20a7664f2f69e5355aa427045bc15e7c6c77288ac00000000",
"token": <TOKEN>
}
Example response
{
"txid": "c7736a0a0046d5a8cc61c8c3c2821d4d7517f5de2bc66a966011aaa79965ffba"
}
Address APIs
This set of APIs provides insight into the blockchain on a transaction level.
Address by hash
GET /addr/< address >
Get Address by hash
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | path | String | True | Address string |
noTxList | query | Integer | False | Default 0; If set to 1 transaction list will be ommitted. |
from | query | Integer | False | Start transaction in the address tx list; Default 0 |
to | query | Integer | False | End transaction in the address tx list |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AddressObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"addrStr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"balance":0,
"balanceSat":0,
"totalReceived":43.39433988,
"totalReceivedSat":4339433988,
"totalSent":43.39433988,
"totalSentSat":4339433988,
"unconfirmedBalance":0,
"unconfirmedBalanceSat":0,
"unconfirmedTxApperances":0,
"txApperances":2,
"transactions":
[
"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66"
]
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"addrStr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"balance":0,
"balanceSat":0,
"totalReceived":43.39433988,
"totalReceivedSat":4339433988,
"totalSent":43.39433988,
"totalSentSat":4339433988,
"unconfirmedBalance":0,
"unconfirmedBalanceSat":0,
"unconfirmedTxApperances":0,
"txApperances":2,
"transactions":
[
"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66"
]
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"addrStr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"balance":0,
"balanceSat":0,
"totalReceived":43.39433988,
"totalReceivedSat":4339433988,
"totalSent":43.39433988,
"totalSentSat":4339433988,
"unconfirmedBalance":0,
"unconfirmedBalanceSat":0,
"unconfirmedTxApperances":0,
"txApperances":2,
"transactions":
[
"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66"
]
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"addrStr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"balance":0,
"balanceSat":0,
"totalReceived":43.39433988,
"totalReceivedSat":4339433988,
"totalSent":43.39433988,
"totalSentSat":4339433988,
"unconfirmedBalance":0,
"unconfirmedBalanceSat":0,
"unconfirmedTxApperances":0,
"txApperances":2,
"transactions":
[
"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66"
]
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"addrStr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"balance":0,
"balanceSat":0,
"totalReceived":43.39433988,
"totalReceivedSat":4339433988,
"totalSent":43.39433988,
"totalSentSat":4339433988,
"unconfirmedBalance":0,
"unconfirmedBalanceSat":0,
"unconfirmedTxApperances":0,
"txApperances":2,
"transactions":
[
"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66"
]
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"addrStr":"XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA",
"balance":0,
"balanceSat":0,
"totalReceived":43.39433988,
"totalReceivedSat":4339433988,
"totalSent":43.39433988,
"totalSentSat":4339433988,
"unconfirmedBalance":0,
"unconfirmedBalanceSat":0,
"unconfirmedTxApperances":0,
"txApperances":2,
"transactions":
[
"58987677dcf85dd7fb949da5d283abddb561f131dfc554d95fa193dfa2242382",
"62ffe74e1cbeb5f537830b199a7d0700cecd3ae5476ec0fbada12c5c1129fe66"
]
}
Address Balance
GET /addr/< address >/balance
Get Address balance in duffs
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | path | String | True | Address string |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Integer representing balance in duffs |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/balance?token=<TOKEN> \
-H 'Content-Type: application/json'
# Response example
0
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/balance?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
0
?>
var headers = {
'Content-Type':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/balance?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
0
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/balance',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
0
import requests
headers = {
'Content-Type':'application/json'
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/balance',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
0
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/balance?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
0
Address Total Received
GET /addr/< address >/totalReceived
Get Total Received amount in duffs for an Address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | path | String | True | Address string |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Integer representing total received amount in duffs |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalReceived?token=<TOKEN> \
-H 'Content-Type: application/json'
# Response example
4339433988
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalReceived?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
4339433988
?>
var headers = {
'Content-Type':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalReceived?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
4339433988
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalReceived',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
4339433988
import requests
headers = {
'Content-Type':'application/json'
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalReceived',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
4339433988
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalReceived?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
4339433988
Address Total Sent
GET /addr/< address >/totalSent
Get Total Sent amount in duffs for an Address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | path | String | True | Address string |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Integer representing total sent amount in duffs |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalSent?token=<TOKEN> \
-H 'Content-Type: application/json'
# Response example
4339433988
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalSent?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
4339433988
?>
var headers = {
'Content-Type':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalSent?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
4339433988
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalSent',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
4339433988
import requests
headers = {
'Content-Type':'application/json'
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalSent',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
4339433988
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/totalSent?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
4339433988
Address Unconfirmed Balance
GET /addr/< address >/unconfirmedBalance
Get Unconfirmed Balance for an Address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | path | String | True | Address string |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Integer representing unconfirmed balance in duffs |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/unconfirmedBalance?token=<TOKEN> \
-H 'Content-Type: application/json'
# Response example
0
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/unconfirmedBalance?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
0
?>
var headers = {
'Content-Type':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/unconfirmedBalance?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
0
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/unconfirmedBalance',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
0
import requests
headers = {
'Content-Type':'application/json'
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/unconfirmedBalance',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
0
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/unconfirmedBalance?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
0
Unspent Outputs APIs
The set of APIs provides insight into the unspent outputs for one or multiple addresses. Useful for building raw transactions for sending.
Unspent Outputs for an Address
GET /addr/< address >/utxo
Get Unspent Outputs for an Address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
address | path | String | True | Address string |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Array UnspentOutputObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/utxo?token=<TOKEN> \
-H 'Content-Type: application/json'\
-H 'Accept: application/json'
# Response example
[
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10369
}
]
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/utxo?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
[
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10369
}
]
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/utxo?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
[
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10369
}
]
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/utxo',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
[
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10369
}
]
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/utxo',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
[
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10369
}
]
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addr/<ADDRESS>/utxo?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Content-Type", "application/json");
con.setRequestProperty("Accept", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
[
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10369
}
]
Unspent Outputs for multiple Addresses - GET
GET /addrs/< address1 >,< address2 >,...,< addressn >/utxo
Get Unspent Outputs for multiple Addresses
Parameter | In | Type | Required | Description |
---|---|---|---|---|
addr | path | String Aray(address) | True | Array of comma separated address strings |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Array UnspentOutputObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/< ADDRESS1 >,< ADDRESS2 >,...,< ADDRESSn >/utxo?token=<TOKEN> \
-H 'Content-Type: application/json'\
-H 'Accept: application/json'
# Response example
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/< ADDRESS1 >,< ADDRESS2 >,...,< ADDRESSn >/utxo?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/< ADDRESS1 >,< ADDRESS2 >,...,< ADDRESSn >/utxo?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/< ADDRESS1 >,< ADDRESS2 >,...,< ADDRESSn >/utxo',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/< ADDRESS1 >,< ADDRESS2 >,...,< ADDRESSn >/utxo',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/< ADDRESS1 >,< ADDRESS2 >,...,< ADDRESSn >/utxo?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Content-Type", "application/json");
con.setRequestProperty("Accept", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
Unspent Outputs for multiple Addresses - POST
POST /addrs/utxo
Get Transactions for multiple Addresses by using POST method
Parameter | In | Type | Required | Description |
---|---|---|---|---|
addrs | body | String Aray(address) | True | Array of comma separated address strings |
token | body | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Array UnspentOutputObject |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/utxo \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
<?php
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/utxo";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/utxo',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/utxo',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/utxo',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/addrs/utxo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"addrs": "XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA,XkLcLoji7FT8ALmpC3wCy6mTwPp3mMkonA,XxRB5fnF8KpB9jjRRb7M7pq4qtyL8xbUou",
"token": <TOKEN>
}
Example response
[
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"b7e99ed63aeba5499d5d13a106b999f6c2324435fefe9ecba7ed0d0b2d7d5c50",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1.67640709,
"satoshis":167640709,
"height":856576,
"confirmations":4
},
{
"address":"XoQWY27FwvCzyiLgpgxfDGHToBCehz8Dp4",
"txid":"1606ffd2df5655b99ffc746d3a70d7f7e7ff6877b565a73f2138abc372409897",
"vout":0,
"scriptPubKey":"76a9148b82df11f146d6203ca9ce7a67e75f37444c408b88ac",
"amount":0.03690789,
"satoshis":3690789,
"height":846205,
"confirmations":10375
},
{
"address":"XfUJPrDarpXLieCAhhas4qt2ACCEZuUKkC",
"txid":"48f8d958f5899550f91ceb12e6cf322aa6b9619f31dfd0c05e9d6c458cb9bc85",
"vout":0,
"scriptPubKey":"76a914347964ededf147b1d9a4e4c961d38a1d2abb9d3f88ac",
"amount":1000,
"satoshis":100000000000,
"height":660168,
"confirmations":196412
}
]
Payment Forward APIs
The set of APIs allows you to crate and manage payment forward rules. Payment forward allows you to forward DASH received on one address to one or two new addresses. In order to create a payment forward partially populated PaymentForward object is used.
Once created, payment forward rule will continue to forward payments in a predefined way set during payment forward creation until you explicitly delete it by calling the API for payment forward delete.
Create Payment Forward
POST /paymentforward
Create Payment Forward
Parameter | In | Type | Required | Description |
---|---|---|---|---|
destination_address | body | String | True | Destination address represents the address to which received DASH will be forwarded. |
commission_address | body | String | False | Commission address is an optional address to which funds will be forwarded in a predefined way. If commission address is specified, one must specify either commission_fee_percent or commission_fee_duffs parameter (cannot use both for the same payment forward) |
commission_fee_percent | body | Float | False | Commission fee as normalized percentage. Minimum is 0.001. Maximum is 0.999. In case commission_address is set, commission_fee_percent specifies amount which will be forwarded to commission_address as percentage of the total received payment. The rest of the funds will be forwarded to destination_address. Mining fee is subtracted from previously calculated commission amount. |
commission_fee_duffs | body | Integer | False | Commission fee in duffs. In case commission_address is set, commission_fee_duffs specifies fixed amount of the total received payment which will be forwarded to commission_address. The rest of the funds will be forwarded to destination_address. |
mining_fee_duffs | body | String | False | Mining fee for forwarding transaction. Default fee is 10 000 duffs. Min 10 000 duffs. Max 150 000 duffs. |
callback_url | body | String | False | Upon each payment forward processing, you will receive notification on a specified callback URL with method POST in JSON format. In order to successfully confirm that you have received a notification, you need to respond with status code 200 to this POST request. On failed notification delivery, each delivery is attempted 5 times with exponential back-off: 1s, 2s, 4s, 8s, 16s. The notification comprises PaymentForwardCallbackNotificationObject which is posted in the body of the notification. |
token | body | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | PaymentForwardObject |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
<?php
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"destination_address": "XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": <TOKEN>,
"commission_fee_percent": 0.1,
"commission_address": "XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb"
}
Example response
{
"paymentforward_id":"2pRxUXWLXQlwABUUPmuo9xi1Ghaqa0Lj",
"payment_address":"XhhqcCVhSmkETV6Q55RFskgASyUd9Seuwv",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"mining_fee_duffs":10000
}
Get Payment Forward by Id
GET /paymentforward/< paymentforward_id >
Get Payment Forward by ID for corresponding token
Parameter | In | Type | Required | Description |
---|---|---|---|---|
paymentforward_id | path | String | True | Unique Payment Forward ID |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | PaymentForwardObject |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"paymentforward_id":"XozC3GyOfhEGwD6zK8rIvi0HU6ZwqAuU",
"payment_address":"XcyXgQzCnKsWpK2YSjoRYwM1vWB6GvWQ2u",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-13T11:01:46.000Z",
"callback_url":"https://webhook.site/175c954d-6595-4bf8-a518-990f5e876fa7",
"mining_fee_duffs":10000,
"processed_txs":
[
{
"input_transaction_hash":"6e3648463d26ee5af215fa3b61e976bf06cc7b1c6d2c034253967be65fc1c889",
"received_amount_duffs":5000000,
"transaction_hash":"7c89d485e06f295de6fb1d676311340be35148dfc1a54de13b57e785227da78f",
"processed_date":"2018-04-13T11:04:19.000Z"
}
]
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"paymentforward_id":"XozC3GyOfhEGwD6zK8rIvi0HU6ZwqAuU",
"payment_address":"XcyXgQzCnKsWpK2YSjoRYwM1vWB6GvWQ2u",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-13T11:01:46.000Z",
"callback_url":"https://webhook.site/175c954d-6595-4bf8-a518-990f5e876fa7",
"mining_fee_duffs":10000,
"processed_txs":
[
{
"input_transaction_hash":"6e3648463d26ee5af215fa3b61e976bf06cc7b1c6d2c034253967be65fc1c889",
"received_amount_duffs":5000000,
"transaction_hash":"7c89d485e06f295de6fb1d676311340be35148dfc1a54de13b57e785227da78f",
"processed_date":"2018-04-13T11:04:19.000Z"
}
]
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"paymentforward_id":"XozC3GyOfhEGwD6zK8rIvi0HU6ZwqAuU",
"payment_address":"XcyXgQzCnKsWpK2YSjoRYwM1vWB6GvWQ2u",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-13T11:01:46.000Z",
"callback_url":"https://webhook.site/175c954d-6595-4bf8-a518-990f5e876fa7",
"mining_fee_duffs":10000,
"processed_txs":
[
{
"input_transaction_hash":"6e3648463d26ee5af215fa3b61e976bf06cc7b1c6d2c034253967be65fc1c889",
"received_amount_duffs":5000000,
"transaction_hash":"7c89d485e06f295de6fb1d676311340be35148dfc1a54de13b57e785227da78f",
"processed_date":"2018-04-13T11:04:19.000Z"
}
]
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"paymentforward_id":"XozC3GyOfhEGwD6zK8rIvi0HU6ZwqAuU",
"payment_address":"XcyXgQzCnKsWpK2YSjoRYwM1vWB6GvWQ2u",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-13T11:01:46.000Z",
"callback_url":"https://webhook.site/175c954d-6595-4bf8-a518-990f5e876fa7",
"mining_fee_duffs":10000,
"processed_txs":
[
{
"input_transaction_hash":"6e3648463d26ee5af215fa3b61e976bf06cc7b1c6d2c034253967be65fc1c889",
"received_amount_duffs":5000000,
"transaction_hash":"7c89d485e06f295de6fb1d676311340be35148dfc1a54de13b57e785227da78f",
"processed_date":"2018-04-13T11:04:19.000Z"
}
]
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"paymentforward_id":"XozC3GyOfhEGwD6zK8rIvi0HU6ZwqAuU",
"payment_address":"XcyXgQzCnKsWpK2YSjoRYwM1vWB6GvWQ2u",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-13T11:01:46.000Z",
"callback_url":"https://webhook.site/175c954d-6595-4bf8-a518-990f5e876fa7",
"mining_fee_duffs":10000,
"processed_txs":
[
{
"input_transaction_hash":"6e3648463d26ee5af215fa3b61e976bf06cc7b1c6d2c034253967be65fc1c889",
"received_amount_duffs":5000000,
"transaction_hash":"7c89d485e06f295de6fb1d676311340be35148dfc1a54de13b57e785227da78f",
"processed_date":"2018-04-13T11:04:19.000Z"
}
]
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"paymentforward_id":"XozC3GyOfhEGwD6zK8rIvi0HU6ZwqAuU",
"payment_address":"XcyXgQzCnKsWpK2YSjoRYwM1vWB6GvWQ2u",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-13T11:01:46.000Z",
"callback_url":"https://webhook.site/175c954d-6595-4bf8-a518-990f5e876fa7",
"mining_fee_duffs":10000,
"processed_txs":
[
{
"input_transaction_hash":"6e3648463d26ee5af215fa3b61e976bf06cc7b1c6d2c034253967be65fc1c889",
"received_amount_duffs":5000000,
"transaction_hash":"7c89d485e06f295de6fb1d676311340be35148dfc1a54de13b57e785227da78f",
"processed_date":"2018-04-13T11:04:19.000Z"
}
]
}
Get Payment Forwards
GET /paymentforward
Get all Payment Forwards for corresponding token
Parameter | In | Type | Required | Description |
---|---|---|---|---|
from | query | Integer | False | Start index (zero index based, default 0) |
to | query | Integer | False | End index (zero index based, default 100) |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Array PaymentForwardObject |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
[
{
"paymentforward_id":"bbM4nQ3fnAfI5VhJ9K8wWQQOx0Namr4l",
"payment_address":"XnRZrhsm5vWEitEqXAVGG1JTCeGBeJfj2d",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":null,
"commission_fee_duffs":20000,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
},
{
"paymentforward_id":"fHKGPLDqWUlce0cQIPzROzexDZ9WwTlj",
"payment_address":"XfFckk6ky9WeuNuCqVNxgXuPUobjfeHGGu",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
}
]
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
[
{
"paymentforward_id":"bbM4nQ3fnAfI5VhJ9K8wWQQOx0Namr4l",
"payment_address":"XnRZrhsm5vWEitEqXAVGG1JTCeGBeJfj2d",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":null,
"commission_fee_duffs":20000,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
},
{
"paymentforward_id":"fHKGPLDqWUlce0cQIPzROzexDZ9WwTlj",
"payment_address":"XfFckk6ky9WeuNuCqVNxgXuPUobjfeHGGu",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
}
]
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
[
{
"paymentforward_id":"bbM4nQ3fnAfI5VhJ9K8wWQQOx0Namr4l",
"payment_address":"XnRZrhsm5vWEitEqXAVGG1JTCeGBeJfj2d",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":null,
"commission_fee_duffs":20000,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
},
{
"paymentforward_id":"fHKGPLDqWUlce0cQIPzROzexDZ9WwTlj",
"payment_address":"XfFckk6ky9WeuNuCqVNxgXuPUobjfeHGGu",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
}
]
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
[
{
"paymentforward_id":"bbM4nQ3fnAfI5VhJ9K8wWQQOx0Namr4l",
"payment_address":"XnRZrhsm5vWEitEqXAVGG1JTCeGBeJfj2d",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":null,
"commission_fee_duffs":20000,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
},
{
"paymentforward_id":"fHKGPLDqWUlce0cQIPzROzexDZ9WwTlj",
"payment_address":"XfFckk6ky9WeuNuCqVNxgXuPUobjfeHGGu",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
}
]
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
[
{
"paymentforward_id":"bbM4nQ3fnAfI5VhJ9K8wWQQOx0Namr4l",
"payment_address":"XnRZrhsm5vWEitEqXAVGG1JTCeGBeJfj2d",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":null,
"commission_fee_duffs":20000,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
},
{
"paymentforward_id":"fHKGPLDqWUlce0cQIPzROzexDZ9WwTlj",
"payment_address":"XfFckk6ky9WeuNuCqVNxgXuPUobjfeHGGu",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
}
]
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
[
{
"paymentforward_id":"bbM4nQ3fnAfI5VhJ9K8wWQQOx0Namr4l",
"payment_address":"XnRZrhsm5vWEitEqXAVGG1JTCeGBeJfj2d",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":null,
"commission_fee_duffs":20000,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
},
{
"paymentforward_id":"fHKGPLDqWUlce0cQIPzROzexDZ9WwTlj",
"payment_address":"XfFckk6ky9WeuNuCqVNxgXuPUobjfeHGGu",
"destination_address":"XvtUXjA3UBnGvsbV7MDs4Duu411CfofDEK",
"commission_address":"XtFU7dFv8b7JeW7eG9yYXc28uSYUQqiNCb",
"commission_fee_percent":0.1,
"commission_fee_duffs":null,
"created_date":"2018-04-12T12:10:56.000Z",
"callback_url":"http://blockchainvlf.requestcatcher.com/test",
"mining_fee_duffs":10000
}
]
Delete Payment Forward
DELETE /paymentforward/< paymentforward_id >
Delete Payment Forward by id for corresponding token
Parameter | In | Type | Required | Description |
---|---|---|---|---|
paymentforward_id | path | String | True | Unique Payment forward ID |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | {} |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X DELETE https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>\
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>";
$aHTTP['http']['method'] = 'DELETE';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
// Response example
{}
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>',
method: 'DELETE',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{}
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'Bearer <token>'
}
result = RestClient.delete 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
r = requests.delete('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/paymentforward/<PAYMENTFORWARD_ID>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{}
Events and Web Hooks
Blockchains are extremely vivid distributed ledgers with large number of events such as new transactions, new blocks, confirmation of transactions, changing of address balance, etc. ChainRider offers rich set of different events you can listen to. The notification system is based on web hook methodology and each time the event is triggered on the blockchain, you will receive notification on a specified URL. This way you can stay up to speed with latest updates on the blockchain that concern you.
Event types
Following event types are supported by ChainRider:
Event type | Description |
---|---|
BLOCK | Triggered each time new block is added on the blockchain. The notification provides Block object as a payload. |
TRANSACTION | Triggered each time new transaction is emitted on the blockchain. It could be prior to reaching the block (unconfirmed) or when the transaction is included in the block (1 confirmation). The notification provides Transaction object as a payload. The event will provide notifications for both regular transactions and InstantSend transactions. |
IX_TRANSACTION | Triggered each time new InstantSend transaction is emitted on the blockchain. The notification provides Transaction object as a payload. Only InstantSend transactions trigger the event. |
ADDRESS | Triggered each time new transaction is emitted on the blockchain which includes specified address. Basically the event is triggered each time a balance of the address is changed (coins have been received to or sent from the address). Additionally you can specify "confirmation" parameter which allows you to receive notifications each time the transaction is confirmed in the blockchain until the specified number of confirmations. The notification provides Transaction object as a payload. This allows you to act on address balance change when you are confident that the transaction has been confirmed in the blockchain. In case the transaction is InstantSend the corresponding txlock parameter is set to True and provided within the Transaction object. |
Web Hooks
In order to set up a web hook you need to create an event by leveraging the Create Event API below. Once the event is triggered you will receive notification on a specified URL with method POST
in JSON
format. Each notification includes X-Eventid
and X-Eventtype
headers in request header, which provide info about the event which generated the notification. In order to successfully confirm that you have received a notification, you need to respond with status code 200
to this POST
request.
On failed notification delivery, each delivery is attempted 6 times with exponential back-off: 1s, 2s, 4s, 8s, 16s, 32s. In case the cycle fails to deliver notification (due to any reason such as network connectivity issue, bad gateway, response status code different from 200, etc.), cycle will be retried for 112 times prior to deleting the event/web hook.
Create Event
POST /events
Create Event / Web Hook
Parameter | In | Type | Required | Description |
---|---|---|---|---|
event_type | body | String | True | Type of the event - ENUM {'ADDRESS', 'BLOCK', 'TRANSACTION', 'IX_TRANSACTION'}. Please refer to Event Types for more details. |
callback_url | body | String | True | The URL to which the notification will be posted once the event is triggered. The notification payload is delivered in JSON format by using method POST. The response status code must be set to 200 in order to acknowledge the notification delivery. Each notification delivered to callback URL includes X-Eventid and X-Eventtype headers in request header, which provide info about the event which generated the notification. |
address | body | String | False | This parameter is required if you are creating ADDRESS event type. It represents an address for which you want to be notified on balance change. |
confirmations | body | Integer | False | Optional parameter with default value set to 0 wile max value is 9. Confirmations parameter should only be set if you are creating ADDRESS event type. In case it's set, you will receive notifications for detected transactions involving specified address each time until detected transaction receives specified number of confirmations. |
token | body | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EventIdObject |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X POST https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-D '<body_here>'
<?php
$body="<body_here>";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => Content-Type: application/json\r\nAccept: application/json\r\n",
'content' => $body
)
);
$context = stream_context_create($opts);
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events";
$result = file_get_contents($url, false, $context, -1, 40000);
);
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
};
var requestBody=<body_here>
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events',
method: 'POST',
headers: headers,
data: requestBody,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events',
payload:<body_here>, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events',
json=<body_here>, params={}, headers = headers)
print r.json()
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
con.setRequestMethod("POST");
OutputStream os = con.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write("<body_here>");
osw.flush();
osw.close();
os.close(); //don't forget to close the OutputStream
httpCon.connect();
//read the inputstream and print it
String result;
BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result2 = bis.read();
while(result2 != -1) {
buf.write((byte) result2);
result2 = bis.read();
}
result = buf.toString();
System.out.println(result);
Body parameter
{
"event_type": "ADDRESS",
"callback_url": "http://blockchainvlf.requestcatcher.com/test",
"token": <TOKEN>,
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 3
}
Example response
{
"event_id":"GCeUpByO6V08eUgYB1mg9GSXPgN77LUV"
}
Get Event by Id
GET /events/< event_id >
Get Event by ID for corresponding token
Parameter | In | Type | Required | Description |
---|---|---|---|---|
event_id | path | String | True | Unique Event ID |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | EventObject |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
}
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
}
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
}
Get Events
GET /events
Get all Events for corresponding token
Parameter | In | Type | Required | Description |
---|---|---|---|---|
from | query | Integer | False | Start index (zero index based, default 0) |
to | query | Integer | False | End index (zero index based, default 100) |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Array EventObject |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X GET https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events?token=<TOKEN> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
[
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
},
{
"event_id": "ZjWQQkQzv91XqUiskvXv5wlK8bETvpdx",
"event_type": "BLOCK",
"callback_url": "http://blockvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:35.000Z",
"enabled": 1
},
{
"event_id": "SEDMCFP7IvevVcnMUDLjpzE07zghzZyV",
"event_type": "TRANSACTION",
"callback_url": "http://txvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:49.000Z",
"enabled": 1
},
{
"event_id": "TFTnKD1R0AGk4bkBFJAPkxN4ro1AdrKD",
"event_type": "IX_TRANSACTION",
"callback_url": "http://itxvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:29:01.000Z",
"enabled": 1
}
]
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events?token=<TOKEN>";
$aHTTP['http']['method'] = 'GET';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
// Response example
[
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
},
{
"event_id": "ZjWQQkQzv91XqUiskvXv5wlK8bETvpdx",
"event_type": "BLOCK",
"callback_url": "http://blockvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:35.000Z",
"enabled": 1
},
{
"event_id": "SEDMCFP7IvevVcnMUDLjpzE07zghzZyV",
"event_type": "TRANSACTION",
"callback_url": "http://txvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:49.000Z",
"enabled": 1
},
{
"event_id": "TFTnKD1R0AGk4bkBFJAPkxN4ro1AdrKD",
"event_type": "IX_TRANSACTION",
"callback_url": "http://itxvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:29:01.000Z",
"enabled": 1
}
]
?>
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events?token=<TOKEN>',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
[
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
},
{
"event_id": "ZjWQQkQzv91XqUiskvXv5wlK8bETvpdx",
"event_type": "BLOCK",
"callback_url": "http://blockvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:35.000Z",
"enabled": 1
},
{
"event_id": "SEDMCFP7IvevVcnMUDLjpzE07zghzZyV",
"event_type": "TRANSACTION",
"callback_url": "http://txvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:49.000Z",
"enabled": 1
},
{
"event_id": "TFTnKD1R0AGk4bkBFJAPkxN4ro1AdrKD",
"event_type": "IX_TRANSACTION",
"callback_url": "http://itxvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:29:01.000Z",
"enabled": 1
}
]
require 'rest-client'
require 'json'
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
result = RestClient.get 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
[
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
},
{
"event_id": "ZjWQQkQzv91XqUiskvXv5wlK8bETvpdx",
"event_type": "BLOCK",
"callback_url": "http://blockvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:35.000Z",
"enabled": 1
},
{
"event_id": "SEDMCFP7IvevVcnMUDLjpzE07zghzZyV",
"event_type": "TRANSACTION",
"callback_url": "http://txvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:49.000Z",
"enabled": 1
},
{
"event_id": "TFTnKD1R0AGk4bkBFJAPkxN4ro1AdrKD",
"event_type": "IX_TRANSACTION",
"callback_url": "http://itxvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:29:01.000Z",
"enabled": 1
}
]
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
}
r = requests.get('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
[
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
},
{
"event_id": "ZjWQQkQzv91XqUiskvXv5wlK8bETvpdx",
"event_type": "BLOCK",
"callback_url": "http://blockvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:35.000Z",
"enabled": 1
},
{
"event_id": "SEDMCFP7IvevVcnMUDLjpzE07zghzZyV",
"event_type": "TRANSACTION",
"callback_url": "http://txvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:49.000Z",
"enabled": 1
},
{
"event_id": "TFTnKD1R0AGk4bkBFJAPkxN4ro1AdrKD",
"event_type": "IX_TRANSACTION",
"callback_url": "http://itxvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:29:01.000Z",
"enabled": 1
}
]
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
[
{
"event_id": "YyZMc3zVNrCsgMi9BWv4ckfXj4R4aW76",
"event_type": "ADDRESS",
"callback_url": "http://addrvlf.requestcatcher.com/test",
"address": "yiVCptUPyxLLxt7dndcLrUjYwt3W16hwQ9",
"confirmations": 4,
"retry": 0,
"created_date": "2018-08-10T07:28:00.000Z",
"enabled": 1
},
{
"event_id": "ZjWQQkQzv91XqUiskvXv5wlK8bETvpdx",
"event_type": "BLOCK",
"callback_url": "http://blockvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:35.000Z",
"enabled": 1
},
{
"event_id": "SEDMCFP7IvevVcnMUDLjpzE07zghzZyV",
"event_type": "TRANSACTION",
"callback_url": "http://txvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:28:49.000Z",
"enabled": 1
},
{
"event_id": "TFTnKD1R0AGk4bkBFJAPkxN4ro1AdrKD",
"event_type": "IX_TRANSACTION",
"callback_url": "http://itxvlf.requestcatcher.com/test",
"address": "",
"confirmations": 0,
"retry": 0,
"created_date": "2018-08-10T07:29:01.000Z",
"enabled": 1
}
]
Delete Event
DELETE /events/< event_id >
Delete event_type by id for corresponding token
Parameter | In | Type | Required | Description |
---|---|---|---|---|
event_id | path | String | True | Unique Event ID |
token | query | String | True | Token obtained from the ChainRider service |
Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | {} |
400 | Bad Request | Bad Request | {"error": "error description"} |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Code samples
curl -X DELETE https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>\
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
# Response example
{}
<?php
$URL = "https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>";
$aHTTP['http']['method'] = 'DELETE';
$aHTTP['http']['header'] = "Content-Type: application/json\r\nAccept: application/json\r\n";
$context = stream_context_create($aHTTP);
$response = file_get_contents($URL, false, $context);
?>
// Response example
{}
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>',
method: 'DELETE',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
});
// Response example
{}
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'Bearer <token>'
}
result = RestClient.delete 'https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>',
params: {'token': <TOKEN>}, headers: headers
p JSON.parse(result)
# Response example
{}
import requests
headers = {
'Content-Type':'application/json',
'Accept':'application/json'
}
r = requests.delete('https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>',
params={'token': <TOKEN>}, headers = headers)
print r.json()
# Response example
{}
URL obj = new URL("https://api.chainrider.io/v1/<DIGITAL_CURRENCY>/<BLOCKCHAIN>/events/<EVENT_ID>?token=<TOKEN>");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
// Response example
{}
Token Usage
Name | Type | Description |
---|---|---|
message | JSON | Message object containing all relevant token usage data. |
hour | Usage object | Provides info regarding API usage for current hour |
day | Usage object | Provides info regarding API usage for current day |
forward | Usage object | Provides info regarding payment forward API usage for current month |
Example
{
"message":{
"hour":{
"usage":2,
"limit":300,
"time_left":1857
},
"day":{
"usage":2,
"limit":3000,
"time_left":34257
},
"forward":{
"usage":0,
"limit":3,
"time_left":1675857
}
}
}
UsageObject
Name | Type | Description |
---|---|---|
usage | Integer | Number of used API calls within corresponding period |
limit | Integer | Total number of available API calls within corresponding period |
time_left | Integer | Time left in seconds before the counting is restarted |
Example
{
"usage":2,
"limit":300,
"time_left":1857
}
BlockchainInfoObject
Name | Type | Description |
---|---|---|
info | JSON | Info object |
version | Integer | Bitcore version |
insightversion | String | Insight API version |
protocolversion | Integer | Blockchain protocol version |
blocks | Integer | Number of blocks |
timeoffset | Integer | Time offset |
connections | Integer | Number of connections to other nodes |
proxy | String | Proxy used for connecting |
difficulty | Float | Current mining difficulty |
testnet | Boolean | Is it the testnet version of the blockchain |
relayfee | Float | Minimum relay fee in DASH |
errors | String | Error description |
network | String | Blockchain type ENUM {"livenet", "testnet"} |
Example
{
"info":
{
"version":120203,
"insightversion":"0.6.0",
"protocolversion":70208,
"blocks":855511,
"timeoffset":0,
"connections":8,
"proxy":"",
"difficulty":41610185.00844856,
"testnet":false,
"relayfee":0.00001,
"errors":"",
"network":"livenet"
}
}
Example
{
"difficulty": 41610185.00844856
}
Example
{
"bestblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
BlockchainLastBlockObject
Name | Type | Description |
---|---|---|
syncTipHash | String (HEX) | Hash of the block up to which the sync has been done |
lastblockhash | String (HEX) | Hash of the last block |
Example
{
"syncTipHash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5",
"lastblockhash":"000000000000005d1718d7539c0a5313b7660b8e7c66d1dccc263a225f9848f5"
}
BlockchainDataSyncObject
Name | Type | Description |
---|---|---|
status | String | Sync status |
blockChainHeight | Integer | Current blockchain height |
syncPercentage | Integer | Sync status as persentage |
height | Integer | Blockchain height (last block index) |
error | String | Error description |
type | String | Sync type |
Example
{
"status":"finished",
"blockChainHeight":855511,
"syncPercentage":100,
"height":855511,
"error":null,
"type":"bitcore node"
}
BlockchainProposalsObject
Name | Type | Description |
---|---|---|
Hash | String (HEX) | Proposal hash |
DataObject | JSON | Proposal data object |
AbsoluteYesCount | Integer | Number of Absolute Yes Votes |
YesCount | Integer | Number of Yes Votes |
NoCount | Integer | Number of No Votes |
AbstainCount | Integer | Number of Abstain Votes |
Example
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"AbsoluteYesCount":69,
"YesCount":88,
"NoCount":19,
"AbstainCount":0
}
ProposalDataObject
Name | Type | Description |
---|---|---|
end_epoch | Integer | End time (epoch) |
name | String | Name of the proposal |
payment_address | String | Payment address of the proposal |
payment_amount | Integer | Proposal Amount in DASH |
start_epoch | Integer | Start time (epoch) |
type | Integer | Type of teh proposal |
url | String | URL of the proposal |
Example
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
}
BlockchainProposalObject
Name | Type | Description |
---|---|---|
Hash | String (HEX) | Proposal hash |
CollateralHash | String (HEX) | Colateral Proposal hash |
DataHex | String (HEX) | Hashed Proposal Data |
DataObject | JSON | Proposal data object |
CreationTime | Integer | Proposal creation time (epoch) |
FundingResult | JSON | VoteCountObject |
ValidResult | JSON | VoteCountObject |
DeleteResult | JSON | VoteCountObject |
EndorsedResult | JSON | VoteCountObject |
Example
[
{
"Hash":"83b86bb19438144468576a257e312e5e674e778a47990c6af6338a3f92536302",
"CollateralHash":"329f3802ebdad3088668f837ad74ab22e8853c03bf2ed15440d4108115d531b8",
"DataHex":"5b5b2270726f706f73616c222c7b22656e645f65706f6368223a313532363635323233352c226e616d65223a22444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65222c227061796d656e745f61646472657373223a2258666d36717653327567784c39753156363453516571627a74596a714e5531717178222c227061796d656e745f616d6f756e74223a3333372c2273746172745f65706f6368223a313532343037363735352c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e7472616c2e6f72672f702f444153482d56656e657a75656c612d31332d6369746965732d313630302d70656f706c65227d5d5d",
"DataObject":
{
"end_epoch":1526652235,
"name":"DASH-Venezuela-13-cities-1600-people",
"payment_address":"Xfm6qvS2ugxL9u1V64SQeqbztYjqNU1qqx",
"payment_amount":337,
"start_epoch":1524076755,
"type":1,
"url":"https://www.dashcentral.org/p/DASH-Venezuela-13-cities-1600-people"
},
"CreationTime":1523910440,
"FundingResult":
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
},
"ValidResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"DeleteResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
},
"EndorsedResult":
{
"AbsoluteYesCount":0,
"YesCount":0,
"NoCount":0,
"AbstainCount":0
}
}
]
VoteCountObject
Name | Type | Description |
---|---|---|
AbsoluteYesCount | Integer | Number of Absolute Yes Votes |
YesCount | Integer | Number of Yes Votes |
NoCount | Integer | Number of No Votes |
AbstainCount | Integer | Number of Abstain Votes |
Example
{
"AbsoluteYesCount":60,
"YesCount":89,
"NoCount":29,
"AbstainCount":0
}
BlockObject
Name | Type | Description |
---|---|---|
hash | String (HEX) | Hash of the block |
size | Integer | Size of the block |
height | Integer | Block height in the chain |
version | Integer | Block version number |
merkleroot | String (HEX) | 256-bit hash based on all of the transactions in the block |
tx | Array of Strings | Array of tx hashes in the block |
time | Integer | Timestamp as seconds since 1970-01-01T00:00 UTC |
nonce | Integer | 32-bit number (starts at 0) |
bits | String (Hex) | Current target in compact format |
difficulty | Float | Difficulty at which the block was mined |
chainwork | String (HEX) | Total number of hashes that are expected to have been necessary to produce the current chain |
confirmations | Integer | Number of confirmations |
previousblockhash | String (HEX) | 256-bit hash of the previous block header |
nextblockhash | String (HEX) | 256-bit hash of the next block header |
reward | String | Reward received |
isMainChain | Boolean | Is the block part of the main chain |
poolInfo | PoolObject | Information about the pool on which the block was mined |
Example
{
"hash":"000000000000003d34c3254c70afb7ecefe0cb5952dfcc8b43f63c65f0054176",
"size":456,
"height":855987,
"version":536870912,
"merkleroot":"13828491a5dad3b90e167cf0f8e1e94c8df7f2e45068c735e6e4b09fc7141efa",
"tx":
[
"325f86ccdfb528c2302d851351f7ef81e4dd6c786ba140c0efc3983af9730e78",
"559b49fadb483ef92ad58476bc39301e72f00b12943a0dd2423a7794d6f38f57"
],
"time":1524120132,
"nonce":1263333077,
"bits":"19487ec7",
"difficulty":59243927.02142496,
"chainwork":"000000000000000000000000000000000000000000000623078cb7febf9ace37",
"confirmations":8,
"previousblockhash":"000000000000001c887b1eeab66dd72223a3f4979d38076eacec71d9480a5a01",
"nextblockhash":"000000000000002ba9667962e9c010c7106998027ff956b27f48d991eb50dc59",
"reward":"3.34559819",
"isMainChain":true,
"poolInfo":
{
}
}
Example
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
Example
{
"blockHash":"0000000000000023d9d8fefa79adbad2df8cb0b61f7cb5c591f56d719f108159"
}
Example
{
"rawblock":"00000020015a0a48d971ecac6e07389d97f4a32322d76db6ea1e7b881c00000000000000fa1e14c79fb0e4e635c76850e4f2f78d4ce9e1f8f07c160eb9d3daa591848213443ad85ac77e4819d5ee4c4b0201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03b30f0d04443ad85a08a4e19361340100000c2f436f696e4d696e65504c2f0000000002de59f909000000001976a914ee5c2e032d02f6f7b08fcc21e0025f0baeb056b088acd759f909000000001976a9149d0d46f36bc90aef04803b53fb5f76c5c4325ced88ac0000000001000000010786d7d9f0dd99cde3bb01064f7de00994b0a5cd0c2b9cb20a829772380b98ec010000006a47304402206322cd2d5e63641c79ca9024c6999625ffc9abe906b2ad3384951676697eced4022063084ce0f306f5e808c04077663077eebe100d1a03f997ec2b95a784811debfc012102cce17aebe0a7984c1a95823df914152daee65bd64f2625d7f82eadde54521738feffffff0240420f00000000001976a9148a3b9c1327cf24f99f57d95cb0ecf10342a6417c88acccfe4d00000000001976a914e99064a50c9756e7dcef5eff03c4e35fd927bbc088aca10f0d00"
}
BlocksPaginatedObject
Name | Type | Description |
---|---|---|
block | Array of BlockPagObject | Array of BlockPagObjects |
length | Integer | Number of blocks |
pagination | PaginationObject | Pagination metadata |
Example
{
"blocks":
[
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
},
{
"height":847605,
"size":28153,
"hash":"000000000000001a28cb810f76361bea791e8d9fb6addda8928916dbb367b5ba",
"time":1522799546,
"txlength":14,
"poolInfo":
{
}
}
],
"length":2,
"pagination":
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
}
BlocksPagObject
Name | Type | Description |
---|---|---|
height | Integer | Block height in the chain |
size | Integer | Size of the block |
hash | String (HEX) | Hash of the block |
time | Integer | Timestamp as seconds since 1970-01-01T00:00 UTC |
txlength | Integer | Number of transactions in the block |
poolInfo | PoolObject | Information about the pool on which the block was mined |
Example
{
"height":847606,
"size":11315,
"hash":"0000000000000011c33a17cffcee559bf18b38f479462c1426cabd71ce57d944",
"time":1522799887,
"txlength":21,
"poolInfo":
{
"poolName":"AntMiner",
"url":"https://bitmaintech.com/"
}
}
PaginationObject
Name | Type | Description |
---|---|---|
next | String | Next date in format YYYY-MM-DD |
prev | String | Previous date in format YYYY-MM-DD |
currentTs | Integer | Current timestamp since epoch |
current | String | Current date in format YYYY-MM-DD |
isToday | Boolean | Is current day from the request today |
more | Boolean | Is there more than specified number of resources |
moreTs | Integer | Timestamp since epoch |
Example
{
"next":"2018-04-04",
"prev":"2018-04-02",
"currentTs":1522799999,
"current":"2018-04-03",
"isToday":false,
"more":true,
"moreTs":1522800000
}
TransactionObject
Name | Type | Description |
---|---|---|
txid | String (HEX) | Hash of the transaction |
version | Integer | Version |
locktime | Integer | Timestamp since epoch - time at which a particular transaction can be added to the blockchain. |
vin | Array of TxIN | Array of TxIN Objects - input transactions |
vout | Array of TxOUT | Array of TxOUT Objects - output transactions |
blockhash | String (HEX) | Hash of the block containing tx |
blockheight | Integer | Height of the block containing the transaction |
confirmations | Integer | Number of confirmations |
time | Integer | Timestamp of the transaction since epoch |
blocktime | Integer | Block timestamp since epoch |
valueOut | Float | Output Value in DASH |
size | Integer | Size of the tx in bytes |
valueIn | Float | Input Value in DASH |
fees | Float | Network fee for the transaction |
isCoinBase | Boolean | Is the transaction general one created by miner/first in a block. |
txlock | Boolean | If the transaction is sent and verified via Instant Send the value will be True |
Example
{
"txid":"9ba81f11c028e245c3628fd849907eca0b268520f31420140957593b1d1af04e",
"version":1,
"locktime":0,
"vin":
[
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
},
{
"txid":"2c51645084cbe85a226e48692bb359b58341f49dd0529954a6ec90cdc05228ef",
"vout":1,
"sequence":4294967295,
"n":1,
"scriptSig":
{
"hex":"483045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd27210121023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2",
"asm":"3045022100be8867da8d87cccc9bda5c5430be3407be7d234d68edce900284f8381ece875a02204737ae7a055378e8f864d5549595afe5a1d8cb2f255f58fd846b9c300cdd2721[ALL] 023e11be15d95f6e21698bd05084d67db390dd7a774a379322e2bbdf3801faa6a2"
},
"addr":"XiCLFh6yty5aeCRrB4H9BGCfvgcd61HtqH",
"valueSat":410617230,
"value":4.1061723,
"doubleSpentTxID":null
}
],
"vout":
[
{
"value":"4.58822623",
"n":0,
"scriptPubKey":
{
"hex":"76a914f9a86dca25067c5bf4a784aebd27080f3ec06f4c88ac",
"asm":"OP_DUP OP_HASH160 f9a86dca25067c5bf4a784aebd27080f3ec06f4c OP_EQUALVERIFY OP_CHECKSIG",
"addresses":
[
"XySurfMBRDFFXhwWnLRYk6LPzESyamG9c4"
],
"type":"pubkeyhash"
},
"spentTxId":"026cd76659232a3440028f1b706756546dfce29875a443a38db91b68d698e958",
"spentIndex":0,
"spentHeight":803642
}
],
"blockhash":"000000000000002067162ba82c79256015f8cbbab7d62c79f2393e026674307e",
"blockheight":801537,
"confirmations":54480,
"time":1515541051,
"blocktime":1515541051,
"valueOut":4.58822623,
"size":340,
"valueIn":4.58842623,
"fees":0.0002,
"txlock":false
}
TxIN
Name | Type | Description |
---|---|---|
txid | String (HEX) | Hash of the transaction |
vout | Integer | The index of the output being spent within the transaction. Zero based. |
sequence | Integer | Legacy 4-byte sequence number. A number intended to allow unconfirmed time-locked transactions to be updated before being finalized; |
n | Integer | |
scriptSig | ScriptSig Object | Signature script - a script included in the input which complies with conditions set by ScriptPubKey in order to spend funds. |
addr | String (HEX) | Address associated with the output of the previous transaction |
valueSat | Integer | Value in duffs |
value | Float | Value in DASH |
doubleSpentTxID | String (HEX) | ID of the double spend tx; Double spends are not currently tracked |
Example
{
"txid":"f2d8b042224c57740e5e867e1b317ed450f85fb2bb69d77bafcf975ca95efbc0",
"vout":1,
"sequence":4294967295,
"n":0,
"scriptSig":
{
"hex":"483045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d012102dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a",
"asm":"3045022100f52b7a776e0cd7c398fc794d46119a2b2a9273b88d9c044f79e694b5d1e97880022072eb161ca507eb5af20c63024404c44b0e691c45df6acdc4e2f7bf8229c84d4d[ALL] 02dfc9f8086e802047a5cefb745c3191c84f57bed47816f07a7bbe41ab134e228a"
},
"addr":"Xoj4Qqx69FU3HbEidASNctRb7JpHDFG9s1",
"valueSat":48225393,
"value":0.48225393,
"doubleSpentTxID":null
}
TxOUT
Name | Type | Description |
---|---|---|
value | Float | Value in DASH |
n | Integer | The index of the output being spent within the transaction. Zero based. |
scriptPubKey | ScriptPubKey Object | A script included in outputs which sets the conditions that must be fulfilled for funds to be spent. |
spentTxId | String (HEX) | Id of the transaction spending funds |
spentIndex | Integer | The main purpose is to efficiently determine the address and amount of an input's previous output. The second purpose is to be able to determine which input spent an output. |
spentHeight | Integer | Height of the block which includes the transaction |
Example
{
"value":"4.58822623",
"n":