Base
/getbalance
Get the balance or number of the given token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL |
chainId* | String | |
chainSymbol | String | |
blockNumber | String | Block number for which the balance needs to be retrieved. By default, it will pick the latest block number when not specified. |
address* | String | The public address to get the balance of. |
tokenAddress | String | The address of token to get the balance of. |
https://api.expand.network/chain/getbalance?chainId=8453&blockNumber=15351657&address=0x20FE51A9229EEf2cF8Ad9E89d91CAb9312cF3b7A&tokenAddress=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
{
"status": 200,
"msg": "success",
"data": {
"balance": "813181696033"
}
}
/getblock
Get details of a block.
GET
https://historicallp.api.expand.network/chain/getblock
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | |
chainSymbol | String | |
startBlock | String | Starting block of the range. Note: Maximum supported range is 10, meaning the startBlock is determined by endBlock - 9. |
endBlock | String | Last block of the range. Note: Maximum supported range is 10, meaning the endBlock is determined by startBlock + 9. |
https://historicallp.api.expand.network/chain/getblock?chainId=8453
{
"status": 200,
"msg": "success",
"data": {
"baseFeePerGas": 52,
"difficulty": "0",
"extraData": "0x",
"gasLimit": 30000000,
"gasUsed": 918397,
"hash": "0x97250c54e310eb29a30b7ab4184b1cce9e466e7063b5590d52b73709e0bb230e",
"logsBloom": "0x00320000000000380000010082000002000002400000000000848000280000100100000000000000040400100400000000000000000420000200000000102000000041108400004800000008000020200000400800000014000000000000000000000200c00002000140000010040000000000000204040000000012000a0000080001000004000100000000000000000400800000200208000800400000000000108010000000010000081080000000000000000000000000000010800000008000000200000000000000004000100000000000042020100001000000000000000008000085408000000010000000800000a000010000001000010400000004",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x9e3ca5a8047da9c040f7b92fd39e6bfd76a6fc08c9f9afd15b3453c206c6ab22",
"nonce": "0x0000000000000000",
"number": 6283173,
"parentHash": "0xed86a845409a882270d4512487b7dafdfe91157da6d1e6c50d738de5a4a3ae92",
"receiptsRoot": "0x4e6cf0bb0f40be05a6e77c767a7a97186d13f2e5ab2735a958963c231545b043",
"size": 4031,
"timestamp": 1699355693,
"totalDifficulty": "0",
"transactions": [
{
"chainId": "8453",
"hash": "0xefd80cb6f1e2b08a00ae403b9c07db6722c9dd7e98498c7e8e658a20c28f9b44",
"transactionStatus": true,
"blockNumber": "6283173",
"timestamp": null,
"from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
"to": "0x4200000000000000000000000000000000000015",
"value": "0",
"transactionFees": "0",
"gas": "1000000",
"gasPrice": "0",
"input": "0x015d8eb900000000000000000000000000000000000000000000000000000000011a968e00000000000000000000000000000000000000000000000000000000654a1b67000000000000000000000000000000000000000000000000000000054e8dc227ca326b2e75777ac174fe3b26a4253a7251a3941f6baf85dc5876503434ef969000000000000000000000000000000000000000000000000000000000000000050000000000000000000000005050f69a9786f081509234f1a7f4684b5e5b76c900000000000000000000000000000000000000000000000000000000000000bc00000000000000000000000000000000000000000000000000000000000a6fe0",
"nonce": 6283172,
"type": 126,
"network": null,
"v": "0x0",
"r": "0x0",
"s": "0x0",
"yParity": null,
"transactionIndex": null,
"accessList": null,
"maxFeePerGas": null,
"maxPriorityFeePerGas": null,
"logs": []
}
],
"transactionsRoot": "0xb5bde09f63711b915471936e273ed18b8dc7d6038ce053fe629ae82a66133bff",
"uncles": []
}
}
/getgasprice
Get the current gas price from the network.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | |
chainSymbol | String |
https://api.expand.network/chain/getgasprice?chainId=8453
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": "100000061"
}
}
/getstorage
Get data stored in the given slot.
GET
https://api.expand.network/chain/getstorage
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | |
chainSymbol | String | |
address* | String | Contract address whose storage is needed. |
index | String | Slot index on the smart contract. By default, it is taken as 0. |
https://api.expand.network/chain/getstorage?chainId=8453&address=0xCA6f5B49967B492FEE81cA9C92a63a98903DD965
{
"status": 200,
"msg": "success",
"data": {
"data": "0x0000000000000000000000007dbc67df4d4ea21420b1baa077028d2c1cca7399"
}
}
/gettransaction
Get details of a transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | |
chainSymbol | String | |
transactionHash* | String | The transaction hash. |
https://api.expand.network/chain/gettransaction?chainId=8453&transactionHash=0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4
{
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"hash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionStatus": true,
"blockNumber": "6283395",
"timestamp": null,
"from": "0x2c40a57BC2E05eBcd00C2c007097f838c7b3a115",
"to": "0x10d16248bED1E0D0c7cF94fFD99A50c336c7Bcdc",
"value": "264853642455711",
"transactionFees": "27221958120",
"gas": "545832",
"gasPrice": "58632",
"input": "0x2d62fc1a000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000034ac8b7d0000000000000000000000000000000000000000000000000000000034691f45000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e00002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000068c7abb8b1c3d1ce467e28265770f3a7ecf3265400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000142c40a57bc2e05ebcd00c2c007097f838c7b3a11500000000000000000000000000000000000000000000000000000000000000000000000000000000000000142c40a57bc2e05ebcd00c2c007097f838c7b3a115000000000000000000000000",
"nonce": 7,
"type": 2,
"network": null,
"v": "0x1",
"r": "0xf5468f7b1dd4952216fbceb319e0881b38f9c5bf4ecac0471e21ba83d2e99477",
"s": "0x3c993a5ff3b1bbb8315abd4550389c98e55048267c046456a5eea5c9df4cbf03",
"yParity": "0x1",
"transactionIndex": 4,
"accessList": [],
"maxFeePerGas": "58648",
"maxPriorityFeePerGas": "58570",
"logs": [
{
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x0000000000000000000000002c40a57bc2e05ebcd00c2c007097f838c7b3a115",
"0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 8,
"removed": false,
"id": "log_3d65fdd5"
},
{
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000002c40a57bc2e05ebcd00c2c007097f838c7b3a115",
"0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc"
],
"data": "0x0000000000000000000000000000000000000000000000000000000034ac8b7d",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 9,
"removed": false,
"id": "log_ecc2fe08"
},
{
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc",
"0x00000000000000000000000068c7abb8b1c3d1ce467e28265770f3a7ecf32654"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 10,
"removed": false,
"id": "log_35fe1ff4"
},
{
"address": "0x4c80E24119CFB836cdF0a6b53dc23F04F7e652CA",
"topics": [
"0x34660fc8af304464529f48a778e03d03e4d34bcd5f9b6f0cfbf3cd238c642f7f"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc0000000000000000000000000000000000000000000000000000000034a474440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000678f000000000000000000000000000000000000000000000000000000000007afaa0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 11,
"removed": false,
"id": "log_04e0e7eb"
},
{
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc",
"0x0000000000000000000000004c80e24119cfb836cdf0a6b53dc23f04f7e652ca"
],
"data": "0x0000000000000000000000000000000000000000000000000000000034ac8b7d",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 12,
"removed": false,
"id": "log_83b6c61f"
},
{
"address": "0x4c80E24119CFB836cdF0a6b53dc23F04F7e652CA",
"topics": [
"0x6939f93e3f21cf1362eb17155b740277de5687dae9a83a85909fd71da95944e7"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000005d8f00000000000000000000000000000000000000000000000000000076387ba3c5",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 13,
"removed": false,
"id": "log_283af9eb"
},
{
"address": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa",
"topics": [
"0xdf21c415b78ed2552cc9971249e32a053abce6087a0ae0fbf3f78db5174a3493"
],
"data": "0x0000000000000000000000000000000000000000000000000000cb4c0d4e15a6",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 14,
"removed": false,
"id": "log_8ac52c14"
},
{
"address": "0x38dE71124f7a447a01D67945a51eDcE9FF491251",
"topics": [
"0xb0c632f55f1e1b3b2c3d82f41ee4716bb4c00f0f5d84cdafc141581bb8757a4f"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000002ab98000000000000000000000000000000000000000000000000000000000000",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 15,
"removed": false,
"id": "log_2633890d"
},
{
"address": "0xD56e4eAb23cb81f43168F9F45211Eb027b9aC7cc",
"topics": [
"0x87e46b0a6199bc734632187269a103c05714ee0adae5b28f30723955724f37ef"
],
"data": "0x00000000000000000000000000000000000000000000000000000faffcf2285f",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 16,
"removed": false,
"id": "log_d4bdabd1"
},
{
"address": "0x38dE71124f7a447a01D67945a51eDcE9FF491251",
"topics": [
"0xe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002540000000000007b6100b8af54be5b6eec24d6bfacf1cce4eaf680a8239398006a9d1b1669c73b033dfe47ae5a0164ab96df25b94400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005d8f00000000000000000000000000000000000000000000000000000076387ba3c50000000000000000000000000000000000000000000000000000000034a47444000000000000000000000000000000000000000000000000000000000000678f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007afaa0000000000000000000000000000000000000000000000000000000034ac8b7d00000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000142c40a57bc2e05ebcd00c2c007097f838c7b3a1150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 17,
"removed": false,
"id": "log_b81b4bc3"
},
{
"address": "0xAF54BE5B6eEc24d6BFACf1cce4eaF680A8239398",
"topics": [
"0x8d3ee0df6a4b7e82a7f20a763f1c6826e6176323e655af64f32318827d2112d4"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000007b61",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 18,
"removed": false,
"id": "log_683a516c"
},
{
"address": "0x10d16248bED1E0D0c7cF94fFD99A50c336c7Bcdc",
"topics": [
"0xe005092a469280dafcad91e38921cc6f96eac91d73413489fd8719634163345e",
"0x0002000000000000000000000000000000000000000000000000000000000000"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": 6283395,
"transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
"transactionIndex": 4,
"blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
"logIndex": 19,
"removed": false,
"id": "log_eeaf2cff"
}
]
}
}
/portfolio
Get detailed information about the verified assets or tokens currently associated with a user's wallet address.
GET
https://api.expand.network/chain/portfolio
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId | String | |
chainSymbol | String | |
address* | String | Public addess of the user. |
tokens | String | Comma-separated value of ERC-20 tokens to get value of. Maximum 10 at a time. |
availableOnly | Boolean | By default, false. If true, tokens with balance > 0 will be listed. |
pageToken | String | Present at the end of a lengthy response to fetch the next page. |
assetType | String |
|
https://api.expand.network/chain/portfolio?chainId=8453&address=0xA5af143fd6f6093FDcF6D51d3641F08eaa07d53f&availableOnly=true
{
"status": 200,
"msg": "success",
"data": {
"native": "3975672043073686",
"evmTokens": [
{
"name": "The Doge NFT",
"symbol": "DOG",
"decimals": "18",
"address": "0xafb89a09d82fbde58f18ac6437b3fc81724e4df6",
"balance": "10000000000000000000",
"assetType": "ERC20",
"USDPrice": "0.013040102445834898"
}
]
}
}
/sendtransaction
Send transaction on the chain.
POST
https://api.expand.network/chain/sendtransaction
Request Body
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | |
chainSymbol | String | |
rawTransaction* | String | The encoded transaction, obtained from the signed transaction. |
{
"chainId": "8453",
"rawTransaction": "0xf86a80830f4272830a3d8794a67e9b68c41b0f26184d64c26e0b2b81466e5994843b9aca00808302948ca0e073bcaa02ab49f019278be707e3e50433ac7ae6107649a8b1cbdbc368e9482ea05ba36d559c5b70ffa289f90a572adc0863c46fdd067c40c2f37b9ea666fcc8e7"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"transactionHash": "0x2e5309f53a8c11841afc88c12c099e5c5c59271379fa3cc65df863fa18a64a60"
}
}
Last updated