Skip to content

Latest commit

 

History

History
1198 lines (939 loc) · 58.4 KB

Insight_API_documentation.md

File metadata and controls

1198 lines (939 loc) · 58.4 KB

Insight API

The Insight API is accessible via HTTP via REST or WebSocket.

To call the REST API, use the /insight/api path prefix. To call the Websocket API, use the /insight/socket.io path prefix.

POST methods require parameters to be passed in JSON objects.

Endpoints

Below are the implemented Insight API endpoints and associated methods.

Blocks

Methods that work with blocks.

/block/

URL: GET /block/{hash}

Description: Retrieves summary of block by hash.

Parameters:

Parameter Type Description
hash string Block hash

Request Example:

GET /block/00000000000108ac3e3f51a0f4424dd757a3b0485da0ec96592f637f27bd1cf5

Request Response:

    {
        "hash": "00000000000108ac3e3f51a0f4424dd757a3b0485da0ec96592f637f27bd1cf5",
        "confirmations": 279106,
        "size": 382,
        "height": 3,
        "version": 1,
        "merkleroot": "4fc534dea8ec07afca757eff9f7deb685eda0d67945e08a384f533d19a923a04",
        "tx": [
            "c0defa7c2ca47d069acacbc871d102e2efa4fbf0b3a54965061df2b814c9e9fc"
        ],
        "time": 1454954662,
        "nonce": 1643026777,
        "bits": "1b01ffff",
        "difficulty": 32767.74999809,
        "previousblockhash": "000000000000c41019872ff7db8fd2e9bfa05f42d3f8fee8e895e8c1e5b8dcba",
        "nextblockhash": "0000000000002c9a6f993e43b39982d6d3b2aa51bf0205ad879a7715c2458c88",
        "reward": 21.83707864,
        "isMainChain": true
    }
]

/block-index/

URL: GET /block-index/{height}

Description: Retrieves hash of a block by block height.

Parameters:

Parameter Type Description
hash "int64" Block hash

Request Example:

GET /block-index/123445

Request Response:

{
    "blockHash": "00000000000001ac29068b9ff5119f29a8530e2991aa978edc33d58b775a9aed"
}

/rawblock/ (hash)

URL: GET /rawblock/{hash}

Description: Retrieves raw block data by hash.

Parameters:

Parameter Type Description
hash string Block hash

Request Example:

GET /rawblock/00000000000001ac29068b9ff5119f29a8530e2991aa978edc33d58b775a9aed

