Bitcoin
/getbalance
Get the balance or number of the given token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
rpc
String
Remote procedural call URL
chainId*
String
chainSymbol
String
address*
String
The public address to get the balance of.
afterBlock
String
The block number after which user wants the balance
beforeBlock
String
The block number before which user wants the balance
https://api.expand.network/chain/getbalance?chainId=1800&address=1G82AFv7unVrZPSzfMNyFFAneJ2dnDFEar
{
"status": 200,
"msg": "success",
"data": {
"balance": "440511",
"totalReceived": "1598691",
"totalSent": "1158180",
"utxos": [
{
"block": "866584",
"txHash": "438d019ef4246a319a7b6ed65e537ffc9a06363ef6b46607cbcde08bca5f451c",
"value": "334215",
"refBalance": "440511",
"txInputN": "94",
"txOutputN": "-1",
"confirmations": "76"
},
{
"block": "865346",
"txHash": "ed2c07eea5eab7a04700c2c61dd536059f56473d663c6f629ddf3b4c254eda15",
"value": "823965",
"refBalance": "774726",
"txInputN": "116",
"txOutputN": "-1",
"confirmations": "1314"
},
{
"block": "864456",
"txHash": "023948b3b03b53b05bde2505365c489e9a12d52b093b6ef986722c88b9e5a789",
"value": "46197",
"refBalance": "1598691",
"txInputN": "-1",
"txOutputN": "0",
"spent": false,
"confirmations": "2204"
},
{
"block": "864136",
"txHash": "a6cd2a15584972edc7780d56d7562c9f78b9b7061e923e8c08608f2c988ef644",
"value": "52623",
"refBalance": "1552494",
"txInputN": "-1",
"txOutputN": "0",
"spent": false,
"confirmations": "2524"
},
{
"block": "863678",
"txHash": "3ee1d7e63b312f4b9e8f421c6ba4d29e6bc612037e1eb30bc286b1b60fc5cfa2",
"value": "334215",
"refBalance": "1499871",
"txInputN": "-1",
"txOutputN": "8",
"spent": true,
"confirmations": "2982"
},
{
"block": "863563",
"txHash": "7bfec5057af8946d99e5d5b82d757a02d9a7cf0f1acb783f2af2a6ab76bb229a",
"value": "132225",
"refBalance": "1165656",
"txInputN": "-1",
"txOutputN": "3",
"spent": false,
"confirmations": "3097"
},
{
"block": "863539",
"txHash": "0d6ca91cd1ce4d8847f217b814e9fd05819d0cabf12eb78ea0b2ec2d9d64f8c4",
"value": "823965",
"refBalance": "1033431",
"txInputN": "-1",
"txOutputN": "9",
"spent": true,
"confirmations": "3121"
},
{
"block": "859723",
"txHash": "bf8a3cee4f8bfeceecd1fca8a1507dc1af46da10104a8e9921213e399f8daf5e",
"value": "41780",
"refBalance": "209466",
"txInputN": "-1",
"txOutputN": "0",
"spent": false,
"confirmations": "6937"
},
{
"block": "859277",
"txHash": "1c8f47243dc2cdd0d5ad59c4d26f88471b45cf32b26dd1b89d0cf18af16671be",
"value": "167686",
"refBalance": "167686",
"txInputN": "-1",
"txOutputN": "0",
"spent": false,
"confirmations": "7383"
}
]
}
}
/getblock
Get details of a block.
GET
https://historicallp.api.expand.network/chain/getblock
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
blockNumber*
String
The block(sequence) number.
https://historicallp.api.expand.network/chain/getblock?blockNumber=161000&chainId=1800
{
"status": 200,
"msg": "success",
"data": {
"difficulty": "1159929.497224385",
"confirmations": "705665",
"gasLimit": null,
"gasUsed": null,
"hash": "000000000000041db1574dba07ab482e4e0da4a47f85d2149205562c55115e23",
"miner": null,
"nonce": "601565135",
"number": "161000",
"parentHash": "0000000000000c3bb6796e415d869703c59e631987046725520f77cba09d5b1d",
"nextBlockHash": "00000000000002c21cf65f743501bb7302c9ec17e88c942c846508f390369eed",
"size": "5418",
"timestamp": "1325908473",
"totalDifficulty": null,
"transactions": [
"6de58a9694b4c6db1f7fe89c62ac775e6d156737d563a2e1adef17496e7d7dec",
"0991cbf002f26a9a4ea8177ec4a472c034f9f053e93a4a170ffff6b56072a8de",
"c97a8440d18feebd59fe796c16c7f5e7ed2b42d7fc575d1aab92619717f73963",
"a046590f815fca45e6879201a3243709b08c508ef706528f7216e970fbdbdd57",
"c64de778bbd627a0a801670308e30d6ab1fd78f1a46a494a309fe94fe58e56ee",
"d97d23cefcf210ec93d68ee8dd78cb638bb6003808bbc93231b4a8e645a6e5e9",
"f45cff5a8beac8ac2bc6bd7535f8f1a6bc782540a51932b7dab768468f4c77f9",
"ecc293e74dc466aa145195e738e278878ac39f6371c77c5933f06c6ed28eda7d",
"ae201d2e2a99a415b4a66edaa133c8e9cd0a792db92a9d8a32eb8339bd754800",
"291b08d7d4ad7cfa643d2e6a7ed63be9fb4284208befa7307acf72f86f372a61",
"152b6a5ebc2012e3216728d04513e6832fd8678256460a932f3fcfa13b1b6555",
"2b7642a39b5e8e47d935f1df8a0485d47d26668e3138e384cd15d9f31314c14b",
"a16998657b3ad7d17ea1ac5843f5d4112de901fd87d6e6e8f38fbb9a254689ab",
"fcfb29632c1cd22a7f38a652d1d1b98c7583ad6ccdc8a6791804bd51eee59ba6",
"6d5c3c65eafc4d002d84d0d272c394baffd022abee89c0a795fffa632fe95715"
],
"merkleRoot": "ab813cc7c4e4623283edbc85bf123dea3f907be28ff73e26fab7e22218d8a79d",
"strippedSize": "5418",
"weight": "21672",
"bits": "1a0e76ba",
"uncles": null
}
}
/getgasprice
Get the current gas price from the network.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
https://api.expand.network/chain/getgasprice?chainId=1800
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": "8.318999999999999"
}
}
/gettransaction
Get details of a transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
transactionHash*
String
The transaction hash.
https://api.expand.network/chain/gettransaction?transactionHash=8e57ec8f0bfd6cd7e952388d5e98ca89a01113be0cbcead14ad12f9ee7ea2a1c&chainId=1800
{
"status": 200,
"msg": "success",
"data": {
"hash": "8e57ec8f0bfd6cd7e952388d5e98ca89a01113be0cbcead14ad12f9ee7ea2a1c",
"transactionStatus": true,
"blockHash": "0000000000000000000005c8c7e75ddcb03586fef681664b337325d1e7eeeda5",
"timestamp": "1726640543",
"from": null,
"to": null,
"value": null,
"gas": null,
"gasPrice": null,
"input": "010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff58036e260d1b4d696e656420627920416e74506f6f6c383733960001027b9f8c49fabe6d6d6737b8453043f7b323c6c282525b243b0a37f03cd23621a7ff85e8f2462a788d1000000000000000104200000603010000000000ffffffff05220200000000000017a91442402a28dd61f2718a4b27ae72a4791d5bbdade7879801df120000000017a9145249bdf2c131d43995cff42e8feee293f79297a8870000000000000000266a24aa21a9ede00d59f3ccf95a2f6ad5b74a02d059e77df68b8a6976eb8090f064cff1073dfd00000000000000002f6a2d434f524501a21cbd3caa4fe89bccd1d716c92ce4533e4d47334e3ecda72cb7961caa4b541b1e322bcfe0b5a03000000000000000002b6a2952534b424c4f434b3ad15fe028119aeaa2e36aa4759e93b2f1d675f1450506ae623c8ebc2800665d290120000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": null,
"network": null,
"size": "394",
"weight": "1468",
"vsize": "367",
"confirmations": "4861",
"vin": [
{
"coinbase": "036e260d1b4d696e656420627920416e74506f6f6c383733960001027b9f8c49fabe6d6d6737b8453043f7b323c6c282525b243b0a37f03cd23621a7ff85e8f2462a788d1000000000000000104200000603010000000000",
"txinwitness": [
"0000000000000000000000000000000000000000000000000000000000000000"
],
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.00000546,
"n": 0,
"scriptPubKey": {
"asm": "OP_HASH160 42402a28dd61f2718a4b27ae72a4791d5bbdade7 OP_EQUAL",
"desc": "addr(37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z)#avhxp88d",
"hex": "a91442402a28dd61f2718a4b27ae72a4791d5bbdade787",
"address": "37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z",
"type": "scripthash"
}
},
{
"value": 3.16604824,
"n": 1,
"scriptPubKey": {
"asm": "OP_HASH160 5249bdf2c131d43995cff42e8feee293f79297a8 OP_EQUAL",
"desc": "addr(39C7fxSzEACPjM78Z7xdPxhf7mKxJwvfMJ)#vjljy0jc",
"hex": "a9145249bdf2c131d43995cff42e8feee293f79297a887",
"address": "39C7fxSzEACPjM78Z7xdPxhf7mKxJwvfMJ",
"type": "scripthash"
}
},
{
"value": 0,
"n": 2,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ede00d59f3ccf95a2f6ad5b74a02d059e77df68b8a6976eb8090f064cff1073dfd",
"desc": "raw(6a24aa21a9ede00d59f3ccf95a2f6ad5b74a02d059e77df68b8a6976eb8090f064cff1073dfd)#mzw80vgz",
"hex": "6a24aa21a9ede00d59f3ccf95a2f6ad5b74a02d059e77df68b8a6976eb8090f064cff1073dfd",
"type": "nulldata"
}
},
{
"value": 0,
"n": 3,
"scriptPubKey": {
"asm": "OP_RETURN 434f524501a21cbd3caa4fe89bccd1d716c92ce4533e4d47334e3ecda72cb7961caa4b541b1e322bcfe0b5a030",
"desc": "raw(6a2d434f524501a21cbd3caa4fe89bccd1d716c92ce4533e4d47334e3ecda72cb7961caa4b541b1e322bcfe0b5a030)#wk5e7nlh",
"hex": "6a2d434f524501a21cbd3caa4fe89bccd1d716c92ce4533e4d47334e3ecda72cb7961caa4b541b1e322bcfe0b5a030",
"type": "nulldata"
}
},
{
"value": 0,
"n": 4,
"scriptPubKey": {
"asm": "OP_RETURN 52534b424c4f434b3ad15fe028119aeaa2e36aa4759e93b2f1d675f1450506ae623c8ebc2800665d29",
"desc": "raw(6a2952534b424c4f434b3ad15fe028119aeaa2e36aa4759e93b2f1d675f1450506ae623c8ebc2800665d29)#amrd3zar",
"hex": "6a2952534b424c4f434b3ad15fe028119aeaa2e36aa4759e93b2f1d675f1450506ae623c8ebc2800665d29",
"type": "nulldata"
}
}
]
}
}
/getusertransactions
Get the historical transaction details for a specific user address.
GET
https://historicallp.api.expand.network/chain/getusertransactions
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
address*
String
The public address of the user.
beforeBlock
String
The block number before which user wants the transaction
afterBlock
String
The block number after which user wants the transaction
https://historicallp.api.expand.network/chain/getusertransactions?address=37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z&chainId=1800&beforeBlock=851602&afterBlock=851600
{
"status": 200,
"msg": "success",
"data": [
{
"block_hash": "000000000000000000033182f3c881df668716dddbb80c1809a40028cc5ec170",
"block_height": "851601",
"block_index": "3065",
"hash": "3ca298b08764de24a4709a67c0bc1339ff368f25b1937cff253b97515dbdf1c4",
"addresses": [
"37C5BuwUSWxKaruWjJFWa3F8cyENnax5x9",
"37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z",
"3A5XsaqpFp6ss1KPhiB9g4JgQKL6sLHrNz"
],
"total": "11657",
"fees": "1998",
"size": "248",
"vsize": "166",
"preference": "low",
"relayed_by": "185.207.250.113:8333",
"confirmed": "2024-07-10T21:35:36Z",
"received": "2024-07-10T21:26:15.8Z",
"ver": "2",
"double_spend": true,
"double_spend_tx": "118c11f936956835d569c06db5fdf2ab01b8bf2e928b1132479f1abad823a862",
"vin_sz": "1",
"vout_sz": "2",
"opt_in_rbf": true,
"confirmations": "15428",
"confidence": "1",
"inputs": [
{
"prev_hash": "c565fbecad40d8b503eb16c81d9ba6393d0cbd3fcf035c994ffbc7b825b41034",
"output_index": 1,
"script": "16001452be712f73b6090291d1b0e3d7286cbf5cd6e98d",
"output_value": 13655,
"sequence": 4294967293,
"addresses": [
"37C5BuwUSWxKaruWjJFWa3F8cyENnax5x9"
],
"script_type": "pay-to-script-hash",
"age": 851285
}
],
"outputs": [
{
"value": 5230,
"script": "a91442402a28dd61f2718a4b27ae72a4791d5bbdade787",
"addresses": [
"37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z"
],
"script_type": "pay-to-script-hash"
},
{
"value": 6427,
"script": "a9145c032856d1d39a0c7c1d8edb9da07157d55dc0fd87",
"addresses": [
"3A5XsaqpFp6ss1KPhiB9g4JgQKL6sLHrNz"
],
"script_type": "pay-to-script-hash"
}
]
},
{
"block_hash": "000000000000000000033182f3c881df668716dddbb80c1809a40028cc5ec170",
"block_height": "851601",
"block_index": "0",
"hash": "f4c70e9e3913b5e91b3e99e73abeace05fadc1b732325cba8bdfc44d895d1519",
"addresses": [
"37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z",
"39C7fxSzEACPjM78Z7xdPxhf7mKxJwvfMJ"
],
"total": "333502543",
"fees": "0",
"size": "394",
"vsize": "367",
"preference": "low",
"confirmed": "2024-07-10T21:35:56.382Z",
"received": "2024-07-10T21:35:56.382Z",
"ver": "1",
"double_spend": false,
"vin_sz": "1",
"vout_sz": "5",
"data_protocol": "unknown",
"confirmations": "15428",
"confidence": "1",
"inputs": [
{
"output_index": -1,
"script": "0391fe0c1b4d696e656420627920416e74506f6f6c39373048000900f1531e29fabe6d6dbf41fbf281994f2053388f4e6632661be25c35c139d1be8c690898054986e197100000000000000055d400001f89030000000000",
"sequence": 4294967295,
"script_type": "empty",
"age": 851601
}
],
"outputs": [
{
"value": 546,
"script": "a91442402a28dd61f2718a4b27ae72a4791d5bbdade787",
"addresses": [
"37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z"
],
"script_type": "pay-to-script-hash"
},
{
"value": 333501997,
"script": "a9145249bdf2c131d43995cff42e8feee293f79297a887",
"spent_by": "9911a1a7954ba88db19c58713c7dfc7c98f1ad76c12929aad47c6b0aaa5d9175",
"addresses": [
"39C7fxSzEACPjM78Z7xdPxhf7mKxJwvfMJ"
],
"script_type": "pay-to-script-hash"
},
{
"value": 0,
"script": "6a24aa21a9ed8610cc611bd9e597857dd2dd7cad5fb423f2bf478c79c1a3df4928902ebcc9e8",
"addresses": null,
"script_type": "null-data",
"data_hex": "aa21a9ed8610cc611bd9e597857dd2dd7cad5fb423f2bf478c79c1a3df4928902ebcc9e8"
},
{
"value": 0,
"script": "6a2d434f52450142fdeae88682a965939fee9b7b2bd5b99694ff644e3ecda72cb7961caa4b541b1e322bcfe0b5a030",
"addresses": null,
"script_type": "null-data",
"data_hex": "434f52450142fdeae88682a965939fee9b7b2bd5b99694ff644e3ecda72cb7961caa4b541b1e322bcfe0b5a030"
},
{
"value": 0,
"script": "6a2952534b424c4f434b3afb4d16eac4f887858731687afc60395728ae83ad7b032f6ec4c88e200063555f",
"addresses": null,
"script_type": "null-data",
"data_hex": "52534b424c4f434b3afb4d16eac4f887858731687afc60395728ae83ad7b032f6ec4c88e200063555f"
}
]
}
]
}
/sendtransaction
Send transaction on the chain.
POST
https://api.expand.network/chain/sendtransaction
Request Body
chainId*
Integer
chainSymbol
String
rawTransaction*
String
The encoded transaction, obtained from signed transaction.
rpc
String
Remote procedural call URL.
{
"chainId": "1801",
"rawTransaction": "0200000001b2cd2ca1b85f93efe4a1d5fff142c764b9dde952090a1df01ed91e1ecab556d5000000006a4730440220425f6ca7ea82b7908624325cbc04c275967554e1b61f0becc880ff1306189c8d02207e158fccf87d53f97202d6fbaef15b9657a64cfb3c3d4fecb7ec2d471275a7f10121020822423e4027dce4b95564c0ad290113a5889ef9549d1f9b7135d58c4ef0cf43ffffffff01401f0000000000001976a9146451080a31a19e43943256d3fa70259e4af6ef2f88ac00000000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1801",
"transactionHash": "8aa0e8cfbc5b4e4facd418038dabe08ba87927c1619e94c47ad7147427d87c52"
}
}
/decodetransaction
Get the decoded transaction for the provided raw transaction.
POST
https://api.expand.network/chain/decodetransaction
Request Body
chainId*
Integer
chainSymbol
String
rawTransaction*
String
The encoded transaction, obtained from signed transaction.
rpc
String
Remote procedural call URL.
{
"chainId": "1801",
"rawTransaction": "0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000"
}
{
"status": 200,
"msg": "success",
"data": {
"txid": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
"hash": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
"version": 1,
"size": 225,
"vsize": 225,
"weight": 900,
"locktime": 0,
"vin": [
{
"txid": "e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea",
"vout": 1,
"scriptSig": {
"asm": "30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab",
"hex": "4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.4,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(n4iauL838sLmADwTwfRkeejc4jCs8UJsTE)#mvv4ular",
"hex": "76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac",
"address": "n4iauL838sLmADwTwfRkeejc4jCs8UJsTE",
"type": "pubkeyhash"
}
},
{
"value": 48.9998184,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(mwXJFzrRk86NoH7uKytkSq2rbCkV9tgAgp)#udqp0ch4",
"hex": "76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac",
"address": "mwXJFzrRk86NoH7uKytkSq2rbCkV9tgAgp",
"type": "pubkeyhash"
}
}
]
}
}
Last updated