Elephant Node¶

The Elephant node is mainly used for the elephant wallet, the Elephant node itself contains the main chain node of the ELA and the ID chain node. Elephant Node extends features which Elephant wallet requires.
Warning
Since software is written by humans, it can have bugs. Thus, if you have questions you are always welcome to issue your problem.
Contents¶
System Requirements and Installation Guide¶
Installation¶
Following is how we build elephant node in ubuntu.
Ubuntu¶
Install elaphant for linux
$ apt-get install build-essential
$ adduser elaphant
$ usermod -aG sudo elaphant
$ su - elaphant
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
$ echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.profile
$ source ~/.profile
$ brew tap elaphantapp/elaphant
$ brew install elaphant
update config.json similar to the following content:
{
"Configuration": {
"ActiveNet": "mainnet",
"HttpInfoPort": 20333,
"HttpInfoStart": true,
"HttpRestPort": 20334,
"HttpRestStart": true,
"HttpWsPort": 20335,
"HttpWsStart":true,
"HttpJsonPort": 20336,
"EnableRPC": true,
"NodePort": 20338,
"PrintLevel": 1,
"PowConfiguration": {
"PayToAddr": "EeEkSiRMZqg5rd9a2yPaWnvdPcikFtsrjE",
"MinerInfo": "ELA",
"MinTxFee": 100
},
"RpcConfiguration": {
"User": "clark",
"Pass": "123456",
"WhiteIPList": [
"127.0.0.1"
]
}
}
}
Extra feature configure:
{
// Whether or not earn node reward , if set to false , your node will not receive transaction reward
"EarnReward":true,
// How many utxo we bundle together to create multi-transaction
"BundleUtxoSize":700
}
if you only want to syncing the node to the current height, you can run:
$ elaphant --pure
after fulling synced . you can stop the node and restart it with more startup options
$ elaphant --key "{private key}" --password "{keystore password}"
Nginx config Example:
server { # simple reverse-proxy
server_name exmaple.com;
access_log /var/log/nginx/node.access.log;
# pass requests for dynamic content to rails/turbogears/zope, et al
location ~ ^/api/[v]?1/wrap/rpc {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20336;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/node {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/block {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/transaction {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/asset {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/transactionpool {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/balance {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/createTx {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/createVoteTx {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/history {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?2/history {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?3/history {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/sendRawTx {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/pubkey {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/currHeight {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/dpos {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/fee {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/node/reward/address {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/spend/utxos {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/tx {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/crc {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/api/[v]?1/simple {
if ($request_method = OPTIONS ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
proxy_pass http://localhost:20334;
proxy_connect_timeout 120s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/exmaple.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/exmaple.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = exmaple.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name exmaple.com;
listen 80;
return 404; # managed by Certbot
}
Restful Guide¶
maxdepth: | 3 |
---|
Basic Api¶
Inherited basic api from ELA.
Get connected node¶
-
GET
/api/v1/node/connectioncount
¶ Example request:
GET /api/v1/node/connectioncount HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":8 }
Status Codes: - 200 OK – no error
- 400 Bad Request – bad request
- 404 Not Found – not found request
- 500 Internal Server Error – internal error
- 10001 – process error
Get node statistic¶
-
GET
/api/v1/node/state
¶ Example request:
GET /api/v1/node/state HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":{ "compile":"v0.3.3-3-ge874-dirty", "height":584477, "version":20000, "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "port":24338, "rpcport":24336, "restport":24334, "wsport":24335, "neighbors":[ { "netaddress":"162.62.21.212:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:52 +0000 UTC", "lastrecv":"2020-02-26 04:47:54 +0000 UTC", "conntime":"2020-02-26 04:41:02.742424016 +0000 UTC m=+2254776.634971872", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584473, "lastblock":584476, "lastpingtime":"2020-02-26 04:47:32.899397483 +0000 UTC m=+2255166.791945330", "lastpingmicros":155494 }, { "netaddress":"185.86.106.223:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:51 +0000 UTC", "lastrecv":"2020-02-26 04:47:54 +0000 UTC", "conntime":"2020-02-26 04:07:36.535976089 +0000 UTC m=+2252770.428523938", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584459, "lastblock":584476, "lastpingtime":"2020-02-26 04:47:36.684850417 +0000 UTC m=+2255170.577398275", "lastpingmicros":148309 }, { "netaddress":"54.183.176.109:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:56 +0000 UTC", "lastrecv":"2020-02-26 04:47:56 +0000 UTC", "conntime":"2020-02-26 04:41:56.067652289 +0000 UTC m=+2254829.960200145", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584473, "lastblock":584477, "lastpingtime":"2020-02-26 04:47:56.130485249 +0000 UTC m=+2255190.023033121", "lastpingmicros":62632 }, { "netaddress":"3.104.174.31:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:58 +0000 UTC", "lastrecv":"2020-02-26 04:47:58 +0000 UTC", "conntime":"2020-02-26 04:31:33.040417282 +0000 UTC m=+2254206.932965133", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584470, "lastblock":584476, "lastpingtime":"2020-02-26 04:47:33.257087077 +0000 UTC m=+2255167.149634924", "lastpingmicros":216330 }, { "netaddress":"47.93.230.171:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:58 +0000 UTC", "lastrecv":"2020-02-26 04:47:59 +0000 UTC", "conntime":"2020-02-26 03:54:56.889807839 +0000 UTC m=+2252010.782355671", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584454, "lastblock":584477, "lastpingtime":"2020-02-26 04:47:58.81163559 +0000 UTC m=+2255192.704183442", "lastpingmicros":808116 }, { "netaddress":"35.177.146.116:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:56 +0000 UTC", "lastrecv":"2020-02-26 04:47:56 +0000 UTC", "conntime":"2020-02-26 04:33:26.197146758 +0000 UTC m=+2254320.089694603", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584470, "lastblock":584477, "lastpingtime":"2020-02-26 04:47:56.295881164 +0000 UTC m=+2255190.188429008", "lastpingmicros":98534 }, { "netaddress":"39.100.1.118:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:57 +0000 UTC", "lastrecv":"2020-02-26 04:47:58 +0000 UTC", "conntime":"2020-02-26 04:42:57.670616216 +0000 UTC m=+2254891.563164068", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584473, "lastblock":584477, "lastpingtime":"2020-02-26 04:47:57.913184592 +0000 UTC m=+2255191.805732436", "lastpingmicros":242182 }, { "netaddress":"45.76.163.153:20338", "services":"SFNodeNetwork|SFTxFiltering|SFNodeBloom", "relaytx":false, "lastsend":"2020-02-26 04:47:56 +0000 UTC", "lastrecv":"2020-02-26 04:47:57 +0000 UTC", "conntime":"2020-02-26 04:41:25.958005353 +0000 UTC m=+2254799.850553201", "timeoffset":0, "version":20000, "inbound":false, "startingheight":584473, "lastblock":584477, "lastpingtime":"2020-02-26 04:47:56.204527199 +0000 UTC m=+2255190.097075049", "lastpingmicros":304377 } ] } }
Get transactions of specific height¶
-
GET
/api/v1/block/transactions/height/(int:`height`)
¶ Example request:
GET /api/v1/block/transactions/height/500000 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":{ "Hash":"3414e7b4dcd5f005fa86c601a56ae3404446bdb4ddf9cd3c4076d77769d77b07", "Height":500000, "Transactions":[ "1cd6756088f3c19726e3f98cf48074d06d44d58988e64a03945d21118ef721e1", "7faff260fc90eb28a36469875798ae2109013dc54f8f677b507a632b2e93ddb0", "9af3d82ecb43bb3141abfce4844275f537641c6546e13a30afa1e1930372047f" ] } }
Get block details of specific height¶
GET
/api/v1/block/details/height/(int:`height`)
¶Example request:
GET /api/v1/block/details/height/241762 HTTP/1.1 Host: localhostExample response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":{ "hash":"8eec0b990b713864b1025438b17cd5567050a032ac18c574f94fcb3a0952f1f0", "confirmations":342718, "strippedsize":1463, "size":1463, "weight":5852, "height":241762, "version":0, "versionhex":"00000000", "merkleroot":"6862548a0ce7c99a9ec7b8606ed036b98b917d699f85fda1eff5d2b4a6f7bdb1", "tx":[ { "txid":"374e452e9f021d381e0ea69a6518456bf25ef8f29cce8d651efa071f38cc46b5", "hash":"374e452e9f021d381e0ea69a6518456bf25ef8f29cce8d651efa071f38cc46b5", "size":263, "vsize":263, "version":0, "type":0, "payloadversion":4, "payload":{ "coinbasedata":"/BTC.com/" }, "attributes":[ { "usage":0, "data":"3e6bac9213661a2e" } ], "vin":[ { "txid":"0000000000000000000000000000000000000000000000000000000000000000", "vout":65535, "sequence":4294967295 } ], "vout":[ { "value":"1.50699931", "n":0, "address":"8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null }, { "value":"1.75816586", "n":1, "address":"EMWsru8XhpQxJ7CvDzgAea1WroJqskPmqd", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null }, { "value":"1.75816588", "n":2, "address":"8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null } ], "locktime":241762, "programs":[ ], "blockhash":"8eec0b990b713864b1025438b17cd5567050a032ac18c574f94fcb3a0952f1f0", "confirmations":342718, "time":1541697961, "blocktime":1541697961 }, { "txid":"968ff4836325dc8859ab3d35e4dffb593657580a1fd375c3bec026dfeee27057", "hash":"968ff4836325dc8859ab3d35e4dffb593657580a1fd375c3bec026dfeee27057", "size":369, "vsize":369, "version":0, "type":5, "payloadversion":0, "payload":{ "blockheight":70069, "sideblockhash":"0345241197a42efcaabd0c9b75591b2e77966f28a6f9684d6c79f7876bf2db1a", "sidegenesishash":"a3c455a90843db2acd22554f2768a8d4233fafbf8dd549e6b261c2786993be56", "signature":"05cafd37be63d8f8d7f0c7ee1114748bcbcbc293c47a08cbb26d155aeae30bc7c306c40993ac9c358aeb9c91cc452fb6ebd96170209065ec1db03a8c0a791126" }, "attributes":[ { "usage":0, "data":"32393131383339383939303638393935373938" } ], "vin":[ { "txid":"46e4280b2b14a1ab388d2201bf3f8c10b53d044a8da3cc6b44c204f0d885a8fe", "vout":0, "sequence":0 } ], "vout":[ { "value":"0.88000000", "n":0, "address":"Ee6QKDdppJVFpSBbi7fDUGexB63Fhojq4x", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null } ], "locktime":173080, "programs":[ { "code":"210283f3669665aae4fbcf449a40711bef79738d310148072be2c3c693521f6388cfac", "parameter":"40494702c2e01d55122e50fa78e93efb7b45e9815a32188085832c220b2f54e8db755694b95a5535d5357d8f5fff6bc81590ac5ea2e8ffc91dd5823ff83f2cf875" } ], "blockhash":"8eec0b990b713864b1025438b17cd5567050a032ac18c574f94fcb3a0952f1f0", "confirmations":342718, "time":1541697961, "blocktime":1541697961 } ], "time":1541697961, "mediantime":1541697961, "nonce":0, "bits":407586820, "difficulty":"33636174024461", "chainwork":"00053abd", "previousblockhash":"82b9995b83661b6948c12e9f4753408de78f0c19777b3c2315ca0225ae00c2d0", "nextblockhash":"712f9148b995b6cc805cdf1a90559bef8cc66b7563ab6dc0c9af222817e4a818", "auxpow":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4b03ab610804ac71e45b662f4254432e434f4d2ffabe6d6d716d6f5038f3decca7c5f4a0e8cc685ead4d836f8ef68ef9685e73b4bb855407020000004204cb9a02f086897635000000000000ffffffff0297b5444b0000000016001497cfc76442fe717f2a3f0cc9c175f7561b6619970000000000000000266a24aa21a9ed6f482705165c16db244014dcbdf715c34766e9b6d2621e1a1042620b73ed951e000000000000000000000000106d15a5a3ba162641ecc680ef7d8f91d9885ad06c548c790cce9e5f2725f04fe03a6ef5bf9317713249cbb6018f634f3759c16bf6e5dd778ec1ecfcc4c07b56d674f11d5569df7f1ee8637788875f48154f5f33da7ef42392633fc54537b7ab033c55b70f74072f1667ffc2bf5df1b426b8430eb5d21f04602fb3f6c8c37d2c671af3a54220c2606da9b603c65c6778452c261fcf9ad0241cce8a625e74512905d31d9eb588655bb8f62fa5858e61ae4a36437baba4d1fe853dd995e707cfc84df88f733e41491ead3a8c84f3d388165cd04fbfa96a257c15854d8f0f317dfa1a9538202d115ff16b6b6902388d1b76b1dbc165843448d2667c5559c18429dc2e6be41fff04e6efa468a78dca63f46487f01dcdfcf969e63994984b5c7d2a5157f12e6eaf5d16470f88fe3793a44cd5da2433e27229aa348d99db78ef550b69c17b7a3653e26b982a1b27009108a4d355edb2b111ef9cc817c8423a3044c6eb80e9c30fcce30ad5417f3f77257d264af32859d017d1756703ef4662b126ae848d1c9eb3e70951bd17499c9c08b053a4a2e0b7866afb7e629e000000000149ce0b03cab8637d3d34d6dbf37ede65a5138f9b50132679e5db276327d0148a000000000000c0201f60476432592a6a13f5a015934112a2f7392ef917cb04000000000000000000bdbd9c4aa35dacac9ed35db970d66363557d3268d942fb313824de46bcca0063aa71e45b922d2717053e91cb", "minerinfo":"/BTC.com/" } }
Get block details through block hash¶
-
GET
/api/v1/block/details/hash/(String:`hash`)
¶ Example request:
GET /api/v1/block/details/hash/82b9995b83661b6948c12e9f4753408de78f0c19777b3c2315ca0225ae00c2d0 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":{ "hash":"82b9995b83661b6948c12e9f4753408de78f0c19777b3c2315ca0225ae00c2d0", "confirmations":342720, "strippedsize":1462, "size":1462, "weight":5848, "height":241761, "version":0, "versionhex":"00000000", "merkleroot":"0de14456b6118d3afa02c61733b8b1d4c7d0634ccd97f1bdc142a4e6d29b1635", "tx":[ "763a249fb120a29c2f08d5e09c7854e81921a7e3dde16a225afe91bd675def31", "b1eb2c4b4750d4c3064150efdeed27ed5260f6d5c53da69a72e1af994b054ea1" ], "time":1541697928, "mediantime":1541697928, "nonce":0, "bits":407586820, "difficulty":"33636174024461", "chainwork":"00053abf", "previousblockhash":"9ba12773f8694cfc2c56f6f77e8c2bd58275e139b2d23fab1bb21cbcba643c7a", "nextblockhash":"8eec0b990b713864b1025438b17cd5567050a032ac18c574f94fcb3a0952f1f0", "auxpow":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4b03ab6108048d71e45b652f4254432e434f4d2ffabe6d6d024933e513d2e839c73e438a487e0159d3dea32e261e1572248efe8ed4b30213020000004204cb9a02e61332a06c010000000000ffffffff02d9bc354b0000000016001497cfc76442fe717f2a3f0cc9c175f7561b6619970000000000000000266a24aa21a9ed68720e114225662de7372412364a5e4598767b5087632429871e3da18e2da5cc0000000000000000000000000fb4cd3c85fb049255cf65dbaacc14090c132f5ca35ddda60cce9e5f2725f04fe03a6ef5bf9317713249cbb6018f634f3759c16bf6e5dd778e78bd24d68beee88d7be8398fe3a8df498a907107d2abd54993b29c7cc56ee73c092d0fd2815310fa30749b4b5a42b83a4c7bb542e16bc978aeac593b7a0f14e703f1b6b13dc2151a8cc908807a15f3556909e32c83b3170b0cc49c5ee756b81e533c38ef9c70f5b4f67fe44435bf7450852cd05999a501354d36a0a50e472120fb58d72f35d7756bbdfee12c4716caa6a0a5c7255bb9c5f2786870c60c12fd78b359f15b3d77e741c69ed6549034fcb5b45585d6a6c0a4a2ae594f9bc4be21cffbd894513949002935d4d8c4e1b615dd6680983d344e8a5b3394b76e4b0c4419dd5d9f5ce1fea4bc35d58c176b366a2d8fb937dfdd23899f0f9ff90d21b443eb6976ac42555c0c20d3447457fcc00bed940ab397e51e76c2339758823fcb0b96d4a4c57046f7b4c0ff519d597688728da53437083de964a078329f45d706089a79d3a75f02dc28b344eb87e181d9355fb35363e3e91d7f494001c48c4c229b6b000000000149ce0b03cab8637d3d34d6dbf37ede65a5138f9b50132679e5db276327d0148a00000000000000201f60476432592a6a13f5a015934112a2f7392ef917cb04000000000000000000b071911dea748824d40ac849afcb94d26030cb8840174f50c53b305a79b06aac8c71e45b922d27175e1d609d", "minerinfo":"/BTC.com/" } }
Get current best height¶
-
GET
/api/v1/block/height
¶ Example request:
GET /api/v1/block/height HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":584480 }
Get block hash by height¶
-
GET
/api/v1/block/hash/(int:`height`)
¶ Example request:
GET /api/v1/block/hash/100 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":"e0fd5ca06bd36959edd20b8b63b87dcb09938d09583371c1e0a54f82ca6f22dc" }
Get transaction through hash¶
-
GET
/api/v1/transaction/(string:`hash`)
¶ Example request:
GET /api/v1/transaction/7faff260fc90eb28a36469875798ae2109013dc54f8f677b507a632b2e93ddb0 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":{ "txid":"7faff260fc90eb28a36469875798ae2109013dc54f8f677b507a632b2e93ddb0", "hash":"7faff260fc90eb28a36469875798ae2109013dc54f8f677b507a632b2e93ddb0", "size":368, "vsize":368, "version":0, "type":5, "payloadversion":0, "payload":{ "blockheight":117531, "sideblockhash":"5648292748989e38c66b4b0b49a1a84254a46cfd9a0780ea8857929cc0aec2db", "sidegenesishash":"0e739a2b87774ef2266a3cabc79a8e1201732fe409cfe50bd4125efb1d1169b5", "signature":"214746352fe525aadb37963c1f13676ebe1aaf2ef799640b9a5593402a195ae17453e78a35861c1efd012f61932b65e43fc964b5608c2e8fa4be23b7cf9204b8" }, "attributes":[ { "usage":0, "data":"313735303232373736313639353432333437" } ], "vin":[ { "txid":"0d59c1a66866c2bb89bc7680d6a2b8d5b065a588e770939b7dc9c611a4c0c9ad", "vout":0, "sequence":0 } ], "vout":[ { "value":"0.00950000", "n":0, "address":"EXeog2edenqtrJM3wnWHmWZzmyataX6pgh", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null } ], "locktime":499998, "programs":[ { "code":"21035f8dae2962cf3938e7e7d07931640078e9cb1a11e9e82e9b97ecf98bbd1891a9ac", "parameter":"401df0443c1e8d2a953e94b5eb9aa9cd683356e0196a926244d79165c150a8d6bfcd88900fee18ba1692de725aa26a2549936bcc3080677d9f4175ed1754f8959e" } ], "blockhash":"3414e7b4dcd5f005fa86c601a56ae3404446bdb4ddf9cd3c4076d77769d77b07", "confirmations":84483, "time":1572553853, "blocktime":1572553853 } }
Get asset¶
-
GET
/api/v1/asset/(String:`hash`)
¶ Example request:
GET api/v1/asset/a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":{ "Name":"ELA", "Description":"", "Precision":8, "AssetType":0, "RecordType":0 } }
Get balance of address¶
-
GET
/api/v1/asset/balances/(String:`addr`)
¶ Example request:
GET /api/v1/asset/balances/EbKEBwgbRGbn6AWbZBS1WjsZXWeNLnJYnb HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":"407.31173027" }
Get balance of specific asset¶
-
GET
/api/v1/asset/balance/(String:`addr`)/(String:`assetid`)
¶ Example request:
Get /api/v1/asset/balance/EbKEBwgbRGbn6AWbZBS1WjsZXWeNLnJYnb/a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":"407.31173027" }
Get utxos of address¶
-
GET
/api/v1/asset/utxos/(String:`addr`)
¶ Example request:
Get /api/v1/asset/utxos/EgJda6QVAuHLxYb1x3wC7iibK92P1z2RDx HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":[ { "AssetId":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "AssetName":"ELA", "Utxo":[ { "Txid":"02b93efcb889c38c40da14984aeac9ee178c57656557163dd1415643865e616b", "Index":338, "Value":"0.00000080" }, { "Txid":"9de0e1ff61632530d0960ddba3bdb7059bfc459d6f70a1af5db2f51da263560e", "Index":172, "Value":"0.00000023" } ] } ] }
send raw transaction¶
-
POST
/api/v1/transaction
¶ Example request:
POST /api/v1/transaction HTTP/1.1 Host: localhost { "method":"sendrawtransaction", "params":{ "data":"0200018103454C4101785493739352EEDD46CDC2D620A5617D51B36DAE82ED86D27EB30C2113D74EC900000000000002B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A3AD667200000000000000000021CE40892C0F9704CC910E55493675843BBDED8108B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A3CA5A26000000000000000000218BCACF1CD7571BE6EC9DC79E083156BD1A612862000000000141401A06AC2C689E2B677A7ADC681F6D006346992DF15E06840F9FBB7F8BE7D85BAE0C737EBA16B40372D44CC3E07B38B6B05EE81256EA0513393625059FFB45D765232102E8CF7361653096EE6AA65FEB629360BF9E5DF47B3BAAADED41EF0ED08463B429AC" } }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":"c9fdcfaac3372015e9f574e1617bf6275af747a14c2cb901c01097e38e006711" }
Get transaction pool¶
-
GET
/api/v1/transactionpool
¶ Example request:
Get /api/v1/transactionpool HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Error":0, "Result":[ { "txid":"24abd1b4dfd7f5a1bc51a21c0eb5ae4d4af63e49f015e8f3b62d8dfeade9f634", "hash":"24abd1b4dfd7f5a1bc51a21c0eb5ae4d4af63e49f015e8f3b62d8dfeade9f634", "size":369, "vsize":369, "version":0, "type":5, "payloadversion":0, "payload":{ "blockheight":175178, "sideblockhash":"92f7dbcd41cadaa1fcc246b8231c9444f611a8ac5a64d9102dcc9c3cd04cc8c9", "sidegenesishash":"0e739a2b87774ef2266a3cabc79a8e1201732fe409cfe50bd4125efb1d1169b5", "signature":"6d44dd7762f5ec5e333b521e02fcbb0c1ceda075530ae20742ac9b92b1d87a2d583e01c1389457a149bdd77a2f3d5c4686ad0c21934d2c63cc9b3cb62d969f53" }, "attributes":[ { "usage":0, "data":"31363539333930323737353837373732353138" } ], "vin":[ { "txid":"45796056d9f9bc86278413ee34cbbe0c7234c532fbb481154e525405b598fbca", "vout":0, "sequence":0 } ], "vout":[ { "value":"0.00850000", "n":0, "address":"EYwEjpoQ3nxXUWEDEe4wfBq1ZxaQF7Xahc", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null } ], "locktime":584487, "programs":[ { "code":"210259f4cc2bc141f53cd8136fea3551857354962e601f83c279bf48e4d7d4f72219ac", "parameter":"403238917660902d643589856c068a0f83c337d64b15a64e10fb6876ea60aa4a963e672a4b15ee31ffbee5b518a339b9883ca6e2e98c4468bb7204878c91c928b0" } ], "blockhash":"", "confirmations":0, "time":0, "blocktime":0 }, { "txid":"69b03c2aa1a06bd8c2194fdb5518cd0347cdc5d0e5dbf94a2f6a3ab1dcaee3ff", "hash":"69b03c2aa1a06bd8c2194fdb5518cd0347cdc5d0e5dbf94a2f6a3ab1dcaee3ff", "size":369, "vsize":369, "version":0, "type":5, "payloadversion":0, "payload":{ "blockheight":302549, "sideblockhash":"4e726e726c986a400c36b4858cbb3caf5447075371ca82a3b4e5f51dd862d815", "sidegenesishash":"a3c455a90843db2acd22554f2768a8d4233fafbf8dd549e6b261c2786993be56", "signature":"5f61270d5e61dc52819ff49c18f70c3db0d857c02cb36072f77389a3a41bc8d69670c07aa47b2016dc70d4a25383174be26b78b25240ca972d0ac7166557febb" }, "attributes":[ { "usage":0, "data":"32333034373734313030343338343537343535" } ], "vin":[ { "txid":"926d7690fc71845ca56020f742037243bf4a4eab07427f09dba2fde4c89c6bc2", "vout":0, "sequence":0 } ], "vout":[ { "value":"0.00650000", "n":0, "address":"EeThPu5NKyp6xeY4YKbN4wneybHhLw8LVV", "assetid":"a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock":0, "type":0, "payload":null } ], "locktime":584487, "programs":[ { "code":"210308ed9ec322ce8baa19d9b0936500016c063f4ce3d9fc5b3d0ad7f3957e2b6084ac", "parameter":"400c70fa3663876d40c3ed511b0fe6e87cd49676c1d295cf82a860d10b399ae0188f8e28344f9d6fe6b8e81612e6311fe7189809f6315f9366b215ed32370b49c2" } ], "blockhash":"", "confirmations":0, "time":0, "blocktime":0 } ] }
Enhancement Api¶
Much more powerful api you might be need .
Get dpos producer vote statistics¶
producer’s vote statistics of specific height
-
GET
/api/v1/dpos/producer/(string:`producer_public_key`)/(int:`height`)
¶ Example request:
GET /api/v1/dpos/producer/03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800/9999999 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"2638f858000dd118015daa7b1ee23c86e1c0738b5e641265d52f6612c527c672", "N":0, "Value":"4999", "Outputlock":0, "Address":"EbeD11dua88L9VQtNmJuEez8aVYX294CML", "Block_time":1551800055, "Height":233745 }, { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"82fce02fb0e835102eb37633e513e78c825a534d46146962391866e25bf8005c", "N":0, "Value":"9999", "Outputlock":0, "Address":"EKmp4dqTSMVW2f2H3x5H2A6vQf7FJV8Frj", "Block_time":1551838308, "Height":234056 }, { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"74f2beb77f15fcc6f36e43533aec254fc17b84edbb7e2b3a625c9ac2867a7435", "N":0, "Value":"123", "Outputlock":0, "Address":"EWHEoukFBK6AyMjuS9ucxhQ2twS7BKQEv8", "Block_time":1551838618, "Height":234058 }, { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"1a71b89c5e6c1b9baf31884f075f5e3ea159d8edfe5d665a2f5182d0c715ff91", "N":0, "Value":"9999", "Outputlock":0, "Address":"EYZt2Xk76NNFEHiihqkyBhyzuw1abcheXF", "Block_time":1551850832, "Height":234161 }, { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"71083736e824c73e4b327a8b958dbbd00aec879768a96963cbdfc5008e1bd393", "N":0, "Value":"0.01111111", "Outputlock":0, "Address":"ELbKQrj8DTYn2gU7KBejcNWb4ix4EAGDmy", "Block_time":1551851053, "Height":234163 }, { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"fbc81da6db6db5cb09c76fe405cf238353a8e837dda5acacd137ba43a9da1d02", "N":0, "Value":"9999", "Outputlock":0, "Address":"ENaaqePNBtrZsNbs9uc35CPqTbvn8oaYL9", "Block_time":1551853616, "Height":234180 }, { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Vote_type":"Delegate", "Txid":"82529a764fd1bbdd4ae39e9bb791d029ecb3010b7db48a7b5d1edfe8be71f36e", "N":0, "Value":"9999", "Outputlock":0, "Address":"Ea3XHVqFiAjYA4sSCTQSmrWQafGkbxaYxe", "Block_time":1551853616, "Height":234180 } ], "status":200 }
Status Codes: - 200 OK – no error
- 400 Bad Request – bad request
- 404 Not Found – not found request
- 500 Internal Server Error – internal error
- 10001 – process error
Get dpos voter’s statistics¶
voter’s statistics
-
GET
/api/v1/dpos/address/(string:`address`)?pageSize=(int:`pageSize`)&pageNum=(int:`pageNum`)
¶ Example request:
GET /api/v1/dpos/address/ENaaqePNBtrZsNbs9uc35CPqTbvn8oaYL9?pageSize=1&pageNum=1 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Vote_Header":{ "Value":"199.99935700", "Node_num":1, "Txid":"5a0d7958ff9677eef0fa7194db788add8722cf91fdaedc28c12acb677a58f8b3", "Height":266138, "Nodes":[ "033c495238ca2b6bb8b7f5ae172363caea9a55cf245ffb3272d078126b1fe3e7cd" ], "Block_time":1555574076, "Is_valid":"NO" }, "Vote_Body":[ { "Producer_public_key":"033c495238ca2b6bb8b7f5ae172363caea9a55cf245ffb3272d078126b1fe3e7cd", "Value":"313289.9935201299", "Address":"Eb8UHkQ2bJ4Ljux4yBePFdxB5Yp77VYHyt", "Rank":2, "Ownerpublickey":"033c495238ca2b6bb8b7f5ae172363caea9a55cf245ffb3272d078126b1fe3e7cd", "Nodepublickey":"03c18abb98f6679064bd44121f3b0a3f25dea1a8b8cb0e1b51dc9c26729f07ddc9", "Nickname":"我怎么这么好看", "Url":"www.douniwan.com", "Location":263, "Active":false, "Votes":"311315.30210000", "Netaddress":"8.8.8.8", "State":"Activate", "Registerheight":232288, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":1, "Reward":"0", "EstRewardPerYear":"47013.01092436" } ] } ], "status":200 }
Get producers of specific transactions¶
-
POST
/api/v1/dpos/transaction/producer
¶ Example request:
POST /api/v1/dpos/transaction/producer HTTP/1.1 Host: localhost { "txid":[ "59b6b468f75856b7980525ad7a1278e4998959211f57d81755e4248982fd18b8" ] }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Producer":[ { "Ownerpublickey":"02b28266ff709f4764374c0452e379671e47d66713efb4cce7812b3c9f4a12b2bc", "Nodepublickey":"02b28266ff709f4764374c0452e379671e47d66713efb4cce7812b3c9f4a12b2bc", "Nickname":"DHG(大黄哥)", "Url":"www.eladhg.com", "Location":86, "Active":false, "Votes":"263036.79130980", "Netaddress":"", "State":"Activate", "Registerheight":361360, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":6 }, { "Ownerpublickey":"025220c50d7ba72c8f5a78972b4d157339d5a02d3ed8639f01dbae6c14de5585cb", "Nodepublickey":"02c29d33e3caf772f153c5d866ee799d5d4ad38d5efe402d3d5fa980ae5fb5f9a1", "Nickname":"greengang", "Url":"www.ptcent.com", "Location":86, "Active":false, "Votes":"239143.67333523", "Netaddress":"", "State":"Activate", "Registerheight":360878, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":14 }, { "Ownerpublickey":"02f2101d918e95b9df92e58322f7b7d70a134dd0bf441c25758fe8a9a64e712ebd", "Nodepublickey":"02f2101d918e95b9df92e58322f7b7d70a134dd0bf441c25758fe8a9a64e712ebd", "Nickname":"ZDJ", "Url":"www.zhidianjia.com", "Location":86, "Active":false, "Votes":"103658.61704950", "Netaddress":"", "State":"Activate", "Registerheight":360618, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":42 }, { "Ownerpublickey":"0279d982cda37fa7edc1906ec2f4b3d8da5af2c15723e14f368f3684bb4a1e0889", "Nodepublickey":"0279d982cda37fa7edc1906ec2f4b3d8da5af2c15723e14f368f3684bb4a1e0889", "Nickname":"ELA.SYDNEY", "Url":"www.ela.sydney", "Location":61, "Active":false, "Votes":"46492.26739977", "Netaddress":"", "State":"Activate", "Registerheight":372790, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":53 } ], "Txid":"59b6b468f75856b7980525ad7a1278e4998959211f57d81755e4248982fd18b8" } ], "status":200 }
Get dpos super node rank list¶
rank list of producer , state can be active , inactive , pending , canceled , illegal , returned
GET
/api/v1/dpos/rank/height/(int:`height`)?state=active
¶Example request:
GET /api/v1/dpos/rank/height/241762 HTTP/1.1 Host: localhostExample response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Producer_public_key":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Value":"357051", "Address":"EX4eQnSSBG2CuhkSvaJHxrwtxS12Lxwy3M", "Rank":1, "Ownerpublickey":"03330ee8520088b7f578a9afabaef0c034fa31fe1354cb3a14410894f974132800", "Nodepublickey":"16fffcff2affd4c7fffdfcffecfffff4ff", "Nickname":"河北节点", "Url":"www.elastos.org", "Location":86, "Active":false, "Votes":"357029", "Netaddress":"5JdHqndX1NyyTJnnRnAAKNsoJ9qBwcMYtvRduxHyGGdhzHwxPZo", "State":"Activate", "Registerheight":233734, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":0, "Reward":"", "EstRewardPerYear":"66741.53520809" }, { "Producer_public_key":"033c495238ca2b6bb8b7f5ae172363caea9a55cf245ffb3272d078126b1fe3e7cd", "Value":"311337.3", "Address":"Eb8UHkQ2bJ4Ljux4yBePFdxB5Yp77VYHyt", "Rank":2, "Ownerpublickey":"033c495238ca2b6bb8b7f5ae172363caea9a55cf245ffb3272d078126b1fe3e7cd", "Nodepublickey":"03c18abb98f6679064bd44121f3b0a3f25dea1a8b8cb0e1b51dc9c26729f07ddc9", "Nickname":"我怎么这么好看", "Url":"www.douniwan.com", "Location":263, "Active":false, "Votes":"311315.30000000", "Netaddress":"8.8.8.8", "State":"Activate", "Registerheight":232288, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":1, "Reward":"", "EstRewardPerYear":"58196.53038233" }, { "Producer_public_key":"0337e6eaabfab6321d109d48e135190560898d42a1d871bfe8fecc67f4c3992250", "Value":"309866", "Address":"EdhP91WcY2WhyV8N6dCnBxbjAnGd2izrzY", "Rank":3, "Ownerpublickey":"0337e6eaabfab6321d109d48e135190560898d42a1d871bfe8fecc67f4c3992250", "Nodepublickey":"ff", "Nickname":"今天真好", "Url":"www.helloword.com", "Location":44, "Active":false, "Votes":"309844", "Netaddress":"1.2.3.4", "State":"Activate", "Registerheight":234800, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":2, "Reward":"", "EstRewardPerYear":"57921.50854861" }, { "Producer_public_key":"03c78467b91805c95ada2530513069bef1f1f1e7b756861381ab534efa6d94e40a", "Value":"218140.55555", "Address":"EdfJA92nN9X4T9cKqkvyrunVuBWfF1Mumm", "Rank":4, "Ownerpublickey":"03c78467b91805c95ada2530513069bef1f1f1e7b756861381ab534efa6d94e40a", "Nodepublickey":"fffff3fffffffffffffffbff1affffffec", "Nickname":"聪聪2", "Url":"1.4.7.9", "Location":672, "Active":false, "Votes":"218115.55555000", "Netaddress":"1.12.3.4", "State":"Activate", "Registerheight":233035, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":3, "Reward":"", "EstRewardPerYear":"40775.78712439" }, { "Producer_public_key":"021d59a84d2243111e39e8c2af0a5089127d142d52b18c3e4bf744e0c6f8af44e0", "Value":"147232", "Address":"ESpTiKXgLcYkzxdD7MuCmL9y9fbWrnH591", "Rank":5, "Ownerpublickey":"021d59a84d2243111e39e8c2af0a5089127d142d52b18c3e4bf744e0c6f8af44e0", "Nodepublickey":"ffff1230ffff", "Nickname":"www.12306.cn", "Url":"www.12306.cn", "Location":244, "Active":false, "Votes":"147210", "Netaddress":"www.12306.cn", "State":"Activate", "Registerheight":232899, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":4, "Reward":"", "EstRewardPerYear":"27521.24965833" }, { "Producer_public_key":"036417ab256114a32bcff38f3e10f0384cfa9238afa41a163017687b3ce1fa17f2", "Value":"139881", "Address":"ETKVMhhQCjttNAjrbqmkAAYuYshLdaDnjm", "Rank":6, "Ownerpublickey":"036417ab256114a32bcff38f3e10f0384cfa9238afa41a163017687b3ce1fa17f2", "Nodepublickey":"03e5b45b44bb1e2406c55b7dd84b727fad608ba7b7c11a9c5ffbfee60e427bd1da", "Nickname":"聪聪3", "Url":"225.7.3", "Location":672, "Active":false, "Votes":"139850", "Netaddress":"1.1.1.8", "State":"Activate", "Registerheight":233537, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":5, "Reward":"", "EstRewardPerYear":"26147.16857380" }, { "Producer_public_key":"02e578a6f4295765ad3be4cdac9be15de5aedaf1ae76e86539bb54c397e467cd5e", "Value":"125906", "Address":"EHdSBUH3nxkcAk9evU4HrENzEm8MHirkkN", "Rank":7, "Ownerpublickey":"02e578a6f4295765ad3be4cdac9be15de5aedaf1ae76e86539bb54c397e467cd5e", "Nodepublickey":"fffeffddfffffff2fffffffffbffffffff", "Nickname":"亦来云", "Url":"www.yilaiyun.com", "Location":244, "Active":false, "Votes":"125884", "Netaddress":"www.yilaiyun.com", "State":"Activate", "Registerheight":233680, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":6, "Reward":"", "EstRewardPerYear":"23534.90042574" }, { "Producer_public_key":"02ddd829f3495a2ce76d908c3e6e7d4505e12c4718c5af4b4cbff309cfd3aeab88", "Value":"108968", "Address":"EevRwpP5GYz5s8fuMboUnhsAQVVKbyJSph", "Rank":8, "Ownerpublickey":"02ddd829f3495a2ce76d908c3e6e7d4505e12c4718c5af4b4cbff309cfd3aeab88", "Nodepublickey":"ffffffffffffffffffffffffffffffffffff", "Nickname":"曲率区动", "Url":"www.bightbc.com", "Location":86, "Active":false, "Votes":"108946", "Netaddress":"EfSkh3e9uaVN5iMdU7oUPYPmyMxrMsrDut", "State":"Activate", "Registerheight":234283, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":7, "Reward":"", "EstRewardPerYear":"20368.77535297" }, { "Producer_public_key":"03c7b1f234d5d16472fcdd24d121e4cd224e1074f558a3eb1a6a146aa91dcf9c0d", "Value":"108186", "Address":"EQR8f9y2Sd5gFG3LWEeC57qXc2yEnDhgm2", "Rank":9, "Ownerpublickey":"03c7b1f234d5d16472fcdd24d121e4cd224e1074f558a3eb1a6a146aa91dcf9c0d", "Nodepublickey":"350181ff", "Nickname":"范冰冰", "Url":"1.8.5.8", "Location":86, "Active":false, "Votes":"108164", "Netaddress":"HTTP//HUANGBINGBING.COM", "State":"Activate", "Registerheight":233676, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":8, "Reward":"", "EstRewardPerYear":"20222.60049131" }, { "Producer_public_key":"03b688e0124580de452c400e01c628a690527e8742b6fa4645026dbc70155d7c8b", "Value":"107863", "Address":"EQHz2jPpgW8trYD4ejYgfi4sE4JSTf7m9N", "Rank":10, "Ownerpublickey":"03b688e0124580de452c400e01c628a690527e8742b6fa4645026dbc70155d7c8b", "Nodepublickey":"ffffffffffff", "Nickname":"基延一族", "Url":"1.4.7.9", "Location":672, "Active":false, "Votes":"107841", "Netaddress":"www.vogue.com", "State":"Activate", "Registerheight":233684, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":9, "Reward":"", "EstRewardPerYear":"20162.22391801" }, { "Producer_public_key":"03bc2c2b75009a3a551e98bf206730501ecdf46e71b0405840ff1d5750094bd4ff", "Value":"105047", "Address":"ENxPtTR7Jn1kxhdTXedF28s3iz6djYfRaS", "Rank":11, "Ownerpublickey":"03bc2c2b75009a3a551e98bf206730501ecdf46e71b0405840ff1d5750094bd4ff", "Nodepublickey":"fffffffd29fffffffafff8fafffffdfffa", "Nickname":"乐天居士", "Url":"www.baidu.com", "Location":376, "Active":false, "Votes":"105025", "Netaddress":"尽快哦孩子", "State":"Activate", "Registerheight":232892, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":10, "Reward":"", "EstRewardPerYear":"19635.84487651" }, { "Producer_public_key":"0230d383546d154d67cfafc6091c0736c0b26a8c7c16e879ef8011d91df976f1fb", "Value":"104256", "Address":"EMyStHAvvy1VLsLyow8uMRW4kUYLeGXF17", "Rank":12, "Ownerpublickey":"0230d383546d154d67cfafc6091c0736c0b26a8c7c16e879ef8011d91df976f1fb", "Nodepublickey":"fffffffffffefffffffffffffbfcffffff", "Nickname":"烽火", "Url":"www.ela.com", "Location":86, "Active":false, "Votes":"104234", "Netaddress":"www.ela.com", "State":"Activate", "Registerheight":233612, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":11, "Reward":"", "EstRewardPerYear":"19487.98769547" }, { "Producer_public_key":"028fb1a85f6a30a516b9e3516d03267403a3af0c96d73b0284ca0c1165318531ff", "Value":"104066", "Address":"ESqyiCizgyNNLKdVQhhtxtR5v5eCnkk3Qh", "Rank":13, "Ownerpublickey":"028fb1a85f6a30a516b9e3516d03267403a3af0c96d73b0284ca0c1165318531ff", "Nodepublickey":"ffff9262", "Nickname":"链世界", "Url":"www.7234.cn", "Location":86, "Active":false, "Votes":"101045", "Netaddress":"www.7234.cn", "State":"Activate", "Registerheight":235373, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":12, "Reward":"", "EstRewardPerYear":"19452.47206412" }, { "Producer_public_key":"02db921cfb4bf504c83038212aafe52cc1d0a07eb71a399a0d2162fe0cd4d47720", "Value":"99051", "Address":"ERbFZNj5bukyRQe5G4gdXnbDqVyxcTNeFT", "Rank":14, "Ownerpublickey":"02db921cfb4bf504c83038212aafe52cc1d0a07eb71a399a0d2162fe0cd4d47720", "Nodepublickey":"1234567890ffdffffffffcffffffffffffff", "Nickname":"ios_us01", "Url":"www.ios_us01.com", "Location":684, "Active":false, "Votes":"99029", "Netaddress":"192.168.1.22:25339", "State":"Activate", "Registerheight":233672, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":13, "Reward":"", "EstRewardPerYear":"18515.04632082" }, { "Producer_public_key":"033fb33f39276b93d3474cf7999887bed16c3211ee7f904399eeead4c480d7d592", "Value":"98859", "Address":"EXQZMbKMcmVmwv25AYbrzWPhFRSfqKcfKM", "Rank":15, "Ownerpublickey":"033fb33f39276b93d3474cf7999887bed16c3211ee7f904399eeead4c480d7d592", "Nodepublickey":"19fffffe9dfffafffffffffffbcaffffff", "Nickname":"晓黎-评财经", "Url":"www.pingcj.com", "Location":86, "Active":false, "Votes":"98837", "Netaddress":"Ed846C7M9Ax8x1qaftjSR53RZmfSvp8CpN", "State":"Activate", "Registerheight":235077, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":14, "Reward":"", "EstRewardPerYear":"18479.15684072" }, { "Producer_public_key":"030e4b487daf8e14dbd7023e3f6f475d00145a1f1cc87be4b8d58a4291ab0a3b1a", "Value":"25974", "Address":"EVFSvWoxiyvGLka4V6Wt394LEoUu8mDhk4", "Rank":16, "Ownerpublickey":"030e4b487daf8e14dbd7023e3f6f475d00145a1f1cc87be4b8d58a4291ab0a3b1a", "Nodepublickey":"0241db65a4da2cdcbb648a881ced2a5ed64646ecc3a2cc9a75cec2853de61dbed1", "Nickname":"ELASuperNode", "Url":"www.ELASuperNode.com", "Location":86, "Active":false, "Votes":"25952", "Netaddress":"54.64.220.165", "State":"Activate", "Registerheight":237877, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":15, "Reward":"", "EstRewardPerYear":"4855.17373007" }, { "Producer_public_key":"0210694f4ab518037bc2dcc3f5e1a1030e8a36821ab019c10f29d4a894b8034498", "Value":"55", "Address":"ESwKtu2aYSHHfdWUPdg4b3PtibfaEcJEvT", "Rank":17, "Ownerpublickey":"0210694f4ab518037bc2dcc3f5e1a1030e8a36821ab019c10f29d4a894b8034498", "Nodepublickey":"024babfecea0300971a6f0ad13b27519faff0ef595faf9490dc1f5f4d6e6d7f3fb", "Nickname":"adr_us01", "Url":"www.adr_us01_9.com", "Location":93, "Active":false, "Votes":"33", "Netaddress":"node-regtest-509.eadd.co:26339", "State":"Activate", "Registerheight":238437, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":16, "Reward":"", "EstRewardPerYear":"10.28084065" }, { "Producer_public_key":"0210cd8407f70b26dbb77039cdce61a526168d04b83885844294038759f57c525c", "Value":"20", "Address":"EdUn345wvDWj3knsYsquEkZsqhRRXYSdnK", "Rank":18, "Ownerpublickey":"0210cd8407f70b26dbb77039cdce61a526168d04b83885844294038759f57c525c", "Nodepublickey":"0210cd8407f70b26dbb77039cdce61a526168d04b83885844294038759f57c525c", "Nickname":"ios_us05", "Url":"www.ios_us05.com", "Location":244, "Active":false, "Votes":"20", "Netaddress":"172.31.40.70:25339", "State":"Activate", "Registerheight":244762, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":17, "Reward":"", "EstRewardPerYear":"3.73848751" }, { "Producer_public_key":"03325ce52add7a799a61a305973b3d84aa4f622358ab3eb9f010f1175e2dab6b13", "Value":"20", "Address":"Eb9mkpHC787UGqeqNvXs7j4Thh6fX6rF9D", "Rank":19, "Ownerpublickey":"03325ce52add7a799a61a305973b3d84aa4f622358ab3eb9f010f1175e2dab6b13", "Nodepublickey":"03325ce52add7a799a61a305973b3d84aa4f622358ab3eb9f010f1175e2dab6b13", "Nickname":"ios_us06", "Url":"www.ios_us06.com", "Location":54, "Active":false, "Votes":"20", "Netaddress":"172.31.45.130:25339", "State":"Activate", "Registerheight":244768, "Cancelheight":0, "Inactiveheight":0, "Illegalheight":0, "Index":18, "Reward":"", "EstRewardPerYear":"3.73848751" } ], "status":200 }
Get dpos total vote of specific height¶
total vote of specific height
-
GET
/api/v1/dpos/vote/height/(int:`height`)
¶ Example request:
GET /api/v1/dpos/vote/height/241762 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":2468878.85555, "status":200 }
Get transaction history , version 1¶
-
GET
/api/v1/history/(string:`addr`)?pageSize=(int:`pageSize`)&pageNum=(int:`pageNum`)&order=asc
¶ Example request:
GET /api/v1/history/EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Desc":"Success", "Error":0, "Result":{ "History":[ { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"d6cdabe9a26073c3d4c13d1963250883b3656ba572b7a3bc8f44418b84c0fa12", "Type":"income", "Value":175834086, "CreateTime":1544862227, "Height":181860, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"8989a93356ba6a514c3d6afcf27c67cd9d85eea78c045c945cf1ebafcdd9d099", "Type":"income", "Value":175834086, "CreateTime":1544862297, "Height":181861, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"275bd1afbd612d064e872d5cdcb7c095b9c6f693b4c393611f6ae903ae6f6a1b", "Type":"income", "Value":175837586, "CreateTime":1544862487, "Height":181862, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"5099e59c7186dd85259d52a33ca61614bd6118896e3a0806ce8be8d9a277afe7", "Type":"income", "Value":175834086, "CreateTime":1544862607, "Height":181863, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"b3acf06712e44e7be0163ccc16a658f9dcd82af78a208613f38987441a3f6722", "Type":"income", "Value":175834086, "CreateTime":1544862647, "Height":181864, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"53cbd4308ab981229a7dadfb9ddfe2052d318ad16885f425f54422fb5f9fe1cb", "Type":"income", "Value":175834086, "CreateTime":1544862798, "Height":181865, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"ac27ea649c3f818bc80b70c09c267613ac0d10dbc32905e799940614319f8fa4", "Type":"income", "Value":175834086, "CreateTime":1544862838, "Height":181866, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"489bf2550b4f199bace74f56814092f2728ab8f87af796d3f38a9bd20d5f8dd3", "Type":"income", "Value":175834086, "CreateTime":1544862958, "Height":181867, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"34ae0fb243b82d9e2fd8edddd1d10d5ad3bbe3e2e9f0edce957164bb438530f2", "Type":"income", "Value":175799086, "CreateTime":1544863028, "Height":181868, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"1e149c5b3b44c3d21b20725e829c48e45fb2ddc722b8baf413bcf5f065c72e26", "Type":"income", "Value":175834086, "CreateTime":1544863188, "Height":181869, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"1b65f050dd5a0da971601831fe04585c6c3e67a7fba442f11214c5aeebc2e608", "Type":"income", "Value":175834086, "CreateTime":1544863218, "Height":181870, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"df0e4dad249c7c63e0fbb4fed3d4575ba14cf6f8905f3c9958fd75157dc5e4db", "Type":"income", "Value":175834086, "CreateTime":1544863288, "Height":181871, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"a56d992517b99f89fa7b0aa1559db7ac1221ffad92abd1c04cc91c49b8680197", "Type":"income", "Value":175834086, "CreateTime":1544863368, "Height":181872, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"99d94184ae09d5c085379fc41921a0bf6a5b1f5e7345a6480ca6c391e42669d9", "Type":"income", "Value":175869086, "CreateTime":1544863518, "Height":181873, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"097a00c466e62e1b3f59fd88f5b78b0473bb0008b94336f622e0a559b362dc2c", "Type":"income", "Value":175837586, "CreateTime":1544863648, "Height":181874, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"" } ], "TotalNum":69180 } }
Get transaction history , version 2¶
Increase fields : NodeOutputIndex (indicate which output is the node reward output ), NodeFee (Node reward fee)
Changed meaning : Fee now is the total spending fee , contains the node reward fee
-
GET
/api/v2/history/(string:`addr`)?pageSize=(int:`pageSize`)&pageNum=(int:`pageNum`)&order=asc
¶ Example request:
GET /api/v2/history/EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "Desc":"Success", "Error":0, "Result":{ "History":[ { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"d6cdabe9a26073c3d4c13d1963250883b3656ba572b7a3bc8f44418b84c0fa12", "Type":"income", "Value":175834086, "CreateTime":1544862227, "Height":181860, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"", "NodeOutputIndex": -1, "NodeFee": 0 }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"8989a93356ba6a514c3d6afcf27c67cd9d85eea78c045c945cf1ebafcdd9d099", "Type":"income", "Value":175834086, "CreateTime":1544862297, "Height":181861, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"", "NodeOutputIndex": -1, "NodeFee": 0 }, { "Address":"EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ", "Txid":"097a00c466e62e1b3f59fd88f5b78b0473bb0008b94336f622e0a559b362dc2c", "Type":"income", "Value":175837586, "CreateTime":1544863648, "Height":181874, "Fee":0, "Inputs":[ "0000000000000000000000000000000000" ], "Outputs":[ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3", "EHCGDgxxRTj4rTSmZESmVqDHfYPZZWPpFQ" ], "TxType":"CoinBase", "Memo":"", "NodeOutputIndex": -1, "NodeFee": 0 } ], "TotalNum":69180 } }
Get transaction history , version 3¶
Now you can get the pending transaction, which is now only stored in transaction pool, add one more field status it can be pending or confirmed
-
GET
/api/v3/history/(string:`addr`)?pageSize=(int:`pageSize`)&pageNum=(int:`pageNum`)&order=asc
¶ Example request:
GET /api/v3/history/EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": { "History": [ { "Address": "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW", "Txid": "4a074853554c51a5c2ca08aa0a2a88ceddb9f82565aa7b57c323c2af8f46ff18", "Type": "spend", "Value": 409036, "CreateTime": 0, "Height": 0, "Fee": 100, "Inputs": [ "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "Outputs": [ "Ed57c3wF3J1u8vEYE9cjGUpqGPkEJC69v8", "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "TxType": "transferAsset", "Memo": "type:text,msg:From ELABank,ThaiEla Super Node Reward Distribution", "NodeOutputIndex": -1, "NodeFee": 0, "Status": "pending" }, { "Address": "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW", "Txid": "87921fc5d840d40ec331cb23a47d58fb7a18b246c2fa793144747578725759e3", "Type": "income", "Value": 2000000, "CreateTime": 1560699457, "Height": 402147, "Fee": 0, "Inputs": [ "EVSvG1y3zQBKu6H8yCXVTDVqBDGhGDgSXh" ], "Outputs": [ "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "TxType": "transferAsset", "Memo": "type:text,msg:ELABANK Share", "NodeOutputIndex": -1, "NodeFee": 0, "Status": "confirmed" }, { "Address": "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW", "Txid": "34822a4b4c2c7efd559d395febb1c898f965c36d415d64296930361713be280f", "Type": "income", "Value": 3000000, "CreateTime": 1560711311, "Height": 402260, "Fee": 0, "Inputs": [ "ETWvTCV7Gf7bngSeWEYveZ79qmcy4mvpu8" ], "Outputs": [ "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "TxType": "transferAsset", "Memo": "type:text,msg:ThaiEla share", "NodeOutputIndex": -1, "NodeFee": 0, "Status": "confirmed" } ], "TotalNum": 2993 }, "status": 200 }
Get spending address public key¶
-
GET
/api/v1/pubkey/(string:`addr`)
¶
- If we can get the public key of this adress.
Example request:
GET /api/v1/pubkey/ELbKQrj8DTYn2gU7KBejcNWb4ix4EAGDmy HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":"02eda087df202cfc8904ec8f933bf20920251b3964b117c984a576c6fd9047073c", "status":200 }
- If we can not get the public key of this adress.
Example request:
GET /api/v1/pubkey/EbxU18T3M9ufnrkRY7NLt6sKyckDW4VAsA HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":"Can not find pubkey of this address, please using this address send a transaction first", "status":200 }
Calculate UTXO that is about to spend¶
-
POST
/api/v1/createTx
¶ Example request:
POST /api/v1/createTx HTTP/1.1 Host: localhost { "inputs":[ "ER1ouzeLNKQTqPrDHxgAGw2eiCXPhgznVy", "EbxU18T3M9ufnrkRY7NLt6sKyckDW4VAsA" ], "outputs":[ { "addr":"EQNJEA8XhraX8a6SBq98ENU5QSW6nvgSHJ", "amt":1091460300 } ] }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": { "Transactions": [ { "Fee": 100, "Total_Node_Fee": 4800, "Outputs": [ { "address": "EN8A9xHUNCJ9XEtaVFWa8xsrxewH88fMUf", "amount": 4700 }, { "address": "ERZYCmcd12ctAfdiTMeuLrSdHdNXzYP1kg", "amount": 2000000000 }, { "address": "ERZYCmcd12ctAfdiTMeuLrSdHdNXzYP1kg", "amount": 20000010000 }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "amount": 1053883203946 } ], "Postmark": { "pub": "0257b0a7a0b536d9cdb8ba748accd560dbc1b9e2fb77a7983329f2d0563f7fa144", "signature": "2a0ed9fbb93aede771b76c881284ae3e1e6d7523199f52580d3d037b38b52f7b590c307391ad76c3706c15acbd5b442a699c270f503f44c0c901511bedc4f7d5" }, "UTXOInputs": [ { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 0, "txid": "6752aa24b406c0a80f146398814adf9cc3d5ae018074e4f3dde363e27d8bcc1f" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 1, "txid": "9460bf460b6b8699cb1c16772295ebe88b1070caf92aeabe93fb4a9799d255ad" } ] } ] }, "status": 200 }
Calculate UTXO that is about to vote¶
-
POST
/api/v1/createVoteTx
¶ Example request:
POST /api/v1/createVoteTx HTTP/1.1 Host: localhost { "inputs":[ "ERh7jTzBYiuEZrom9i8XvECqgiDtjSL255" ], "outputs":[ { "addr":"ERh7jTzBYiuEZrom9i8XvECqgiDtjSL255", "amt":"19500" } ] }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": { "Transactions": [ { "Fee": 100, "Outputs": [ { "address": "ERh7jTzBYiuEZrom9i8XvECqgiDtjSL255", "amount": 19500 }, { "address": "EQNJEA8XhraX8a6SBq98ENU5QSW6nvgSHJ", "amount": 4760 }, { "address": "ERh7jTzBYiuEZrom9i8XvECqgiDtjSL255", "amount": 1238967853 } ], "Postmark": { "pub": "03c3a4a137eb63b05e9f14070639e680df78616d70ee1ba52b0759236b4b698cdb", "signature": "f137b4d07e989077f2d36d50e5884f7aad23298abb8cfe2d575b25672858f72975919baf5c56a351f403ec21f9456c655d7229fed4eae34354a20043f610b894" }, "Total_Node_Fee": 4860, "UTXOInputs": [ { "address": "ERh7jTzBYiuEZrom9i8XvECqgiDtjSL255", "index": 1, "txid": "433e361b80c4f8191b73f1f94a36307581b2f3408f515801952ac284dbc44e4e" }, { "address": "ERh7jTzBYiuEZrom9i8XvECqgiDtjSL255", "index": 1, "txid": "405cca6796d181df6bef75834c273b73694da3c004962ced7d697380042976a2" } ] } ] }, "status": 200 }
SendRawTx Support multi transaction¶
-
GET
/api/v1/sendRawTx
¶ Example request:
POST /api/v1/sendRawTx HTTP/1.1 Host: localhost { "data":"02000100053136383037017785d35417054e1f8551a944931f7add31a12b1435db90ae257aade7ff41893700000000000002b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a36400000000000000000000002125b6be18f413b49036efdbd88b361b652821650cb037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3222e000000000000000000002125b6be18f413b49036efdbd88b361b652821650c000000000141403c9071f58f18ea59a5f4297ba959b31b8b6e63daf825f8fd8d81af4f97ab42bc1a325fddde9b4875b0a8ad47bdfddabfe4562f5d9135ca7addb929068190c098232102eda087df202cfc8904ec8f933bf20920251b3964b117c984a576c6fd9047073cac" }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": "a0ccbef0e7bfb00b452efd1e3c329ea16de1ed4523216c197ad27b3cb85505e7", "status": 200 }
Example request:
POST /api/v1/sendRawTx HTTP/1.1 Host: localhost { "data":[ "0200018116747970653A746578742C6D73673A68656C6C6F31323301BCD8BBBB3B0C825EB2B83A4794B5B318418D95585C4161E7E0865D8FDE9CE19E01000000000003B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A31A270000000000000000000021131442B95A4099632162C78A0B42B6A3B4231E02B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A35C120000000000000000000021B0580B846CDB82605B8000C3DFB3F5F2E8C00D95B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A380A0B000000000000000000021FDF15870393954CB18BAEBFD03033AB00381682F00000000014140DE07414CE48576413F0431724ABC2B0C199DFE882A29CA1C2ADAC2E9F13A6E48053DFB97EFEEEE8CF09DE56D2EE42602B11E3F2745F573EE5BA6AA7177666A922321020B88380213E5DB73089DBAEA0EAB810875B133DA7EAFFE647C4BD4D9E17AAE98AC", "0200018116747970653A746578742C6D73673A68656C6C6F31323301AB3FAE66DDA8E0520D625CF32176EA5102385C857204FFF0092BE6B8E73856A202000000000003B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A31A270000000000000000000021131442B95A4099632162C78A0B42B6A3B4231E02B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A35C120000000000000000000021B0580B846CDB82605B8000C3DFB3F5F2E8C00D95B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A3A6FD84000000000000000000212E4AC31C40A6423A311769EC250771B7ACB9E2AA00000000014140E6BCEEF5EFB4C796B9EDA952DCF6E00EF533266A99113B64D122361B57BF7E32FFDDC44A0ACFEBBFDB696CB9EE964CD2C750391C0ABCEFBC96DD619E5E71B729232102BFABCE2A5997B0B8B6A930CCE67EE39F0DD591A6BAE17598AC99CA76F4039CEDAC" ] }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": [ "a0ccbef0e7bfb00b452efd1e3c329ea16de1ed4523216c197ad27b3cb85505e7", "e1a228df7b1c6c747d83827835e1551435e7fcaa12115f1d6cdda5bf94121b02" ], "status": 200 }
node fee¶
-
GET
/api/v1/fee
¶ Example request:
Get /api/v1/fee HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":4860, "status":200 }
node reward address¶
-
GET
/api/v1/node/reward/address
¶ Example request:
Get /api/v1/node/reward/address HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":"EZLPHvHDNvUe8uTjs9iAUoPY2R1FLpBNH2", "status":200 }
summary of all spend utxo value¶
-
POST
/api/v1/spend/utxos
¶ Example request:
POST /api/v1/spend/utxos HTTP/1.1 Host: localhost { "UTXOInputs": [ { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 45, "txid": "4fa997c7d1211e5a4631d879f35b31d2fa4914891ec9ce4c27bf25d5d789b3fe" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 46, "txid": "a10456d680780d8700550cff99e36050f91f7f4c3747880503a99a6a88f12cf9" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 59, "txid": "79fa3a649a41895c67bff8c60a55d07388dff69c5a35612eedd7fa4a787315c8" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 1, "txid": "35ddfbc848c337b5ac8e20f6d584da565361b9b2aa79f601b0d0bbdfa37f72e1" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 45, "txid": "4915e1e5e8bff3b2d483c5ba3a5dafe1fa9d9692d2d97feffa9c4151a02dfb42" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 1, "txid": "7aa2017e158e45e13daeb203416faa0fa3aeef217fd3c00c3a5ee3fbbfea66bf" }, { "address": "EYH69rRAfDQ2HRa35bmYRh6UoAZ8u3n7ZJ", "index": 2, "txid": "7d1471d87334c6c50a4891eece57bfd99630b62774550535dbd1ceb2ea98cc89" } ] }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": 1066042996951, "status": 200 }
Get transaction¶
return transaction if it exists in transaction pool or confirmed on a block
-
GET
/api/v1/tx/(string:`hash`)
¶ Example request:
Get /api/v1/tx/90151759b2ce3bf87970a0b3e2aa2456ad61ee27a60a02089758d6061e7af74a HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "txid": "90151759b2ce3bf87970a0b3e2aa2456ad61ee27a60a02089758d6061e7af74a", "hash": "90151759b2ce3bf87970a0b3e2aa2456ad61ee27a60a02089758d6061e7af74a", "size": 369, "vsize": 369, "version": 0, "locktime": 484501, "vin": [ { "txid": "8d85f0ef4cf0097fd980fcfe81d0c5741a0276af586d9ded31089b7f3d79126e", "vout": 0, "sequence": 0 } ], "vout": [ { "value": "0.00150000", "n": 0, "address": "EauXy6q4fPXr5THDxQ6MwnhMdDxF7tJUAA", "assetid": "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0", "outputlock": 0, "type": 0, "payload": null } ], "blockhash": "", "confirmations": 0, "time": 0, "blocktime": 0, "type": 5, "payloadversion": 0, "payload": { "blockheight": 107567, "sideblockhash": "21f40da0dcee3a568c8557ef03797fa5c4546bf52d4396823dba8f499c75915b", "sidegenesishash": "0e739a2b87774ef2266a3cabc79a8e1201732fe409cfe50bd4125efb1d1169b5", "signature": "f4f4327c98a735309544a37273d373bf9c879218022a51c809deb884fe881a3f683a79082c9418d09bc51b0634078c560b1d7b94166b17b933ff030b5c2d31ca" }, "attributes": [ { "usage": 0, "data": "33383635333434373239393435313330363032" } ], "programs": [ { "code": "21021d2a6d4ec309609ebe27f8c138d14bb28da2634ca63cf6582cbf4b8a59f719bdac", "parameter": "40e53759af1d0fd85d07195a636c538881c791db0e419d60ca90c03d9947aaba50fed5d27a75a8c40ad8c5073c5b73ac59ba046fa164741ec6c592a36cbbb7b44e" } ] }
Get cr candidate vote statistics¶
cr candidate vote statistics of specific height
-
GET
/api/v1/crc/did/(string:`did`)/(int:`height`)
¶ Example request:
GET /api/v1/crc/did/iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX/9999999 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": [ { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "f3f8bb556133ca6549738344999b02cf95113ed8e2674f0655bc5571634a9a49", "Value": "0.10000000", "Address": "Eak7wVrSY9G8K2L253PrwHCr5AMv226Ge5", "Block_time": 1573477535, "Height": 317152 }, { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "e05bcbbc6985f53ee1343420bbf4a389d2e125823434c218926bdb53bc4eeae9", "Value": "0.10000000", "Address": "ERZxGjEfi4KBDyocvQArgCUf9tcGYRQ7K8", "Block_time": 1573532655, "Height": 317627 }, { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "918e572aab3f8402b61de70fa3ced01459410616ec13b012e23caf4a5996a8df", "Value": "0.10000000", "Address": "EXoX1raHYb2bzDh4UXhsgfCC2WXEXvypNn", "Block_time": 1573550915, "Height": 317776 }, { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "81d5fe9a3b585c34b0f93914d9974c40b7eb22db5400304b65575d222f4d631a", "Value": "0.10000000", "Address": "EYRi9SodjCmE9nJt5nn1Jao3KYPVHfjJBW", "Block_time": 1573558912, "Height": 317849 }, { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "4f67e3d6c69b6655af62f188a19dc280329ecd1bdf7bdc4fdde114ad88642379", "Value": "0.10000000", "Address": "EbTRRTPhD6k1VTLU31mVPhpzutVRh5sh4p", "Block_time": 1573631364, "Height": 318279 }, { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "4c3737a6ebaad991442514b6cbe7061235d2edef3b56a6ed4c73785084d45d9c", "Value": "0.10000000", "Address": "EYY4nVRnKLP8fsc8L4sPeNyeJkwx5NEjov", "Block_time": 1573631920, "Height": 318280 }, { "Did": "iZAanbDCpnQxXEcan2hXgJ9hwvXj8dx8NX", "Vote_type": "CRC", "Txid": "d375eca3a1367932ecbf5464b002edb8b5be04ab16a4d48c92b1d4192a4dd752", "Value": "0.10000000", "Address": "EK11jSk42jJ5iRwSWYSb2XyvZHL6iEESbd", "Block_time": 1573631920, "Height": 318280 } ], "status": 200 }
Get cr candidates voter’s statistics¶
cr candidates voter’s statistics
-
GET
/api/v1/crc/address/(string:`address`)?pageSize=(int:`pageSize`)&pageNum=(int:`pageNum`)
¶ Example request:
GET /api/v1/crc/address/EbxU18T3M9ufnrkRY7NLt6sKyckDW4VAsA?pageNum=1&pageSize=2 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Vote_Header":{ "Value":"3149.00000000", "Candidate_num":5, "Txid":"7ed36f3021dff4e376e289dbfcbeeac7465f3ef34d1b043d54d323b6349b2766", "Height":606176, "Candidates":[ { "Did":"iiw7RvgaYJKqpnrEuLGmDrs5dQmBBwy1iG", "Value":"625" }, { "Did":"icaJrj8zbbECzPTF5wGScktq5ce56mRPee", "Value":"700" }, { "Did":"icS954DGsXXuYJCUbRKiC8JAcoxkaeQVZg", "Value":"700" }, { "Did":"ibdkX3PQHwKAu6vRaeDVyo8VU9mXW2Wm8R", "Value":"625" }, { "Did":"iVSBp5ocfrLnAwDTS7C9LUKvyo4SY7f67B", "Value":"499" } ], "Block_time":1585319751, "Is_valid":"YES" }, "Vote_Body":[ { "Did":"iiw7RvgaYJKqpnrEuLGmDrs5dQmBBwy1iG", "Value":"16316.92336823", "Rank":8, "Code":"2103b07d9c916e797cf6b118cf7db7e272f78b6f771c80ea28d7b55bc5820fb84a69ac", "Nickname":"Bitwork Council Committee", "Url":"www.cyberrepublic.org/cr-regions", "Location":852, "State":"Active", "Votes":"33318.26967387", "Index":12 }, { "Did":"icaJrj8zbbECzPTF5wGScktq5ce56mRPee", "Value":"11337.32973863", "Rank":12, "Code":"2103ab0e09ca450a9fc619b12750eb76db7393321c6f935f817d0cdd81543065aa89ac", "Nickname":"Alex Shipp", "Url":"twitter.com/AlexShippELA", "Location":1001, "State":"Active", "Votes":"28338.67604427", "Index":13 }, { "Did":"icS954DGsXXuYJCUbRKiC8JAcoxkaeQVZg", "Value":"94285.12308166", "Rank":1, "Code":"2102073cdb080e3d3c545039195040f82f8fe026ded3506730dbce02c8e0ddd13b7bac", "Nickname":"The Strawberry Council", "Url":"strawberrysupernodes.org/council", "Location":1001, "State":"Active", "Votes":"99138.08391183", "Index":2 }, { "Did":"ibdkX3PQHwKAu6vRaeDVyo8VU9mXW2Wm8R", "Value":"31899.26830899", "Rank":5, "Code":"21027f574bfd3a4497ed9dcc41ee5b0503c1aa8083cd765c98ccf6be9158bb2ea5dcac", "Nickname":"Michael S", "Url":"https://twitter.com/Elastos_Houston?s=09", "Location":1001, "State":"Active", "Votes":"31904.15598133", "Index":5 }, { "Did":"iVSBp5ocfrLnAwDTS7C9LUKvyo4SY7f67B", "Value":"13853.32924318", "Rank":9, "Code":"2103d2066d7aaf04cf209885b77985f9fef5217595dfb5da3e73672d9209138e3aa9ac", "Nickname":"Orchard Trinity", "Url":"https://www.elastosorchard.eu/orchardcouncil", "Location":44, "State":"Active", "Votes":"28700.06162124", "Index":11 } ] }, { "Vote_Header":{ "Value":"3149.00000000", "Candidate_num":5, "Txid":"3538cb55a6b0bfbd816d6073c6d4294a35c6c8a50d2e824f4bdbf2ee4a00450e", "Height":599876, "Candidates":[ { "Did":"iiw7RvgaYJKqpnrEuLGmDrs5dQmBBwy1iG", "Value":"625" }, { "Did":"icaJrj8zbbECzPTF5wGScktq5ce56mRPee", "Value":"700" }, { "Did":"icS954DGsXXuYJCUbRKiC8JAcoxkaeQVZg", "Value":"700" }, { "Did":"ibdkX3PQHwKAu6vRaeDVyo8VU9mXW2Wm8R", "Value":"625" }, { "Did":"iVSBp5ocfrLnAwDTS7C9LUKvyo4SY7f67B", "Value":"499" } ], "Block_time":1584561600, "Is_valid":"NO" }, "Vote_Body":[ { "Did":"iiw7RvgaYJKqpnrEuLGmDrs5dQmBBwy1iG", "Value":"2644.13275111", "Rank":14, "Code":"2103b07d9c916e797cf6b118cf7db7e272f78b6f771c80ea28d7b55bc5820fb84a69ac", "Nickname":"Bitwork Council Committee", "Url":"www.cyberrepublic.org/cr-regions", "Location":852, "State":"Active", "Votes":"33318.26967387", "Index":12 }, { "Did":"icaJrj8zbbECzPTF5wGScktq5ce56mRPee", "Value":"9242.77551718", "Rank":12, "Code":"2103ab0e09ca450a9fc619b12750eb76db7393321c6f935f817d0cdd81543065aa89ac", "Nickname":"Alex Shipp", "Url":"twitter.com/AlexShippELA", "Location":1001, "State":"Active", "Votes":"28338.67604427", "Index":13 }, { "Did":"icS954DGsXXuYJCUbRKiC8JAcoxkaeQVZg", "Value":"92529.41144443", "Rank":1, "Code":"2102073cdb080e3d3c545039195040f82f8fe026ded3506730dbce02c8e0ddd13b7bac", "Nickname":"The Strawberry Council", "Url":"strawberrysupernodes.org/council", "Location":1001, "State":"Active", "Votes":"99138.08391183", "Index":2 }, { "Did":"ibdkX3PQHwKAu6vRaeDVyo8VU9mXW2Wm8R", "Value":"30345.20862991", "Rank":6, "Code":"21027f574bfd3a4497ed9dcc41ee5b0503c1aa8083cd765c98ccf6be9158bb2ea5dcac", "Nickname":"Michael S", "Url":"https://twitter.com/Elastos_Houston?s=09", "Location":1001, "State":"Active", "Votes":"31904.15598133", "Index":5 }, { "Did":"iVSBp5ocfrLnAwDTS7C9LUKvyo4SY7f67B", "Value":"13913.93044388", "Rank":8, "Code":"2103d2066d7aaf04cf209885b77985f9fef5217595dfb5da3e73672d9209138e3aa9ac", "Nickname":"Orchard Trinity", "Url":"https://www.elastosorchard.eu/orchardcouncil", "Location":44, "State":"Active", "Votes":"28700.06162124", "Index":11 } ] } ], "status":200 }
Get voted cr candidates of specific transactions¶
-
POST
/api/v1/crc/transaction/producer
¶ Example request:
POST /api/v1/crc/transaction/producer HTTP/1.1 Host: localhost { "txid":[ "ce75839c0dd20692d09e1aacff69f04cdbccc04a5da48588467527d2abda7e45", "eb64cee1c62d4665ff19a5933bf8b246fcda8d40949a77ee5d1569141a0e8e7c" ] }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result": [ { "Producer": [ { "Code": "2103d69fe4f0348db20916848ba638355c2752e791ef0ab16722b5ba12ee6c93c01bac", "Did": "ih1kcYd76SvHPsUrBM72xkAk5Htkhz7xv8", "Nickname": "r_adr_us51", "Url": "www.r_adr_us51.com", "Location": 86, "State": "Active", "Votes": "7615.61967020", "Index": 53 }, { "Code": "2103df458c3c68624e5fac2c4fdae8fec47f612d69a8217575ddc4ad49135286c70fac", "Did": "iXuss6uqEdaSB6aho9SpnLouu3EEaiBfsE", "Nickname": "r_adr_us00", "Url": "https://54.223.244.60/bpinfo.json", "Location": 1441, "State": "Active", "Votes": "7336.57647854", "Index": 159 } ], "Txid": "ce75839c0dd20692d09e1aacff69f04cdbccc04a5da48588467527d2abda7e45" }, { "Producer": [ { "Code": "2103d69fe4f0348db20916848ba638355c2752e791ef0ab16722b5ba12ee6c93c01bac", "Did": "ih1kcYd76SvHPsUrBM72xkAk5Htkhz7xv8", "Nickname": "r_adr_us51", "Url": "www.r_adr_us51.com", "Location": 86, "State": "Active", "Votes": "7615.61967020", "Index": 53 }, { "Code": "2103df458c3c68624e5fac2c4fdae8fec47f612d69a8217575ddc4ad49135286c70fac", "Did": "iXuss6uqEdaSB6aho9SpnLouu3EEaiBfsE", "Nickname": "r_adr_us00", "Url": "https://54.223.244.60/bpinfo.json", "Location": 1441, "State": "Active", "Votes": "7336.57647854", "Index": 159 } ], "Txid": "eb64cee1c62d4665ff19a5933bf8b246fcda8d40949a77ee5d1569141a0e8e7c" } ], "status": 200 }
Get all cr voters address list of specific height¶
GET
/api/v1/crc/voter/list/(int:`height`)
¶Example request:
GET /api/v1/crc/voter/list/100000000 HTTP/1.1 Host: localhostExample response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Address":"EHAujPsi2u48wD9kZ1ji2g5DDNihLCN9ta" }, { "Address":"EHCjAMd77sK5tQduLoAh3Jcw2YGbGKBCCU" }, { "Address":"EHFgKWpMd1uvsyGR4diXHVGrnAq2LqT4j7" }, { "Address":"EgPJr1q2GZNqcTYNqJDbkV1uQ4QiP8oAXo" }, { "Address":"EgQX4bgYNH493HUbAi8ZvUd9h2weewoZah" }, { "Address":"EgR1DNB6Ab6q2kWWDvBLKjdzo6yu5y9jj3" }, { "Address":"EgUC1qbXPPnPawZq4NFw3oFXDbY8xBisdH" } ], "status":200 }
Get cr candidates rank list¶
rank list of cr candidates , state can be active , pending , canceled , returned , all
GET
/api/v1/crc/rank/height/(int:`height`)?state=all
¶Example request:
GET /api/v1/crc/rank/height/99999999 HTTP/1.1 Host: localhostExample response:
HTTP/1.1 200 OK Content-Type: application/json { "result": [ { "Did": "ih1kcYd76SvHPsUrBM72xkAk5Htkhz7xv8", "Value": "7615.6196702", "Rank": 1, "Code": "2103d69fe4f0348db20916848ba638355c2752e791ef0ab16722b5ba12ee6c93c01bac", "Nickname": "r_adr_us51", "Url": "www.r_adr_us51.com", "Location": 86, "State": "Active", "Votes": "7615.61967020", "Index": 116 }, { "Did": "iXuss6uqEdaSB6aho9SpnLouu3EEaiBfsE", "Value": "7336.57647854", "Rank": 2, "Code": "2103df458c3c68624e5fac2c4fdae8fec47f612d69a8217575ddc4ad49135286c70fac", "Nickname": "r_adr_us00", "Url": "https://54.223.244.60/bpinfo.json", "Location": 1441, "State": "Active", "Votes": "7336.57647854", "Index": 49 }, { "Did": "ic4MGQoJAcDMiv9LeqfnucPyNvVgaNQBBe", "Value": "7035.21015465", "Rank": 3, "Code": "2103b4957e9d55012fcec8f8b476bbe3b2243fe71ddfc858117ca26fee177d253a63ac", "Nickname": "crregisetcrZjcwN2NmYz", "Url": "https://blockchain.elastos.org", "Location": 100083, "State": "Active", "Votes": "7035.21015465", "Index": 5 }, { "Did": "ij9EiAgPbfsCK46VzYDqqWZfYUro6k7Ufi", "Value": "0", "Rank": 188, "Code": "2103a988e73eaca4b434361d33e92fbe7470f14b9e6ba21272e33363c47a7d5b54daac", "Nickname": "r_adr_us41", "Url": "www.r_adr_us41.com", "Location": 86, "State": "Returned", "Votes": "0", "Index": 183 } ], "status": 200 }
Get cr candidates total vote of specific height¶
total cr candidates vote of specific height
-
GET
/api/v1/crc/vote/height/(int:`height`)
¶ Example request:
GET /api/v1/crc/vote/height/241762 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":2468878.85555, "status":200 }
Get simplified transaction record (including pending transaction)¶
-
GET
/api/v1/simple/tx/(string:`txid`)
¶ Example request:
GET /api/v1/simple/tx/d0f826ca7e7da50dee8fd37b39c7aa5014d5630d0c178f724bdb492b18a45706 HTTP/1.1 Host: localhost
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "result":[ { "Address":"Ed57c3wF3J1u8vEYE9cjGUpqGPkEJC69v8", "Txid":"d0f826ca7e7da50dee8fd37b39c7aa5014d5630d0c178f724bdb492b18a45706", "Type":"income", "Value":425211, "CreateTime":1580431843, "Height":565675, "Fee":0, "Inputs":[ "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "Outputs":[ "Ed57c3wF3J1u8vEYE9cjGUpqGPkEJC69v8" ], "TxType":"TransferAsset", "Memo":"type:text,msg:From ELABank,ThaiEla Super Node Reward Distribution", "Status":"confirmed" }, { "Address":"EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW", "Txid":"d0f826ca7e7da50dee8fd37b39c7aa5014d5630d0c178f724bdb492b18a45706", "Type":"spend", "Value":425311, "CreateTime":1580431843, "Height":565675, "Fee":100, "Inputs":[ "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "Outputs":[ "Ed57c3wF3J1u8vEYE9cjGUpqGPkEJC69v8", "EXuF9pAnZ8pwyGjJvvDrx73kfpi4oNeqyW" ], "TxType":"TransferAsset", "Memo":"type:text,msg:From ELABank,ThaiEla Super Node Reward Distribution", "Status":"confirmed" } ], "status":200 }