Request Response:

    "rawblock": "03000000101949a7a4e02ec5b052d458b1d864d3c56f7619179551002b02000000000000960f0151fa7c7c167aac1455822a7814725ff9d22819fc098872381ac95a32bf78b031384b636c4ba4818c9b1b86cbf71471aab442a5ae6f52a719d62d191e9d0100c4d82bff2009050001005da70000e804031ab40a5fab0200000035e20100560d00003810ec58027245516a2e4b2f1efe05fc60b163990000000000000000000000000000000000000000000000000301000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff03371e3d0f00000000000017a914f5916158e3e2c4551c1796708db8367207ed13bb8700000000000000000000266a2435e201000000000000000000000000000000000000000000000000007120e314d5ed75dabd5a815b0000000000001976a914b0c9ecbd75784910a7fd183f80b1ae7f57267d6b88ac00000000000000000182d3ab6a0000000000000000ffffffff0800002f646372642f010000000112a8a16894a4188dd09d962eefb4e40987995fdb1fc3f326660d53123b2cddc30000000000ffffffff026247243f0000000000001976a914d43e2040eaec2d41fb4e3d01642b0a28ff41252688acd05d6b020000000000001976a91486447e15657967a3cfd931aa00d2bfe9acd241e188ac0000000000000000017a8193410000000034e20100020000006a47304402200dad49dadae86354b24f55349e953cd88c1b34da8e6d1b933548942c4174ce1e02200a530bfe236f2546b9913a330f5b853b8cea9664116ce5b0d4477949766a7f9e012102b5b873c74b6fb056359bea84de156fb55a5f4b5970701e2de84702207e4fd34e01000000020134b83a5633d7ca3b4112cf2cca7ae457d7f5e83f9d958132ae6a28a7694cc40300000001ffffffff2c51cb0aed904c4c0bdbc4d0ea59a65647845a6d37b11dae0f366215719f12a80300000001ffffffff0200aea68f0200000000001976a914fcc8e0070f8afd1cef4e258f22f3d60576f53c5f88ac73277f050000000000001976a9148ac4eedb2816edd2e6543e2eafd9cf793b4b399a88ac000000000000000002748e3749010000003bdb0100000000006b4830450221009a1aae0b5c680a77f6af0c5ae483e819d4bc92284fef1792a408fd2c107dfece02206aed6d3b71071535bb2e06617600ac584582eeb5d1b55bfb6c726cc32ebb25f5012102e52aa5ff16a9a32548571a2538f9e01ab660797b6dcc3ab5d146fa7270e4198cb7abf44b0100000045df0100010000006a473044022066f373732515c11627f2f9cc0a21f585ca0fa50601366d90fb7270cf1abc26f10220460d7fa2a11217be2020908efde2e82e3e6d2c37eee9c8c0fa330a527116a093012103a71d03035d07bee5436876f3bab610bfd3fe41fce47c1f1fbd1d0667e81f01f50601000000020000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff3250a84ae1430e20017d08ba6b3610713d7c577b3ba75c0be6b91567127d23060000000001ffffffff0400000000000000000000266a24101949a7a4e02ec5b052d458b1d864d3c56f7619179551002b0200000000000034e2010000000000000000000000086a0601000300000064e7730000000000000018bba91486c6da62556f5e21fbce3564b7374724d65f0cbb87c60642680100000000001abb76a91407a212c93b509948d163c7604fd3207d4b1e4b4388ac000000000000000002baab24090000000000000000ffffffff0200007142915f01000000a7d80100050000006a4730440220543c40e8ddaeab6659d0afdb6ed03a5b70869d770d3288e6685520503105846702207d106d5f33509403fe0d8adb0d50b7e4efa6e8996b0fca773c5a2ac089445b6b012102775e1b06bf1acfdcb00218223828f81a1a19e21566ce182576454a43e3817cb101000000020000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff08c374eba4bdad4e119225d1929a039e69f7ceab3c7fff652f5203bf423868fa0000000001ffffffff0400000000000000000000266a24101949a7a4e02ec5b052d458b1d864d3c56f7619179551002b0200000000000034e2010000000000000000000000046a02010090e773000000000000001abb76a9140ba411280c9aecbb10dbe052a0a6059d438364e388ac0fc2f25f0100000000001abb76a914f445c173116141bfb472b663101d07bd4292e18a88ac000000000000000002baab24090000000000000000ffffffff020000e6fd41570100000090d901000900000091483045022100ca8dee843f0722b66166d0031c1c30348ada7964fd285f74f3bbec6796b084cb022067f734c409ebf8be6a6ed378c6d17632bb3d5417ce23d8ccbbc6ec3d890e6c4a01475121021061b61dbc4559facc180a46cae3a79c6be5e59aa84a89d9309ab7ce175a5d782103c25e6c1c69dd230879f70f4d6f9ccef2d205625820b2e16aafe922d7636af5db52ae01000000020000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff0c8ccc208a9d9b2b5c91c0bf9c8749df000cdb5f0a1039f9e6ece6f73c4348ee0000000001ffffffff0300000000000000000000266a24101949a7a4e02ec5b052d458b1d864d3c56f7619179551002b0200000000000034e2010000000000000000000000086a060100030000003e1c66180100000000001abb76a914492095e88b20ecc0c380b1df3b691c70c4ffd5a988ac000000000000000002baab24090000000000000000ffffffff0200008470410f01000000d9b80100060000006a47304402206630cedeb4289ddc054c625fc702b5982c4c589b23bad6553e7b2d264dafa56f022037fb93a92eaa9f0063ab61c591aeaee20feacfa52e0bb7f938d29d4df54fe15a012103abb52f58e93450e3dac238ed14c9076beaac4acc62c880f0f8f90ac85ae5f1a501000000020000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff0a2a884c42a2a5b47f6300b418565b6d27f74c2edcd2c26bfd9e718f4b0323880000000001ffffffff0300000000000000000000266a24101949a7a4e02ec5b052d458b1d864d3c56f7619179551002b0200000000000034e2010000000000000000000000086a060100030000003196fedb0100000000001abb76a91493b5ddd960c3b6d408aa3eed7aea9b30749ac3fb88ac000000000000000002baab24090000000000000000ffffffff02000077ead9d2010000003edc01000a0000006a473044022013cc8a742f2ee942cf277a66e09d827694eac9d8cee6dc1f737ebae6d572ee1a02204898aafbd29707502cda68169dcfc897e5b2cbb8ff83a39083f88d95e9ba4f3b0121022ad5d2600464098ebcdd6f2b6b57c983b56081254aee3b8e3cfad3eeac00e72201000000020000000000000000000000000000000000000000000000000000000000000000ffffffff00fffffffffc523cd235acaaaf701c6e84c777eebc67742a7f6df209aa2a366cfd59f159a10000000001ffffffff0300000000000000000000266a24101949a7a4e02ec5b052d458b1d864d3c56f7619179551002b0200000000000034e2010000000000000000000000086a06010002000000a0a966600100000000001abb76a914a53649e684d9b2b2c53b018b9463797b1deec30388ac000000000000000002baab24090000000000000000ffffffff020000e6fd41570100000019d90100070000006a473044022031d4cb9494c26fc6376eeefc13d5e14094da4707f826182c70d56a0db1f0281002202d0c74dd9a86565337b49561a4ec2c76bdfde19fa433c269ffe6f4c13fc4dc73012102401254ffa9b8b7b5ed7b30c9a7a70f5581061c791753ac67ee5c7a732f00206301000000025dde64d18076109c7341cb01d0da793f974a3422f140684f0a3d839b33fa10da0000000000ffffffff5dde64d18076109c7341cb01d0da793f974a3422f140684f0a3d839b33fa10da0100000000ffffffff05b40a5fab02000000000018baa914c492ba8061868cc05c60b20dd57b5b75868e39ff8700000000000000000000206a1e21fde31cf40ad4397b12d8dd186bff3401463fbd663f7100000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac00000000000000000000206a1e36b46109f2e0126899b5489e121f1cdc6a74397ebe2ff6aa020000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000002663f71000000000034e20100010000006a4730440220447cc2e92a8cc0076d8ca4fda5d975897b2054a62dcecc9e5c8cd5d764ed77210220239e1d8eace69241371258bc1751b98c5914283ba396c022c0475a227b792068012102bd8275d11ace668ae5c8ef8e49a77c5a1d47c1637359d213df08fdd0cd070f6ebe2ff6aa0200000034e20100010000006a47304402206e670ee6308548084096b7d145b922d29c8d68a11a0d18ec0b27481305a23e6302207d9f7f0bc9e7ed3b7fee79b4ac4ba4db1ab1d5e4ce6403693c49f62b783da7ea012102bd8275d11ace668ae5c8ef8e49a77c5a1d47c1637359d213df08fdd0cd070f6e"
}

/rawblock/ (height)

URL: GET /rawblock/{height}

Description: Retrieves raw block data by block height.

Parameters:

Parameter Type Description
height "int64" Block height

Request Example:

GET /rawblock/1000

