- All data is sent and received as JSON
- All timestamps return in 10 digit int:
1558329858
- All keys are named with Camel-Case
Content-Type
:application/json; charset=utf-8
Name | Type | Description |
---|---|---|
code |
int |
Error code |
message |
string |
Error Message |
result |
object |
Return result data |
NONE
path: /dashboard/statistics
method: 'get'
params: {}
result: {
data: {
'tps': { // tps/difficulty/blockTime/hashRate
val: num,
trend: num
}, ...}
}
path: /dashboard/statistics/:name // tps/difficulty/blockTime/hashRate
method: 'get'
params: {
duration: '' // hour/day/month/all
}
result: {
data: [{
time: num, // 10bit
value: num
}, ...]
}
path: /block/:blockHash
method: 'get'
params: {}
result: {
data: {
epochNumber: num,
position: num,
hash: 'hash',
difficulty: 'num',
miner: 'hash',
gasLimit: num,
timestamp: num, // 10bit
transactionSize: num, // Tx count
//
deferredReceiptsRoot: 'hash',
deferredStateRoot: 'hash',
height: num,
isPivot: bool,
nonce: 'hash',
parentHash: 'hash',
refereeHashes: [],
size: num,
transactionsRoot: 'hash'
}
}
path: /block/:blockHash/transactionList
method: 'get'
params: {
pageNum: 1 // num | 页码
pageSize: 10 // num | 每页展示数
}
result: {
total: num, // 总数
data: [{
blockHash: 'hash',
from: 'hash',
to: 'hash',
value: '',
gasPrice: 'num',
timestamp: num, // 10bit
contractCreated: ,
data: '',
// isPivot: bool, // Tx 无 Pivot
epochNumber: num,
gas: num,
hash: 'hash',
nonce: num,
r: 'hash',
s: 'hash',
transactionIndex: num,
v: num,
}, ...]
}
path: /block/list
method: 'get'
params: {
epochNum: num, // 可选
pageNum: 1 // num | 页码
pageSize: 10 // num | 每页展示数
}
result: {
code: // 0 | 1
msg: //
result: {
total: num, // 总数
data: [{
epochNumber: num,
position: num,
hash: 'hash',
difficulty: 'num',
miner: 'hash',
gasLimit: num,
timestamp: num, // 10bit
transactionSize: num, // Tx count
//
deferredReceiptsRoot: 'hash',
deferredStateRoot: 'hash',
height: num,
isPivot: bool,
nonce: 'hash',
parentHash: 'hash',
refereeHashes: [],
size: num,
transactionsRoot: 'hash'
}, ...]
}
}
path: /transaction/list
method: 'get'
params: {
pageNum: 1 // num | 页码
pageSize: 10 // num | 每页展示数
}
result: {
code: // 0 | 1
msg: //
result: {
total: num, // 总数
data: [{
blockHash: 'hash',
from: 'hash',
to: 'hash',
// value
// gas price
timestamp: num, // 10bit
contractCreated: ,
data: '',
// isPivot: bool,
epochNumber: num,
gas: num,
gasPrice: 'num',
hash: 'hash',
nonce: num,
r: 'hash',
s: 'hash',
transactionIndex: num,
v: num,
value: '',
}, ...]
}
}
path: /transaction/:transactionHash
method: 'get'
params: {}
result: {
code: // 0 | 1
msg: //
result: {
data: {
blockHash: 'hash',
from: 'hash',
to: 'hash',
value: '',
gasPrice: 'num',
timestamp: num, // 10bit
contractCreated: ,
data: '',
// isPivot: bool,
epochNumber: num,
gas: num,
hash: 'hash',
nonce: num,
r: 'hash',
s: 'hash',
transactionIndex: num,
v: num,
}
}
}
path: /account/:address
method: 'get'
params: {}
result: {
code: // 0 | 1
msg: //
result: {
data: {
balance: "39998263999999999968857000" //39998264 CFX(Max) 10^9 Gdrip Drip(Min)
firstSeen: 1557924851
lastSeen: 1558495563
minedBlocks: 0
receivedTransactions: 1
sentTransactions: 1483
}
}
}
path: /account/:address/transactionList
method: 'get'
params: {
startTime: 'string', // 可选:精确到小时
endTime: 'string', // 可选:精确到小时
txnType: 'all', // 可选: 默认all all | outgoing | incoming
pageNum: 1 // num | 页码
pageSize: 10 // num | 每页展示数
}
result: {
code: // 0 | 1
msg: //
result: {
total: num, // 总数
data: [{
blockHash: 'hash',
// isPivot: bool,
from: 'hash',
isIn: bool,
to: 'hash',
isOut: bool,
value: '',
gas: num,
gasPrice: 'num',
timestamp: num, // 10bit
contractCreated: ,
data: '',
epochNumber: num,
hash: 'hash',
nonce: num,
r: 'hash',
s: 'hash',
transactionIndex: num,
v: num,
}, ...]
}
}
path: /account/:address/minedBlockList
method: 'get'
params: {
pageNum: 1 // num | 页码
pageSize: 10 // num | 每页展示数
}
result: {
code: // 0 | 1
msg: //
result: {
total: num, // 总数
data: [{
epochNumber: num,
position: num,
hash: 'hash',
difficulty: 'num',
miner: 'hash',
gasLimit: num,
timestamp: num, // 10bit
transactionSize: num, // Tx count
//
deferredReceiptsRoot: 'hash',
deferredStateRoot: 'hash',
height: num,
isPivot: bool,
nonce: 'hash',
parentHash: 'hash',
refereeHashes: [],
size: num,
transactionsRoot: 'hash'
}, ...]
}
}
path: /block/:blockHash/refereeBlockList
method: 'get'
params: {
pageNum: 1 // num | 页码
pageSize: 10 // num | 每页展示数
}
result: {
code: // 0 | 1
msg: //
result: {
total: num, // 总数
data: [{
epochNumber: num,
position: num,
hash: 'hash',
difficulty: 'num',
miner: 'hash',
gasLimit: num,
timestamp: num, // 10bit
transactionSize: num, // Tx count
deferredReceiptsRoot: 'hash',
deferredStateRoot: 'hash',
height: num,
isPivot: bool,
nonce: 'hash',
parentHash: 'hash',
refereeHashes: [],
size: num,
transactionsRoot: 'hash'
}, ...]
}
}
path: /util/type/:hash
method: 'get'
params: {
}
result: {
code:
msg:
result: {
data: 0/1/2, // 0 for block, 1 for transaction, 2 for account
}
}