getBlockRange()
Get a range of blocks
Method Signature
def getBlockRange(self, blockchain, start, end)
Parameters
Name
Type
Description
blockchain
string or hexadecimal
Blockchain address
start
string
Starting block
end
String
Ending block
Example
from circular_protocol_api import CircularProtocolAPI
blockhain = 0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2
circular = CircularProtocolAPI()
result = circular.getBlockRange(blockchain, "0", "10")
Result
{
"Result": 200,
"Response": {
"Blocks": [
,
{
"Block": {
"BlockID": 1,
"Blockchain": "8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2",
"Nonce": 1630,
"Node": "02fc8b01bfc5dc2911941871e6de81f5f6fe60f3961343f802ad78e7e077ea32",
"PreviousBlockHash": "000c8b1813867008fe2a6598a96de7906895b7b6df37194d5eb0831f4c3d5da6",
"TimeStamp": "2024:03:26-19:44:44",
"Payload": {
"Transactions": [
{
"ID": "7d9677352775586234eff0c17365da887049ab1fe9040d3afc68341a972a8788",
"From": "41e123e686055b219e46bcdb7218e0dcb51a105c7396d30c3a36ace9a6628eed",
"To": "41e123e686055b219e46bcdb7218e0dcb51a105c7396d30c3a36ace9a6628eed",
"Timestamp": "2024:03:26-19:44:37",
"Type": "C_TYPE_REGISTERWALLET",
"Payload": "7b22416374696f6e223a2243505f524547495354455257414c4c4554222c225075626c69634b6579223a2230343462636636333830343032316430386132373662326338353639663764376130313434373036363831336566653666643061643034653034383734373436336136326132356566316463333434643537313831306337616131633033386438303532666666393437336531393061313036366635396232616266363164393765227d",
"Nonce": "0",
"OSignature": "",
"NodeID": "7bb5bd50729d6857942701d5673ea70ca1625f883230d8543970a452d1abe1c4",
"GasLimit": 0.000000,
"NagFee": 0.000000,
"BroadcastFee": 0.000000,
"ProcessingFee": 0.000000,
"DeveloperFee": 0.000000,
"ProtocolFee": 0.000000,
"Instructions": 0,
"Status": "Executed"
}
],
"BlockReward": 166.670000
}
},
"Hash": "000c8931e51d2f89ba66cd7b2b365e7202e27dfac95884e254c56d932e513677",
"Signature": "30450220308a8383ffb6e7b4ce34c3ba9fbbdef393c4bc55ba043daaa7bbd29c1b6e108e022100d3fbb0eb3d6d211a42ae1a487da4fd039a92180a9619c3d339544d24a6abfa64"
},
{
"Block": {
"BlockID": 2,
"Blockchain": "8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2",
"Nonce": 3668,
"Node": "7bb5bd50729d6857942701d5673ea70ca1625f883230d8543970a452d1abe1c4",
"PreviousBlockHash": "000c8931e51d2f89ba66cd7b2b365e7202e27dfac95884e254c56d932e513677",
"TimeStamp": "2024:04:08-19:48:45",
"Payload": {
"Transactions": [
{
"ID": "356c979ab7dfb532d2de29138baae3a88dd35567298ccbc1862fdf5868dfc456",
"From": "e2e86db8f44ceae4750a2a055b38cb3ae326bc1c282f09e7c0cc1f585984bdf2",
"To": "e2e86db8f44ceae4750a2a055b38cb3ae326bc1c282f09e7c0cc1f585984bdf2",
"Timestamp": "2024:04:08-19:48:28",
"Type": "C_TYPE_DOMAIN",
"Payload": "7b22416374696f6e223a2243505f5245474953544552222c224e616d65223a22313233222c225965617273223a2231222c224175746f52656e6577223a307d",
"Nonce": "1",
"OSignature": "30440220695347d8e6b4f6c9f449e756cec0c892b3a20f3a21a47dfa4adb4753c944ed5002200dea0a8c22a60a0d199e6817bb10dc5ba799151f9f943b0e6352125af4953ff0",
"NodeID": "8a93c6b6f8d166097ddfeb3e5e3a2998b35e0b6f0bd2e31a8a130a11b6749279",
"GasLimit": 0.000000,
"NagFee": 0.500000,
"BroadcastFee": 1.000000,
"ProcessingFee": 1121.010000,
"DeveloperFee": 0.000000,
"ProtocolFee": 577.490000,
"Instructions": 0,
"Status": "Executed"
}
],
"BlockReward": 166.670000
}
},
"Hash": "0000d033b7b0b0b69908f34ff5dfab6cc8cb97b7b95cdd503916763c1622830e",
"Signature": "30450220748f29c141e907561fe989b8e1d5a55ee62dee80879c87ac66a6d160fcfbd173022100f922ac19b33435211784af72741139e4f27c428e2e675ecf92786120f30ef17c",
"SelectedNode": "8a93c6b6f8d166097ddfeb3e5e3a2998b35e0b6f0bd2e31a8a130a11b6749279"
}
]
},
"Node": "02fc8b01bfc5dc2911941871e6de81f5f6fe60f3961343f802ad78e7e077ea32"
}
Wrong starting or ending block number
{
"Result": 103,
"Response": "",
"Node": "8a93c6b6f8d166097ddfeb3e5e3a2998b35e0b6f0bd2e31a8a130a11b6749279"
}
Wrong blockchain address:
{
"Result": 118,
"Response": "Wrong Format",
"Node": "02fc8b01bfc5dc2911941871e6de81f5f6fe60f3961343f802ad78e7e077ea32"
}
Last updated