Request Response:

    "rawblock": "01000000c3cfa8d0ef64b54f6d877ff3e9f1916355938ea18757402ae550000000000000a27eea628c7e9ab35feafb882640c6f1fd766ece3c51e61881cefaffbc55786a6dd518834107a9a679774ab343cc7e4a343a124a5119252cec547779d8474cd5010000000000000000001400df2500004293661a00c2eb0b00000000e80300002d1e0000369dbc56da46010b4d0f969800000000000000000000000000000000000000000000000000000000000000000601000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff03fa1a981200000000000017a914f5916158e3e2c4551c1796708db8367207ed13bb8700000000000000000000266a24e80300000000000000000000000000000000000000000000000000003137f54a6e6ace4bdea1906f0000000000001976a9142ec5027abadede723c47b6acdbace3be10b7e93788ac000000000000000001d8bc28820000000000000000ffffffff0800002f646372642f0100000001974dc6f00dc39c646d041eda3ad9610965b79048cf5d72875e425aab00b664d90200000000ffffffff02115194320000000000001976a9147904ceec992189eb874b897531e67c9a1157a2bf88ac8d05b03c0000000000001976a914cac2cf2fe9dfccfd900f8a09bd0ac2ad09490df088ac000000000000000001dea1906f00000000b6010000000000006a47304402203d857ad21e12cfe1c785873b3060b68f5db1c4e1560ae03962fb9d90a41266d302200850c522a071fc4c4e570ffdd907e8e5c3cb36ce531d72ec4db99b998a61eafd0121024a2546600c5cbcb53971a19e2d481e69b6f39f8f8df55ebec340eaf238f5a4dc0100000001d1b5ad6388df62cbdd1ad46a8e41bbc3c6e7897c43b84ae214093cee9e40649a0000000000ffffffff0200b4c4040000000000001976a914b1b7d18dafdd4436ec76d78f02b3f732e00cc1fa88ac90e02a000000000000001976a9149dd5bff41a0dd6cea432e2b88c049b57d5023a5188ac000000000000000001d0df3b0500000000c2030000090000006a473044022054dfb249ba2c50e181e63294a62467c898ab062c8623998f01a7be142541f6f802201c4b68fa469e42a683fa649d81ab97a4ccb2024436821cb4ee5c7f06172b53ac012102c09262b376405870a69902443153c3e9902eed0853500513fc789d7d32cb3f8a010000000196e82c07793d7467ec0a4dd55f661e9cdc142b990660ae04febbaa28e99c45ab0100000000ffffffff024c67e6380000000000001976a914a6f876d210cd6bd864b4a7d620a95a81b62504f488ac8b791e0c0000000000001976a91451730387ee4a10d9c2c6ff3d014e0f3f06a88e9e88ac000000000000000001172c514500000000c5030000040000006b483045022100faec553fe1eea20764674ec47dbf5edafbbcd2599102dad3f96709204c82a0d302201936228808ef1508af60e6ae0c30e8e370fdc4615b8a41e2677843aa1eb789ae012103b94e5e2bed3a3911365bcee1a566d74dd69f6af3adc27299bca335d5014a0cec0100000001182d048059d9184181545183541e257cd7b750ff690b0ed4253b705098bb67220000000000ffffffff02736bd01a0000000000001976a914c831324bb558631f1bf6abd96aef396b5933180688ac5ff67c4e0000000000001976a914e68d13052270a797075dd050dcf1715362e60de488ac00000000000000000112ad996900000000e2030000010000006b483045022100dae60c1285af54a2a7aaf0899d7f55e8b499bdbd94043886448d1f494397e87202205eaf7547cb5a3760de69f2b69d3efb6e0659172115543fa06db50fc8d6372c93012103a7806e3901477a38e8428d0785ce8e7a0149aa914e9cef21ce2ee1099fa1cd5601000000026f6c9090cb86416bfbd7e1b3d0cd3872468a9d3d3d425fb30d6e046b25bb99d40100000000ffffffff378405e74dd9a843ea699b24ed8138feaa0b70ee8714074bb072865d3ac66fde0100000000ffffffff02c0514a6b0100000000001976a914ce27b2450315d68cd7fc546e3d55b5697082935388ac42991e0b0000000000001976a9141e7fa011a7ba35058453221f3595261ddfebe69e88ac0000000000000000023f6bd95801000000df030000010000006b483045022100dfa2ca0c0bde870e7097c733eae1f511e660950282f2457ac2c8fb27ad3dae4402203928c72c82d9d55377e8ba153f3b074c1a70e202f6a28d4a9c5205649c1e7ed8012103b73b9ca991e97c179a25cdfabf57c962f21ef221507a23d2049c5683dc12d4cb03cbdb1d00000000dd030000030000006a4730440220019d8c294f55ecd14e059b8fbcdeb22e68ae6b897af14084350a5117b267b30d0220426ff3451e3c2636469fa002d0e3d2e3d47280aa6fc939638828aa2cdb1dffbf012102d5fc47cca1cc1983c70d59140eb316a44f588cdf14ba9103b70a9f10496394971401000000014bbf84d10e418d7f4ccb935af8a873ff4d51f2f5bc601d88b779a690659e41810200000001ffffffff0300c2eb0b0000000000001aba76a9148582350508a7cbf877a3d66bc973185c8b95765388ac00000000000000000000206a1e3abcd90369e461b00561337b33704ac4277154a5400d380c0000000000580041fd100100000000001abd76a91460fdf07d705bb356d72759ec856c04320e942c4688ac000000000000000001404e351d01000000e3030000020000006b483045022100f5c4d043cb01180c5b4489273b62a6eb6b717f5ccc912f252253761b7878b1fd02203a9df9cd05f0c19dade6ecb6c8562df448623eefcc5a58261d76ef10a1ab8a030121028363b4a620af90aa6997b3341428e79ec69db751c7bd630954d3ccd1aae1f2eb01000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37d201000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402206eaac95798141b732ac0317c596b198a6a2a0b393ef9123414dbd44b40dca24202204268deba8a443c06b97a2c0022df065eec575be91b1a29eb1c365587a39f9364012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37da00000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402200585929da97e80a745d06fd01174be846d8be998f2020eee94ed357e20f4b1620220214ee2a05a903339d5b0979e2e8255ab0b0538a2f9a32ecd9b0e35f8420544a9012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a377202000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402204a0ea4b67dac767f5e9d87b435520baca065badd683d85ae8dd551ad572f06dd022060eda1cf8a47c32be3baa5f6d1beffc220a66711e1d3e95f96028734cd26637f012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a375700000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a473044022007d6a3c9bd0f7189472fcd3cb018f5d2aca44b4c3328f853ec1bcddb2ea64ff402206200f7dac61424116e7269c05403f0577b57bd4728c593c0b4cfaa8d80653baa012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a370300000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402205ab1d0bdf87dde0f2a21313ca7636227b0161a9c39f10c80185a42ae088cd23f02201fc1cd9d0502cc3416a68627b373f4b0b5ead513b0940d7e755d63ac906610ca012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a372701000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402204835a9927a6f74f8b4fba5e770c6c22f549794b2e0dd1bf5a48b2707e7a0159402205cd3b89d1c7abb3ebf00d2918cd8854199a330886bb458d61a2492a43429008b012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a379102000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402201a66daabf621a7d13936bc6627dcd647db8090ce7c26882bbb494beda8ea44fd02202481b1b080ba0ebfa02bb9bc2c3f6853991be1c95595b727fdc8c71f651a2f2d012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a375801000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a4730440220260cb07e823cbb202f3a026715813bde01379387f5a6a37a05967ffb4904d5910220080ed72984506987ce26cca608bc64f1a445172a1c1dcdb0f50f9733539ae64c012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37d901000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402206fac16b1689e5654ff0cd0fb7e9172f05fe870bbafe820e339eb33ef70035534022045f0e6d8cb8e1fcf744c8a2ab96cf00f36e630abf2778ea41d3f2e728673a44b012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a371800000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402207f715bdb5383031542ead54ce9e0f26d9ef9c8283e15a181412e684fe91c807b02204d1580f924d28c1db1e395c79de18e79926525a3aeaad28a3fe17e45382c9d85012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37f100000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402200dbc4c38f7090e520acb7e3e30fe20494c5b685ac441b4fc4fb27e5e64f87ac8022029cce8e1d4f18e0d9a3b3a66598cc18057c5f7e9f4472c885d7c4b9ce8e71b94012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37d801000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402206b564e8e4a8f7489d98c0df5e6854f4b9bfe04d7ac7daef959a91485b4f85819022057ae8823a693f9f6b09ac7f405360a1fe081b02f7f11aea4b3d39c949f9f15f2012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a378f01000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a473044022026a03e61b5f9a7ec06f4ef2db00f8beb7e3520de33add8a36f6972f13081646402207b664609f6255ef0c32aabb644745f3f31d0c816f3b2ba37d6f916f1cc2789d0012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37cc00000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402204729405dc2d6337da352308a1810f5598d09abeb92cf4b45e563a80b55b5d95f02207004ea7f247b5488be12fcfd57fcc1b19ccc7b9a58b19f19a1224e03dd799b74012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37dc01000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402200699bbe8c470efcdd3826b6f9bf610256cc17e4368d7dac92bba0dd076a3abe602201a1cf8a0c92b8387806cafee987fad5f236b573420bb8cd96b20a28918754d38012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a379202000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a4730440220400526e6f7900c62d0c1e10c3f884a39c19c061728730cd2ef08c1535d30a61d0220455e44beecbeca047ab616e91ef86d17ad89373fa4914bef8082c3a303e35638012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37c202000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a473044022032b39978a66c8ef11037970d3c9e0222a0c8c3a424e144e3f1618361ce1a702c02203067ff5c4800b22c16578a04c363c146cffc9c75c7ec8b08342389edcc07748e012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a37f402000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a473044022013cbd30781efcc9fcb8a6e188728d4dbc33161833314f7a2e131fe191c9dcbe6022017d3cf15d6e870a258fc9efe9b7df5bf38a84e3f77f8218514e86524c762a1e8012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c501000000016595429179d63ce5886c73c818abe1e518d3183888113011bf23aea55fda6a379d02000000ffffffff0300c2eb0b0000000000001aba76a9148d30897b89d7ded1fef0c89458c18032a9e3d79888ac00000000000000000000206a1eb3653f61256f0370d9c46cbeaf2678098ecaae8c804f470c000000000058000000000000000000001abd76a914000000000000000000000000000000000000000088ac000000000000000001804f470c0000000081030000040000006a47304402205a7a672356a6c6c7e026001bbd8fa0324326061a3414908900c61ae9ef1c66d8022042045d9f47b4f34589c97b6209a1316df2b8defea53e2d670c31349a530308e9012103bc298be41533693a3e2b42b231a7d12de4e33b5561640d037a21054e250644c5"
}

