/getbalance
Get the balance or number of the given token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
Remote procedural call URL
The public address to get the balance of.
The address of token to get the balance of.
https://api.expand.network/chain/getbalance/?address=0x6af9fed62bb9011a12cb8aa69e771c1bd0ad988e&chainId=10
{
"status": 200,
"msg": "success",
"data": {
"balance": "2329827393417488"
}
}
/getblock
Get details of a block.
GET
https://api.expand.network/chain/getblock
Query Parameters
Remote procedural call URL.
The block number or block hash.
https://api.expand.network/chain/getblock?blockNumber=2525553&chainId=10
{
"status": 200,
"msg": "success",
"data": {
"difficulty": "2",
"gasLimit": 15000000,
"gasUsed": 29748,
"hash": "0xbd58af4a6397689d75fbd7e8a8fc39020eaf576d21abd6250a1b8d0230d2a6d5",
"miner": "0x0000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": 2525553,
"parentHash": "0xea3897af1d45e7fd769759a900e69c55e75b2e0a9247c2fdc6efe1a7a8804e3b",
"size": 748,
"timestamp": 1642782884,
"totalDifficulty": "5051107",
"transactions": [
"0xfe5498249018ea069693b2fccd7a61c520e7c891a311567e5cd67ec1f16e7034"
],
"transactionsRoot": "0xcb34fb1ba590177e399e1c51462ad17112d03d471158acefbdb789ee197f19ce",
"uncles": []
}
}
/getgasprice
Get the current gas price from the network.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
Remote procedural call URL.
https://api.expand.network/chain/getgasprice?chainId=10
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": "1000000"
}
}
/getstorage
Get data stored in the given slot.
GET
https://api.expand.network/chain/getstorage
Query Parameters
Remote procedural call URL.
Contract address whose storage is needed.
Slot index on the smart contract. By default, it is taken as 0.
https://api.expand.network/chain/getstorage?chainId=10&address=0x5470EA9f962D138229043F903b96E083484A6330
{
"status": 200,
"msg": "success",
"data": {
"data": "0x0000000000000000000001006af9fed62bb9011a12cb8aa69e771c1bd0ad988e"
}
}
/gettransaction
Get details of a transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
Remote procedural call URL.
https://api.expand.network/chain/gettransaction?chainId=10&transactionHash=0xda0dd3b42e45d85ddb470cab146bbc957ee0eb5a6c95ab9996b6c3a1868b0082
{
"status": 200,
"msg": "success",
"data": {
"hash": "0xda0dd3b42e45d85ddb470cab146bbc957ee0eb5a6c95ab9996b6c3a1868b0082",
"transactionStatus": null,
"blockNumber": 71563515,
"timestamp": null,
"from": "0x6Af9Fed62bb9011A12cB8AA69e771c1BD0AD988E",
"to": "0x5470EA9f962D138229043F903b96E083484A6330",
"value": "0",
"transactionFees": "164014000000",
"gas": 164014,
"gasPrice": "1000000",
"input": "0xb6b55f25000000000000000000000000000000000000000000000005be07ce1fc37bd490",
"nonce": 91,
"network": null
}
}
/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
Remote procedural call URL.
Public addess of the user.
Comma-separated value of ERC-20 tokens to get value of. Maximum 10 at a time.
By default, false.
If true, tokens with balance > 0 will be listed.
Present at the end of a lengthy response to fetch the next page.
fungible
/nonFungible
standard choice.
By default, all
.
https://api.expand.network/chain/portfolio?chainId=10&address=0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001&availableOnly=true
{
"status": 200,
"msg": "success",
"data": {
"native": "0",
"evmTokens": [
{
"name": "$FLOKI AIRDROP AT flokicrypto.xyz",
"symbol": "$FLOKI",
"decimals": "0",
"address": "0x0b0556f2604431e78f5aca455c6de70078c681c7",
"balance": "1",
"assetType": "ERC1155",
"tokenId": "0"
},
{
"name": "FLOKI AIRDROP AT floki-crypto.online",
"symbol": "$FLOKI",
"decimals": "0",
"address": "0xba3991734d633e9e6ac71139537518abc50a23f0",
"balance": "4",
"assetType": "ERC1155",
"tokenId": "1"
},
{
"name": "Omnichain Adventures",
"symbol": "OMNIA",
"decimals": "0",
"address": "0xd12999440402d30f69e282d45081999412013844",
"balance": "1",
"assetType": "ERC721",
"tokenId": "3587678"
}
]
}
}
/sendtransaction
Send transaction on the chain.
POST
https://api.expand.network/chain/sendtransaction
Request Body
Remote procedural call URL.
The encoded transaction, obtained from the signed transaction.
{
"chainId" : "10",
"rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId" : "10",
"transactionHash": "0x8375c5eedd17609292cecc051c18e180fa970b32a77011c48d3725e45e46e7b3"
}
}
/decodetransaction
Get the decoded transaction for the provided raw transaction.
POST
https://api.expand.network/chain/decodetransaction
Request Body
Refer to the Chain ID page for details. By default, Ethereum.
The raw transaction to be given for decoding.
{
"chainId": "10",
"rawTransaction": "0xf86c808401fedd93830d575194a67e9b68c41b0f26184d64c26e0b2b81466e5994888ac7230489e800008038a09055da16d4d23b1d1831ff8c150820a5e48dc931a0682c708b147ffb9db78f95a0037037cd03120d877daf33ae416fe4f14091624da042312a5c080a25752839f8"
}
{
"status": 200,
"msg": "success",
"data": {
"parsedTx": {
"nonce": 0,
"gasPrice": {
"type": "BigNumber",
"hex": "0x01fedd93"
},
"gasLimit": {
"type": "BigNumber",
"hex": "0x0d5751"
},
"to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
"value": {
"type": "BigNumber",
"hex": "0x8ac7230489e80000"
},
"data": "0x",
"chainId": 10,
"v": 56,
"r": "0x9055da16d4d23b1d1831ff8c150820a5e48dc931a0682c708b147ffb9db78f95",
"s": "0x037037cd03120d877daf33ae416fe4f14091624da042312a5c080a25752839f8",
"from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
"hash": "0x7616dbfb6f7b9a3d82049be986b913a4b03d264ed5ecc7496cfb6037bb157dde",
"type": null
},
"assetChanges": {
"from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
"to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
"value": {
"type": "BigNumber",
"hex": "0x8ac7230489e80000"
}
}
}
}
Last updated