/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=0x2cc78c19e6e5c8d663c99d0f576eb6653230d8e5&chainId=42161
{
"status": 200,
"msg": "success",
"data": {
"balance": "31694433813985696"
}
}
/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=42161
{
"status": 200,
"msg": "success",
"data": {
"difficulty": "0",
"gasLimit": 57346493,
"gasUsed": 1482,
"hash": "0x9363fe08f3264f657af4d02e90ab82969a03a89f6825198a25b3d4a5b454bc97",
"miner": "0x0000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": 2525553,
"parentHash": "0x3869bab721f6ed96e2a097ce77018d7a8dfbdb7a1ac5e5b3b5078c083cebb06f",
"size": 736,
"timestamp": 1635132745,
"totalDifficulty": "0",
"transactions": [
"0x7b0abe54bb652fb69da1169aa20cf91753d0d9e44e698cdb14fb363ca938737b"
],
"transactionsRoot": "0x6e4dd2ef1c7eb942b254c4bf28a5a3a18a401a31227fc22b22c33181d879f693",
"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=42161
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": "100000000"
}
}
/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=42161&address=0x825d6bc6e67C255c2a053bbd7c6100eEc4025656
{
"status": 200,
"msg": "success",
"data": {
"data": "0x0000000000000000000000000547f5965b015d8f6c92e6bcda6ca040567fd238"
}
}
/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=42161&transactionHash=0x28c980e3d75a98d29269bdf88d6e375d1657e96c3a1412e5347aa84f03542896
{
"status": 200,
"msg": "success",
"data": {
"hash": "0x28c980e3d75a98d29269bdf88d6e375d1657e96c3a1412e5347aa84f03542896",
"transactionStatus": null,
"blockNumber": 56842886,
"timestamp": null,
"from": "0x0547F5965B015D8F6C92E6BCDA6Ca040567Fd238",
"to": "0x825d6bc6e67C255c2a053bbd7c6100eEc4025656",
"value": "0",
"transactionFees": "57732100000000",
"gas": 577321,
"gasPrice": "100000000",
"input": "0x52f7c98800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": 5,
"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=42161&address=0x299d68A01B4c9C550c0CCDCa8EE3C616d319214E&availableOnly=true
{
"status": 200,
"msg": "success",
"data": {
"native": "728003934801000",
"evmTokens": [
{
"name": "Global Token",
"symbol": "GBL",
"decimals": "18",
"address": "0xc14a7747cfec02cfea62e72bb93538de6b2078e6",
"balance": "39515873923087022849",
"assetType": "ERC20",
"USDPrice": "7.912071535453639"
},
{
"name": "Tether USD",
"symbol": "USDT",
"decimals": "6",
"address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
"balance": "23432910",
"assetType": "ERC20",
"USDPrice": "1.0000000000000002"
}
]
}
}
/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" : "42161",
"rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId" : "42161",
"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": "42161",
"rawTransaction": "0xf86a808405f5e100830c885d946fb447ae94f5180254d436a693907a1f57696900839896808083014986a0ef42c905354ab2e801e5d82dde6ac0524cc508d52efcf09e142f10d353cbebd9a04e74de901d830125391974592395e1c605b1526585c5d69154e4b83b81d8cc50"
}
{
"status": 200,
"msg": "success",
"data": {
"parsedTx": {
"nonce": 0,
"gasPrice": {
"type": "BigNumber",
"hex": "0x05f5e100"
},
"gasLimit": {
"type": "BigNumber",
"hex": "0x0c885d"
},
"to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"value": {
"type": "BigNumber",
"hex": "0x989680"
},
"data": "0x",
"chainId": 42161,
"v": 84358,
"r": "0xef42c905354ab2e801e5d82dde6ac0524cc508d52efcf09e142f10d353cbebd9",
"s": "0x4e74de901d830125391974592395e1c605b1526585c5d69154e4b83b81d8cc50",
"from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
"hash": "0x1f625c983d622282e4493a943da892bdddd8c164026e67a5f5ac9f175ded0139",
"type": null
},
"assetChanges": {
"from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
"to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"value": {
"type": "BigNumber",
"hex": "0x989680"
}
}
}
}
Last updated