/blocks/

URL: GET /blocks

Description: Retrieves summaries of blocks by time.

Parameters:

Parameter Type Description
limit "int64" (optional) Maximum number of blocks to return. If limit is not specified (or set to '0'), blocks for the 24 hours after blockDate will be returned.
blockDate "int64" (optional) Date to start searching for blocks (YYYY-MM-DD). If blockDate is not specified, blockDate defaults to current date.

Request Example:

GET /blocks?limit=5&blockDate=2018-05-29

Request Response:

{"blocks":[{"height":243226,"size":5586,"hash":"000000000000000130f87685da4ddfce78a2f6c724dd1b40a967a5989ca04d5c","diff":0,"sdiff":0,"time":1527638041,"txlength":14},{"height":243225,"size":6870,"hash":"0000000000000000332d4285a61382c440f6e968528bf2df0df3017f6712735d","diff":0,"sdiff":0,"time":1527637990,"txlength":16},{"height":243224,"size":13397,"hash":"000000000000000270118fb1a75bc3f7d0214f4e094d3bfb9c7b68303314ceb5","diff":0,"sdiff":0,"time":1527637749,"txlength":14},{"height":243223,"size":11319,"hash":"000000000000000207163614e35b7bc217dfca4e24c89cabe3a2acac30333c2e","diff":0,"sdiff":0,"time":1527637402,"txlength":17},{"height":243222,"size":6567,"hash":"00000000000000000e6b1c3c7973a1cdc6986424e6e65176352574502d082126","diff":0,"sdiff":0,"time":1527637187,"txlength":16}],"length":5,"pagination":{"next":"2018-05-30","prev":"2018-05-28","currentTs":1527638399,"current":"2018-05-29","isToday":false,"more":true,"moreTs":1527637187}} 


Transactions

Methods that work with transactions.

/tx/

URL: GET /tx/{hash}

Description: Retrieves transaction data by transaction hash (txid).

Parameters:

Parameter Type Description
hash string Transaction hash (txid) of transaction

Request Example:

GET /tx/b6d49ee8b4bc8ff3dc6ac5bf8ec1fb629d0e895911fd80c367d5a809203269bf

Request Response:

    "txid": "b6d49ee8b4bc8ff3dc6ac5bf8ec1fb629d0e895911fd80c367d5a809203269bf",
    "version": 1,
    "locktime": 0,
    "isCoinBase": true,
    "vin": [
        {
            "sequence": 4294967295,
            "n": 0,
            "scriptSig": {},
            "coinbase": "00002f646372642f"
        }
    ],
    "vout": [
        {
            "value": 2.55663671,
            "n": 0,
            "scriptPubKey": {
                "hex": "a914f5916158e3e2c4551c1796708db8367207ed13bb87",
                "asm": "OP_HASH160 f5916158e3e2c4551c1796708db8367207ed13bb OP_EQUAL",
                "addresses": [
                    "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"
                ],
                "type": "scripthash"
            },
            "spentTxId": null,
            "spentIndex": null,
            "spentHeight": null
        },
        {
            "value": 0,
            "n": 1,
            "scriptPubKey": {
                "hex": "6a2435e201000000000000000000000000000000000000000000000000007120e314d5ed75da",
                "asm": "OP_RETURN 35e201000000000000000000000000000000000000000000000000007120e314d5ed75da",
                "type": "nulldata"
            },
            "spentTxId": null,
            "spentIndex": null,
            "spentHeight": null
        },
        {
            "value": 15.35204029,
            "n": 2,
            "scriptPubKey": {
                "hex": "76a914b0c9ecbd75784910a7fd183f80b1ae7f57267d6b88ac",
                "asm": "OP_DUP OP_HASH160 b0c9ecbd75784910a7fd183f80b1ae7f57267d6b OP_EQUALVERIFY OP_CHECKSIG",
                "addresses": [
                    "Dsh5gKAtf63WuzeqxFV7vJTFkPRkE35Zaf9"
                ],
                "type": "pubkeyhash"
            },
            "spentTxId": "550d9de51d7a7b6f46d3a2f24724372c8e4c632c971ed580f29f8626836a08ff",
            "spentIndex": 1,
            "spentHeight": 123735
        }
    ],
    "blockhash": "00000000000001ac29068b9ff5119f29a8530e2991aa978edc33d58b775a9aed",
    "blockheight": 123445,
    "confirmations": 155688,
    "time": 1491865656,
    "blocktime": 1491865656,
    "valueOut": 17.908677,
    "size": 200
}

/rawtx/

URL: GET /rawtx/{hash}

