Tools
About 1 min
Tools
BCH Address Format
GET
https://services.tokenview.io/vipapi/utils/cashaddr/{new-or-old-address}?apikey={apikey}
Parameters
- {new-or-old-address}: The new address or the old address of BCH.
- {apikey}: Get your activated apikey from the API system: https://services.tokenview.io
Note:
- If the address is invalid, it returns 40001 CODE,
- if it is valid, it returns both the new formatted address and the old formatted address as follows:
- cashAddress: new format address
- legacyAddress: classic format address
Request
curl --location https://services.tokenview.io/vipapi/utils/cashaddr/qzu9xxpgkkwnu3y00exnn3n5hpr355hrf55fyq3nw5?apikey={apikey}
Response
{
"code": 1,
"msg": "成功",
"data": {
"legacyAddress": "1Hocso77yXCtCLBQavyVkZaoLSAh5wLVb4",
"cashAddress": "bitcoincash:qzu9xxpgkkwnu3y00exnn3n5hpr355hrf55fyq3nw5"
}
}
DCR/HC Ticket Vote Revocation
GET
https://services.tokenview.io/vipapi/dcr/address/{ticket|vote|revocation}/{address}/{page}/{page-size}?apikey={apikey}
Parameters
- {ticket|vote|revocation}: ticket or vote or revocation;
- {address}: the address of DCR or HC;
- {page}: 1,2,3,......50 (Max);
- {page-size}: transactions per page. 50 transactions is the Max per page;
- {apikey}: Get your activated apikey from the API system: https://services.tokenview.io
Description:
DCR/HC compared to BTC, it has a STAKE mechanism.
STAKE operates through three special transactions: TICKET, VOTE, REVOCATION.
- ticket: Transaction in which the user buys a ticket;
- Vote: The user's vote is successful and the transaction that gets the stake income;
- revocation: The user vote is not selected, until the vote expires, the vote will be returned, which is equivalent to a refund transaction, and no stake income can be obtained.
Request
curl --location https://services.tokenview.io/vipapi/dcr/address/ticket/DsUNkwKT7DnAKbzRUQW1SPFwfgVnhJq7d8C/1/10?apikey={apikey}
Response
{
"code": 1,
"msg": "成功",
"data": [
{
"type": "address",
"network": "DCR",
"hash": "DsUNkwKT7DnAKbzRUQW1SPFwfgVnhJq7d8C",
"txCount": 2,
"spend": "-260.63145548",
"receive": "0",
"normalTxCount": 0,
"txs": [
{
"type": "tx",
"network": "DCR",
"block_no": 369192,
"height": 369192,
"index": 13,
"time": 1565345611,
"txid": "63043d08e4975c9fd5d448050b57e0f62bc78f7d64d02f86f36c14737b9c8f95",
"fee": "0.0000542",
"tType": "Ticket",
"confirmations": 172086,
"inputs": [
{
"input_no": 0,
"address": "DsUNkwKT7DnAKbzRUQW1SPFwfgVnhJq7d8C",
"value": "0.05011177",
"received_from": {
"output_no": 2,
"txid": "1e0c61d5e4f6952b16088e6904b2603438c791ba878b34a5bae5f79f90ecbe32"
}
},
{
"input_no": 1,
"address": "DsUNkwKT7DnAKbzRUQW1SPFwfgVnhJq7d8C",
"value": "130.26561597",
"received_from": {
"output_no": 3,
"txid": "1e0c61d5e4f6952b16088e6904b2603438c791ba878b34a5bae5f79f90ecbe32"
}
}
],
"outputs": [
{
"output_no": 0,
"address": "DcgbJdGsCBuoQm6TuiuAWjWYoKBHxfAJmVN",
"value": "130.31567354"
},
{
"output_no": 1,
"address": "DsSkjK6HdBGvGjCWV5koYL1ffRCsGUqoXK1",
"value": "0.0"
},
{
"output_no": 2,
"address": "DsQxuVRvS4eaJ42dhQEsCXauMWjvopWgrVg",
"value": "0.0"
},
{
"output_no": 3,
"address": "DsjD4PRqKttH6s3E6XTVKLpc6PdWjWFcuKL",
"value": "0.0"
},
{
"output_no": 4,
"address": "DsQxuVRvS4eaJ42dhQEsCXauMWjvopWgrVg",
"value": "0.0"
}
],
"inputCnt": 2,
"outputCnt": 5
},
{
"type": "tx",
"network": "DCR",
"block_no": 369192,
"height": 369192,
"index": 15,
"time": 1565345611,
"txid": "db6837c66ee53cbbe6090f02f5086005ae23e7e59fec58f5b02810f7ee9fd9c7",
"fee": "0.0000542",
"tType": "Ticket",
"confirmations": 172086,
"inputs": [
{
"input_no": 0,
"address": "DsUNkwKT7DnAKbzRUQW1SPFwfgVnhJq7d8C",
"value": "0.05011177",
"received_from": {
"output_no": 0,
"txid": "1e0c61d5e4f6952b16088e6904b2603438c791ba878b34a5bae5f79f90ecbe32"
}
},
{
"input_no": 1,
"address": "DsUNkwKT7DnAKbzRUQW1SPFwfgVnhJq7d8C",
"value": "130.26561597",
"received_from": {
"output_no": 1,
"txid": "1e0c61d5e4f6952b16088e6904b2603438c791ba878b34a5bae5f79f90ecbe32"
}
}
],
"outputs": [
{
"output_no": 0,
"address": "DcgbJdGsCBuoQm6TuiuAWjWYoKBHxfAJmVN",
"value": "130.31567354"
},
{
"output_no": 1,
"address": "DsSkjK6HdBGvGjCWV5koYL1ffRCsGUqoXK1",
"value": "0.0"
},
{
"output_no": 2,
"address": "DsQxuVRvS4eaJ42dhQEsCXauMWjvopWgrVg",
"value": "0.0"
},
{
"output_no": 3,
"address": "Dsn9qkguiAF1VAECaWv2dzyicBGhEr6DmPE",
"value": "0.0"
},
{
"output_no": 4,
"address": "DsQxuVRvS4eaJ42dhQEsCXauMWjvopWgrVg",
"value": "0.0"
}
],
"inputCnt": 2,
"outputCnt": 5
}
]
}
]
}