Description: Retrieves raw transaction data by transaction hash (txid).

Parameters:

Parameter Type Description
hash string Transaction hash (txid) of transaction

Request Example:

GET rawtx/b6d49ee8b4bc8ff3dc6ac5bf8ec1fb629d0e895911fd80c367d5a809203269bf

Request Response:

{
    "rawtx": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff03371e3d0f00000000000017a914f5916158e3e2c4551c1796708db8367207ed13bb8700000000000000000000266a2435e201000000000000000000000000000000000000000000000000007120e314d5ed75dabd5a815b0000000000001976a914b0c9ecbd75784910a7fd183f80b1ae7f57267d6b88ac00000000000000000182d3ab6a0000000000000000ffffffff0800002f646372642f"
}

/txs/ (block)

URL: GET /txs

Description: Retrieves all transactions in a block by block hash.

Parameters:

Parameter Type Description
block string Block hash

Request Example:

GET /txs?block=00000000000001ac29068b9ff5119f29a8530e2991aa978edc33d58b775a9aed

Request Response:

    "pagesTotal": 9,
    "txs": [
        {
            "txid": "b6d49ee8b4bc8ff3dc6ac5bf8ec1fb629d0e895911fd80c367d5a809203269bf",
            "version": 1,
            "locktime": 0,
            "isCoinBase": true,
            "vin": [
                {
                    "sequence": 4294967295,
                    "n": 0,
                    "scriptSig": {},
                    "coinbase": "00002f646372642f"
                }
            ],
            "vout": [
                {
                    "value": 2.55663671,
                    "n": 0,
                    "scriptPubKey": {
                        "hex": "a914f5916158e3e2c4551c1796708db8367207ed13bb87",
                        "asm": "OP_HASH160 f5916158e3e2c4551c1796708db8367207ed13bb OP_EQUAL",
                        "addresses": [
                            "Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx"
                        ],
                        "type": "scripthash"
                    },
                    "spentTxId": null,
                    "spentIndex": null,
                    "spentHeight": null
                },
                {
                    "value": 0,
                    "n": 1,
                    "scriptPubKey": {
                        "hex": "6a2435e201000000000000000000000000000000000000000000000000007120e314d5ed75da",
                        "asm": "OP_RETURN 35e201000000000000000000000000000000000000000000000000007120e314d5ed75da",
                        "type": "nulldata"
                    },
                    "spentTxId": null,
                    "spentIndex": null,
                    "spentHeight": null
                },
                {
                    "value": 15.35204029,
                    "n": 2,
                    "scriptPubKey": {
                        "hex": "76a914b0c9ecbd75784910a7fd183f80b1ae7f57267d6b88ac",
                        "asm": "OP_DUP OP_HASH160 b0c9ecbd75784910a7fd183f80b1ae7f57267d6b OP_EQUALVERIFY OP_CHECKSIG",
                        "addresses": [
                            "Dsh5gKAtf63WuzeqxFV7vJTFkPRkE35Zaf9"
                        ],
                        "type": "pubkeyhash"
                    },
                    "spentTxId": "550d9de51d7a7b6f46d3a2f24724372c8e4c632c971ed580f29f8626836a08ff",
                    "spentIndex": 1,
                    "spentHeight": 123735
                }
            ],
            "blockhash": "00000000000001ac29068b9ff5119f29a8530e2991aa978edc33d58b775a9aed",
            "blockheight": 123445,
            "confirmations": 155688,
            "time": 1491865656,
            "blocktime": 1491865656,
            "valueOut": 17.908677,
            "size": 200
        },
        
        .
        .
        .
        .

    ]
}

/txs/ (address)

URL: GET /txs

Description: Retrieves all transactions by address. Transactions are returned by time in descending order.

Parameters:

Parameter Type Description
address string Address

Request Example:

GET /txs?address=DseRvgwcGeCJJC4AUWimHSj8YzRMJ4ryvBM

Request Response:

{
    "pagesTotal": 21782,
    "txs": [
        {
            "txid": "9ba978f7bf8cde1163c84ca4b249d0a97a090ba549d186407cea51f21aee50f2",
            "version": 1,
            "locktime": 0,
            "vin": [
                {
                    "txid": "97fcf72fc252c2d6f535a4d5be8055acc67d7e72bbc8dc64fd5445b8bce9ded7",
                    "vout": 2,
                    "sequence": 4294967295,
                    "n": 0,
                    "scriptSig": {
                        "hex": "47304402204aa300044486b74f0c6bd6a44ae7e2001ae48c644604aa75c41506d6614ba51602205b227085fb9935ed64ff7772ecb5fd4ec791fee8279cd6b6aef8ff7001f73f2d0121032fa170be0502f9049d63a1c7c6be2f16ced286be6dc06fedf83520380ae2e674",
                        "asm": "304402204aa300044486b74f0c6bd6a44ae7e2001ae48c644604aa75c41506d6614ba51602205b227085fb9935ed64ff7772ecb5fd4ec791fee8279cd6b6aef8ff7001f73f2d01 032fa170be0502f9049d63a1c7c6be2f16ced286be6dc06fedf83520380ae2e674"
                    },
                    "addr": "DsaCBHbg9PX7qbn32oK2aUxYhENdTgpdcJK",
                    "valueSat": 9032520744,
                    "value": 90.32520744
                },
                {
                    "txid": "0dc66ade626754745f23b915e63102d3edb59180a074f383c5fef741b42af3f8",
                    "vout": 2,
                    "sequence": 4294967295,
                    "n": 1,
                    "scriptSig": {
                        "hex": "483045022100b683ac2b7668840dc048944407aa941e8f2e026f1d3a708bf7dfe0eea799700502206488d9da5301893672b97412f6dd27657c108682c6b7feefca15f45f0e739b45012102f8857d1459fb56fe3ba0f006943f2ec785f5e4bbd1d2480d0a1af2e8875214da",
                        "asm": "3045022100b683ac2b7668840dc048944407aa941e8f2e026f1d3a708bf7dfe0eea799700502206488d9da5301893672b97412f6dd27657c108682c6b7feefca15f45f0e739b4501 02f8857d1459fb56fe3ba0f006943f2ec785f5e4bbd1d2480d0a1af2e8875214da"
                    },
                    "addr": "Dsbr3zGyBcDYWWibnENAhW3N8UwJ5J4tnKg",
                    "valueSat": 8965893473,
                    "value": 89.65893473
                },
.
.
.
.

            ],
            "blockhash": "0000000000000008537e82b35ac3e7b4549289cfb440e1218260ef3fceb7770e",
            "blockheight": 229806,
            "confirmations": 49336,
            "time": 1523675017,
            "blocktime": 1523675017,
            "valueOut": 4248.47935122,
            "size": 10043,
            "valueIn": 4248.48951622,
            "fees": 0.010165
        },

    ]
}

/tx/send/ (POST)

URL: POST /tx/send

Description: Broadcasts transaction to network.

Parameters:

Parameter Type Description
rawtx string Signed transaction as hex string

Request Example:

curl -X POST \
 https://alpha.dcrdata.org/insight/api/tx/send \
 -H 'Cache-Control: no-cache' \
 -H 'Content-Type: application/json' \
 -H 'Postman-Token: bf2e16a1-b6d2-4b2f-b6e5-9ea7bd3df5b1' \
 -d '{"rawtx":"010000000184de71690b97b4cbac6e723570a25a56295b30aa26345bfc40c0609c87e23f1d0100000000ffffffff02809698000000000000001976a9143eb656115197956125365348c542e37b6d3d259988ac00811b2c0000000000001976a914e4c9ada86ba67b2c082fac1aa09fb17fccc6833688ac000000000000000001ffffffffffffffff00000000ffffffff6b483045022100b5020004e60a4d26c99a00316ed4f51131b99838fd8fab936d55f9475719bb3b022063b86596adba004367a138f62c73d59f8f3b2cded4b10b5fc0ebe92a4cf41c840121029ec6a82a9646c090decf20806029f332cc11a5c6fa17c943ee72c31b9707a433"}'

Request Response:

{
    "txid": "18a4eeed058c2266512863d03f79651cd38d94d6d682ae3f1e4aad0178c6998f"
}

Addresses

Methods that work with addresses.

/addr/

URL: GET /addr/{address}

Description: Retrieves transactions by addresses. Can optionally return transactions from N to M.

Parameters:

Parameter Type Description
address string Address
from int64 (optional) Starting transaction index
to int64 (optional) Ending transaction index
noTxList boolean (optional) If noTxList = '1', response will not include a list of txids

Request Example:

GET /addr/DshRLMBrqyDmMpp9gcz3bLgCnjMa75mrHsS?from=100&to=200?noTxList=1

Request Response:

{
    "addrStr": "DshRLMBrqyDmMpp9gcz3bLgCnjMa75mrHsS",
    "balance": 0,
    "balanceSat": 0,
    "totalReceived": 93.00360718,
    "totalReceivedSat": 9300360718,
    "totalSent": 93.00360718,
    "totalSentSat": 9300360718,
    "unconfirmedBalance": 0,
    "unconfirmedBalanceSat": 0,
    "unconfirmedTxApperances": 0,
    "txApperances": 4
}

/addr/ (balance)

URL: GET /addr/{address}/balance

Description: Retrieves address balance in atoms (the smallest unit of Decred; 1 DCR = 100,000,000 atoms).

Parameters:

Parameter Type Description
address string Address

Request Example:

GET /addr/Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx/balance

Request Response:

57009706748401

/addr/ (totalSent)

URL: GET /addr/{address}/totalSent

Description: Retrieves total amount sent from an address in atoms (the smallest unit of Decred; 1 DCR = 100,000,000 atoms)

Parameters:

Parameter Type Description
address string Address

Request Example:

GET addr/Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx/totalSent

Request Response:

12384494128495

/addr/ (totalReceived)

URL: GET /addr/{address}/totalReceived

Description: Retrieves total amount received by an address.

Parameters:

Parameter Type Description
address string Address

Request Example:

GET /addr/Dcur2mcGjmENx4DhNqDctW5wJCVyT3Qeqkx/totalReceived

Request Response:

69394400235357

/addr/ (unconfirmedBalance)

URL: GET /addr/{address}/unconfirmedBalance

Description: Retrieves unconfirmed balance for an address.

Parameters:

Parameter Type Description
address string Address

Request Example:

GET /addr/DseRvgwcGeCJJC4AUWimHSj8YzRMJ4ryvBM/unconfirmedBalance

Request Response:

1581

/addr/utxo

URL: GET /addr/{address}/utxo

Description: Retrieves Unspent Transaction Outputs (UTXO) for an address.

Parameters:

Parameter Type Description
address string Address

Request Example:

GET /addr/Dsbb8DHHwWMkxSSgfAj9czC44VVKXZPWAmg/utxo

Request Response:

    {
        "address": "Dsbb8DHHwWMkxSSgfAj9czC44VVKXZPWAmg",
        "txid": "bf0843b71dd75c985907ee3d1c74d88c2252665362a2e91abab908be03324e37",
        "vout": 55,
        "scriptPubKey": "76a914748ada15e1200593e21e9d3eb15e1e259cabdbeb88ac",
        "height": 270806,
        "amount": 0.05215156,
        "satoshis": 5215156,
        "confirmations": 8893
    },
    {
        "address": "Dsbb8DHHwWMkxSSgfAj9czC44VVKXZPWAmg",
        "txid": "4c47f2bed1310d28d84d9a5752433ed7f85c3dcb90f9a63fc7779028e01957ff",
        "vout": 126,
        "scriptPubKey": "76a914748ada15e1200593e21e9d3eb15e1e259cabdbeb88ac",
        "height": 270516,
        "amount": 0.10328578,
        "satoshis": 10328578,
        "confirmations": 9183
    }
]

/addrs/utxo

URL: GET /addrs/{addr0, addr1, ...}/utxo

Description: Retrieves Unspent Transaction Outputs (UTXO) for multiple addresses.

Parameters:

Parameter Type Description
address string Address

Request Example:

GET /addrs/Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL,DsTHdW8erZsD1Fqt8uCfapVR1Qsf9KaMwBN/utxo

Request Response:

[
    {
        "address": "Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL",
        "txid": "aba3e43d8e3c362bef5dc42e33333e71eb3037272f52c8d9cfa4589292d695cf",
        "vout": 0,
        "scriptPubKey": "baa9141d1bbbb5f78d6e0d5710f5029737172c9c16a67f87",
        "height": 273169,
        "amount": 96.8456757,
        "satoshis": 9684567570,
        "confirmations": 6570
    }
]

/addrs/utxo (POST)

URL: POST /addrs/utxo

Description: Retrieves Unspent Transaction Outputs (UTXO) for multiple addresses.

Parameters:

Parameter Type Description
address string Address

Request Example:

curl -X POST \
https://alpha.dcrdata.org/insight/api/addrs/utxo \
 -H 'Cache-Control: no-cache' \
 -H 'Content-Type: application/json' \
 -H 'Postman-Token: bf2e16a1-b6d2-4b2f-b6e5-9ea7bd3df5b1' \
 -d '{"addrs":"Dsbb8DHHwWMkxSSgfAj9czC44VVKXZPWAmg,DsoHKy2eWYPSS1SmVQCoQCLWzSPNgnJNN5p"}'

Request Response:

  [
     {
        "address": "DsoHKy2eWYPSS1SmVQCoQCLWzSPNgnJNN5p",
        "txid": "024d898f05e6490f77a2ba9592bcfa9900214df2afc89fdcb7cc271e147791fd",
        "vout": 28,
        "scriptPubKey": "76a914f4ceaf9aea15db9bb3b3c1ed0b06ce1a0dde726288ac",
        "height": 279089,
        "amount": 0.21156722,
        "satoshis": 21156722,
        "confirmations": 722
     },
     {
        "address": "DsoHKy2eWYPSS1SmVQCoQCLWzSPNgnJNN5p",
        "txid": "b12d03858d845b8f2f1c75b64598fd71387552c5c9fc8873b2d149a0d5e7a8f7",
        "vout": 2,
        "scriptPubKey": "76a914f4ceaf9aea15db9bb3b3c1ed0b06ce1a0dde726288ac",
        "height": 278723,
        "amount": 0.20763572,
        "satoshis": 20763571,
        "confirmations": 1088
     }
  ]

/addrs/txs

URL: GET /addrs/{addr0, addr1, ...}/txs

Description: Retrieves transactions for multiple addresses. Transactions are sorted in descending order, from the most recent to the oldest. For example, setting from = '2' and to = '5', will return the second most recent transaction to the fifth most recent transaction for each address provided.

Parameters:

Parameter Type Description
address string Address
from int64 (optional) Starting transaction index
to int64 (optional) Ending transaction index

Request Example:

GET /addrs/Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL,DsTHdW8erZsD1Fqt8uCfapVR1Qsf9KaMwBN/txs?from=2&to=5

Request Response:

{
    "totalItems": 23,
    "from": 2,
    "to": 5,
    "items": [
        {
            "txid": "4d408589647b60136ab48cc73f168617361b19bc716d90a9e71ebb7ba66c8f35",
            "version": 1,
            "locktime": 0,
            "vin": [
                {
                    "txid": "a9e85af288db532196e073c16e8db3e24d8d701717d43f78b6fa888eda8470de",
                    "sequence": 4294967295,
                    "n": 0,
                    "scriptSig": {
                        "hex": "473044022053f601a4115607f2966a01a2587150f4b6c4d3c5d3f38962ea719d840e4f3bd40220462ca2da0ad15d5a2f4f79bb48f2f2e6e261b0b5cf2cdf2cf4316469ac1c2c6e0121027748fa1c1008c94fe42a255659bc81c1f6ad2321ea475316beff1fa723984145",
                        "asm": "3044022053f601a4115607f2966a01a2587150f4b6c4d3c5d3f38962ea719d840e4f3bd40220462ca2da0ad15d5a2f4f79bb48f2f2e6e261b0b5cf2cdf2cf4316469ac1c2c6e01 027748fa1c1008c94fe42a255659bc81c1f6ad2321ea475316beff1fa723984145"
                    },
                    "addr": "DsfqvrGSaQLukxGpt5FhJ8bTWnu3HY2YTGN",
                    "valueSat": 1181234,
                    "value": 0.01181234
                },
                {
.
.
.
                }
            ],
            "vout": [
                {
                    "value": 94.67739409,
                    "n": 0,
                    "scriptPubKey": {
                        "hex": "baa9141d1bbbb5f78d6e0d5710f5029737172c9c16a67f87",
                        "asm": "OP_SSTX OP_HASH160 1d1bbbb5f78d6e0d5710f5029737172c9c16a67f OP_EQUAL",
                        "addresses": [
                            "Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL"
                        ],
                        "type": "stakesubmission"
                    },
                    "spentTxId": "d46b175895843d87514659d0c30889739b84932dd4e826d71da035a62f4d0c88",
                    "spentIndex": 1,
                    "spentHeight": 272308
                },
.
.
.

            ],
            "blockhash": "000000000000000044f28794ed817fe4a752c7df61ab22a26615a32b680279b4",
            "blockheight": 270251,
            "confirmations": 9481,
            "time": 1535687621,
            "blocktime": 1535687621,
            "valueOut": 94.67739409,
            "size": 538,
            "valueIn": 94.67794409,
            "fees": 0.00055
        },
        {
            "txid": "d9e66aa163c58de70bf9d28caad5ce4ee3b0be9eb48696e73cba1c4944028bc0",
            "version": 1,
            "locktime": 0,
            "vin": [
                {
                    "sequence": 4294967295,
                    "n": 0,
                    "scriptSig": {},
                    "valueSat": 122019340,
                    "value": 1.2201934
                },
.
.
.
            ],
            "vout": [
                {
                    "value": 0,
                    "n": 0,
                    "scriptPubKey": {
                        "hex": "6a243442b81ae29dc999dcbec5c164cb61ef23ef6792ce3010760000000000000000121e0400",
                        "asm": "OP_RETURN 3442b81ae29dc999dcbec5c164cb61ef23ef6792ce3010760000000000000000121e0400",
                        "type": "nulldata"
                    },
                    "spentTxId": null,
                    "spentIndex": null,
                    "spentHeight": null
                },
                {
.
.
.

            ],
            "blockhash": "000000000000000007c09bf2c86da56701a01c46f712b13093df02686dd40590",
            "blockheight": 269843,
            "confirmations": 9889,
            "time": 1535563524,
            "blocktime": 1535563524,
            "valueOut": 94.15262188,
            "size": 420,
            "valueIn": 94.15262189,
            "fees": 1e-8
        },
        {
            "txid": "2f4bc8e9340a3ad521d385e5a90eda35d0dc0336bbfd47848a97db8376fcb95d",
            "version": 1,
            "locktime": 0,
            "vin": [
                {
                    "txid": "28d735258535ae98b1182ac47d66548516041686f28d51c5fcc3c7dec7f945b7",
                    "sequence": 4294967295,
                    "n": 0,
                    "scriptSig": {
                        "hex": "47304402202c14f6406a160fe45fef838ffbb407b90a8b5b676c9b72893e10f49cb701eabf02202fceeaad06a9089e507956efae744188240b42878b9a7dbe09b12ca0c951008d012103816243513928a38ed60f6cae2386045cec6cb48404d3f1a089417bb9bc5beb33",
                        "asm": "304402202c14f6406a160fe45fef838ffbb407b90a8b5b676c9b72893e10f49cb701eabf02202fceeaad06a9089e507956efae744188240b42878b9a7dbe09b12ca0c951008d01 03816243513928a38ed60f6cae2386045cec6cb48404d3f1a089417bb9bc5beb33"
                    },
                    "addr": "DsjF1XGW5NroXygTdJoqsVHnvDohbhWn4Js",
                    "valueSat": 1180957,
                    "value": 0.01180957
                },
.
.
.
            ],
            "vout": [
                {
                    "value": 92.93242849,
                    "n": 0,
                    "scriptPubKey": {
                        "hex": "baa9141d1bbbb5f78d6e0d5710f5029737172c9c16a67f87",
                        "asm": "OP_SSTX OP_HASH160 1d1bbbb5f78d6e0d5710f5029737172c9c16a67f OP_EQUAL",
                        "addresses": [
                            "Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL"
                        ],
                        "type": "stakesubmission"
                    },
                    "spentTxId": "d9e66aa163c58de70bf9d28caad5ce4ee3b0be9eb48696e73cba1c4944028bc0",
                    "spentIndex": 1,
                    "spentHeight": 269843
                },
.
.
.
            ],
            "blockhash": "000000000000000015c9d2a289488033d34f0e5913bdc7ba4c3f578382c92fe2",
            "blockheight": 269406,
            "confirmations": 10326,
            "time": 1535435116,
            "blocktime": 1535435116,
            "valueOut": 92.93242849,
            "size": 538,
            "valueIn": 92.93297849,
            "fees": 0.00055
        }
    ]
}

/addrs/txs/ (POST)

URL: POST /addrs/txs

Description: Retrieves transactions for multiple addresses.

Parameters:

Parameter Type Description
address string Address
from int64 (optional) Starting transaction index
to int64 (optional) Ending transaction index
noScriptSig boolean (optional) If noScriptSig = '1', omits ScriptSig from all inputs
noSpent boolean (optional) If noSpent = '1', omits spend information per output
noAsm boolean (optional) If noAsm = '1', omits script asm from results

Request Example:

curl -X POST \
https://alpha.dcrdata.org/insight/api/addrs/txs\
 -H 'Cache-Control: no-cache' \
 -H 'Content-Type: application/json' \
 -H 'Postman-Token: bf2e16a1-b6d2-4b2f-b6e5-9ea7bd3df5b1' \
 -d '{"addrs":"Dsbb8DHHwWMkxSSgfAj9czC44VVKXZPWAmg,Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL","from":"1","to":"2","noSpent":"1","noScriptSig":"1"}'

Request Response:

{
   "totalItems": 385,
   "from": 1,
   "to": 2,
   "items": [
      {
         "txid": "d46b175895843d87514659d0c30889739b84932dd4e826d71da035a62f4d0c88",
         "version": 1,
         "locktime": 0,
         "vin": [
            {
               "sequence": 4294967295,
               "n": 0,
               "valueSat": 120811227,
               "value": 1.2081122
            },
            {
               "txid": "4d408589647b60136ab48cc73f168617361b19bc716d90a9e71ebb7ba66c8f35",
               "sequence": 4294967295,
               "n": 1,
               "addr": "Dca7Vsv42RAJC6cEdw7dyhLER8QJCHiUYNL",
               "valueSat": 9467739409,
               "value": 94.67739
            }
         ],
         "vout": [
            {
               "value": 0,
               "n": 0,
               "scriptPubKey": {
                  "hex": "6a24c0f1e0de5187474c87e8ee9b323bda84562d675ea0126c1e0000000000000000b3270400",
                  "asm": "OP_RETURN c0f1e0de5187474c87e8ee9b323bda84562d675ea0126c1e0000000000000000b3270400",
                  "type": "nulldata"
               },
               "spentTxId": null,
               "spentIndex": null,
               "spentHeight": null
            },
            {
               "value": 0,
               "n": 1,
               "scriptPubKey": {
                  "hex": "6a06010005000000",
                  "asm": "OP_RETURN 010005000000",
                  "type": "nulldata"
               },
               "spentTxId": null,
               "spentIndex": null,
               "spentHeight": null
            },
            {
               "value": 0.01196299,
               "n": 2,
               "scriptPubKey": {
                  "hex": "bb76a914fdf7e454442af6795aad73bc3dd844b27b289c5e88ac",
                  "asm": "OP_SSGEN OP_DUP OP_HASH160 fdf7e454442af6795aad73bc3dd844b27b289c5e OP_EQUALVERIFY OP_CHECKSIG",
                  "addresses": [
                     "Dsp7mQo6LRUasH8p6socnmq1iqDU2W4HXCp"
                  ],
                  "type": "stakegen"
               },
               "spentTxId": null,
               "spentIndex": null,
               "spentHeight": null
            },
            {
               "value": 95.87354,
               "n": 3,
               "scriptPubKey": {
                  "hex": "bb76a914b7a0fadc16c16c1d6607b3e8ebc3ff4fc214a87488ac",
                  "asm": "OP_SSGEN OP_DUP OP_HASH160 b7a0fadc16c16c1d6607b3e8ebc3ff4fc214a874 OP_EQUALVERIFY OP_CHECKSIG",
                  "addresses": [
                     "DshhqzchyKUzPuZ8QQWwuepCg7qzBd8yUrt"
                  ],
                  "type": "stakegen"
               },
               "spentTxId": null,
               "spentIndex": null,
               "spentHeight": null
            }
         ],
         "blockhash": "0000000000000000bffc01c7350dd0a58619e340ab4d75d8d3ff42e201d67503",
         "blockheight": 272308,
         "confirmations": 7501,
         "time": 1536307801,
         "blocktime": 1536307801,
         "valueOut": 95.885506,
         "size": 420,
         "valueIn": 95.885506,
         "fees": 1.0E-8
      }
   ]
}

Status and Utility

Methods that provide utilities or relay network status.

/sync/

URL: GET /sync

Description: Retrieves status of dcrdata's synchronization with the connected node (dcrd).

Request Example:

GET /sync

Request Response:

{
    "status": "finished",
    "blockChainHeight": 279815,
    "syncPercentage": 100,
    "height": 279815,
    "error": null,
    "type": "from RPC calls"
}

/peer/

URL: GET /peer

Description: Retrieves Peer-to-Peer (P2P) data sync status.

Request Example:

GET /peer/

Request Response:

{
    "connected": true,
    "host": "127.0.0.1",
    "port": null
}

/status/

URL: GET /status

Description: Retrieves status of Decred network. If q is set to a parameter from the table below, only that parameter is returned. If q is not specified, all status parameters are returned.

Parameter Type Description
q string (optional) getInfo
(optional) getDifficulty
(optional) getBestBlockHash
(optional) getLastBlockHash

Request Example:

GET /status?q=getDifficulty 

Request Response:

{
    "difficulty": 6484304315.871729
}

/estimatefee/

URL: GET /estimatefee

Description: Retrieves an estimate of the fee required for a transaction to be included within a certain number of blocks (nbBlocks). If nbBlocks is not specified, it defaults to 2.

Parameters:

Parameter Type Description
nbBlocks int64 (optional) Number of blocks within which the transaction should be mined

Request Example:

GET /utils/estimatefee?nbBlocks=3

Request Response:

{
    "3": 0.0001
}