Binance Smart chain
/getbalance
Get the balance or number of the given token in the requested public address.
GET https://api.expand.network/chain/getbalance
Query Parameters
https://api.expand.network/chain/getbalance/?address=0x685B1ded8013785d6623CC18D214320b6Bb64759&chainId=56{
    "status": 200,
    "msg": "success",
    "data": {
        "balance": "89692123976040652"
    }
}/getblock
Get details of a block.
GET https://api.expand.network/chain/getblock
Query Parameters
https://api.expand.network/chain/getblock?chainId=56&blockNumber=30265549{
    "status": 200,
    "msg": "success",
    "data": {
        "difficulty": "2",
        "gasLimit": 140000000,
        "gasUsed": 11317448,
        "hash": "0x584630b7b93f2279d6a0d37da69a12647511df50b49cf3351837abad7d4af015",
        "miner": "0x685B1ded8013785d6623CC18D214320b6Bb64759",
        "nonce": "0x0000000000000000",
        "number": 25255572,
        "parentHash": "0x6f0ed227631616c7bda0b47a814d2b469adc72e38d67386f7e7ebe022b0f18ab",
        "size": 33054,
        "timestamp": 1675147620,
        "totalDifficulty": "50196335",
        "transactions": [
            "0x1da5b0d1f450f75b3f6a3b5965380c98aef573a93a4f1ed59fa35b7dc3b52156",
            "0x198bfeacb68713e6a7bde94306a20a91ddbe59ecef68f2cc9d7721006f546d7c",
            "0x8e10681572d5fc47e5fa6b30c81ffd816e0ad9eea685fb80c648f1ba50edfdf3",
            "0xedec3ddc5243f5a0928d20ffa1d92ca923d96ca93745587088340caf69435781",
            "0x36f77d611d197ae5ab05a6cdd93ce2058b81b0448dd3f1f5b61d0808f80f634e",
            "0x745a521ed39f66dcc6604b25025ee84dd3b00b780e930bd8c00d113e89b220ad",
            "0xdd33878102eb13c04e2dcafc9cf46cfecb322645eb90543caba9c7798deabc40",
            "0xc857b18d735fa32d93f980a365127b9190c27a3452113ecfdc186817bd4498b7"
           ],
        "transactionsRoot": "0x8b64f0c547fd39882944ed9896b70997e8be6b0e599430ef1800193d65892b5d",
        "uncles": []
    }
}/getgasprice
Get the current gas price from the network.
GET https://api.expand.network/chain/getgasprice
Query Parameters
https://api.expand.network/chain/getgasprice?chainId=56{
    "status": 200,
    "msg": "success",
    "data": {
        "gasPrice": "5000000000"
    }
}/getstorage
Get data stored in the given slot.
GET https://api.expand.network/chain/getstorage
Query Parameters
https://api.expand.network/chain/getstorage?chainId=56&address=0xb22069baEf86655460F56CD73d7EC999B5DA6B73{
    "status": 200,
    "msg": "success",
    "data": {
        "data": "0x0000000000000000000000004373275b113f2e45cb45ae9eab1e6d3ef1ca185c"
    }
}/gettransaction
Get details of a transaction.
GET https://api.expand.network/chain/gettransaction
Query Parameters
https://api.expand.network/chain/gettransaction?chainId=56&transactionHash=0x5834a0ef28b7f58044d183e2ceb140365c5e5329d6364ca8f5ad8d29d7838715{
    "status": 200,
    "msg": "success",
    "data": {
        "hash": "0x8a374e4a90b4c7d029ebf522477114e4149e936b8875e702bd380b0bcbe2b013",
        "transactionStatus": null,
        "blockNumber": 25255642,
        "timestamp": null,
        "from": "0xfc41Ccf23B75B936a15CB2DD8034feB41e6677e3",
        "to": "0xb22069baEf86655460F56CD73d7EC999B5DA6B73",
        "value": "0",
        "transactionFees": "2500000000000000",
        "gas": 500000,
        "gasPrice": "5000000000",
        "input": "0x095ea7b300000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "nonce": 0,
        "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
rpc
String
Remote procedural call URL.
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
fungible/nonFungible standard choice.  
By default, all.
https://api.expand.network/chain/portfolio?chainId=56&address=0x9ef9f4360c606c7AB4db26b016007d3ad0aB86a0&availableOnly=true{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "100000000000000000",
        "evmTokens": [
            {
                "name": "Pelican Trust (Save The Pelicans)",
                "symbol": "PTRST",
                "decimals": "9",
                "address": "0x2a3a5011d4a43e3966ac061762d476bcb54289c2",
                "balance": "1000000015646852",
                "assetType": "ERC20",
                "USDPrice": "566.4003103654223"
            },
            {
                "name": "AI Avail",
                "symbol": "AI-A",
                "decimals": "6",
                "address": "0xd048b4c23af828e5be412505a51a8dd7b37782dd",
                "balance": "23000000000",
                "assetType": "ERC20",
                "USDPrice": "0.7034536653118537"
            },
            {
                "name": "eCash",
                "symbol": "XEC",
                "decimals": "6",
                "address": "0x5f7a1a4dafd0718caee1184caa4862543f75edb1",
                "balance": "29000000000000",
                "assetType": "ERC20",
                "USDPrice": "0.000061525764023246"
            },
            {
                "name": "Minereum BSC",
                "symbol": "MNEB",
                "decimals": "8",
                "address": "0xd22202d23fe7de9e3dbe11a2a88f42f4cb9507cf",
                "balance": "15000000000000",
                "assetType": "ERC20",
                "USDPrice": "0.002957114417754845"
            },
            {
                "name": "Volt Token",
                "symbol": "VLT",
                "decimals": "9",
                "address": "0x3f413df715251814d2ce25dcf74c8e94f3b40b67",
                "balance": "2188732955437000000000",
                "assetType": "ERC20",
                "USDPrice": "9.97635e-13"
            },
            {
                "name": "RGDC Token",
                "symbol": "RGDC",
                "decimals": "18",
                "address": "0x64434605adac8f5441029133fd12c4289fc8b4a8",
                "balance": "1000000000000000000",
                "assetType": "ERC20",
                "USDPrice": "0.03271055525971668"
            },
            {
                "name": "superspreader.info",
                "symbol": "SPRD",
                "decimals": "18",
                "address": "0xd4e4d228eafb1ca8897c7e9cc9992fe3a0b8693c",
                "balance": "8802832521443043712",
                "assetType": "ERC20",
                "USDPrice": "0.000008618710042535"
            },
            {
                "name": "AIR",
                "symbol": "AIR",
                "decimals": "18",
                "address": "0xd8a2ae43fd061d24acd538e3866ffc2c05151b53",
                "balance": "10000000000000000000000",
                "assetType": "ERC20",
                "USDPrice": "7.5981e-14"
            },
            {
                "name": "BLESS",
                "symbol": "GOD",
                "decimals": "0",
                "address": "0x81a7571fabb0e1e3a6a2d815f054d503dc649f42",
                "balance": "255",
                "assetType": "ERC20",
                "USDPrice": null
            },
            {
                "name": "My Get Rich Token",
                "symbol": "MGRT",
                "decimals": "18",
                "address": "0x71753d0586ea6b979dfccbb492a45e611e0e0ad6",
                "balance": "120000576000000000000000",
                "assetType": "ERC20",
                "USDPrice": null
            },
            {
                "name": "!  Kuroro.gg",
                "symbol": "KURO  [www.kuroro.gg]",
                "decimals": "18",
                "address": "0x31217006cb5515f0f5358a00b83847861c0d27c6",
                "balance": "1391842000000000000000000",
                "assetType": "ERC20",
                "USDPrice": null
            },
            {
                "name": "Airdrop at 3000usdc.us 🎁",
                "symbol": "Airdrop at [3000usdc.us]",
                "decimals": "0",
                "address": "0xac08ac192dff5d0865806c3700006849162f5d34",
                "balance": "1",
                "assetType": "ERC1155",
                "tokenId": "1"
            },
            {
                "name": "Airdrop at 3000usdc.us 🎁",
                "symbol": "Airdrop at [3000usdc.us]",
                "decimals": "0",
                "address": "0x3a193b2a0b2eeee6e0c1cdc05c4a75bc4efb8845",
                "balance": "1",
                "assetType": "ERC1155",
                "tokenId": "1"
            },
            {
                "name": "SHA256 Miner",
                "symbol": "SHA256Miner",
                "decimals": "0",
                "address": "0x322d1f74defab8700ddafc3b3369186f03c81a92",
                "balance": "1",
                "assetType": "ERC721",
                "tokenId": "1249"
            },
            {
                "name": "SHA256 Miner",
                "symbol": "SHA256Miner",
                "decimals": "0",
                "address": "0x07e8d4b6f3f849d919f172150108d24ac7e548f2",
                "balance": "1",
                "assetType": "ERC721",
                "tokenId": "1253"
            }
        ]
    }
}/getusertransactions
Get the historical transaction details for a specific user address. 
GET https://api.expand.network/chain/getusertransactions
Query Parameters
rpc
String
Remote procedural call URL.
address*
String
The public address of the user.
page
String
The page number that the user wants to fetch.
sortOrder
String
The transaction sorting order. asc or desc. By default, desc.
https://api.expand.network/chain/getusertransactions?address=0xee226379dB83CfFC681495730c11fDDE79BA4c0C&page=1420&sortOrder=asc&chainId=56{
  "status": 200,
  "msg": "success",
  "data": {
      "totalPages": "1453",
      "currentPage": "1420",
      "transactions": [
        {
          "block_signed_at": "2023-11-21T05:49:15Z",
          "block_height": 33678471,
          "block_hash": "0xd6cddc805be39b84bef1926f391abfcb51890a119dde01d5508b90a5e8a0b441",
          "tx_hash": "0xe956b223bdf04f977251db110e1b540b6214c5a960eee22e7f9b049d581a4bc9",
          "tx_offset": 130,
          "successful": true,
          "miner_address": "0xee226379db83cffc681495730c11fdde79ba4c0c",
          "from_address": "0xee226379db83cffc681495730c11fdde79ba4c0c",
          "from_address_label": null,
          "to_address": "0x0000000000000000000000000000000000001000",
          "to_address_label": null,
          "value": "55907510455990511",
          "value_quote": 12.715772291108797,
          "pretty_value_quote": "$12.72",
          "gas_metadata": {
              "contract_decimals": 18,
              "contract_name": "Binance Coin",
              "contract_ticker_symbol": "BNB",
              "contract_address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "supports_erc": null,
              "logo_url": "https://www.datocms-assets.com/86369/1670003808-binance-smart-chain-icon-white.svg"
          },
          "gas_offered": 9223372036854776000,
          "gas_spent": 34135,
          "gas_price": 0,
          "fees_paid": "0",
          "gas_quote": 0,
          "pretty_gas_quote": "$0.00",
          "gas_quote_rate": 227.4430069841591,
          "explorers": [
              {
                  "label": null,
                  "url": "https://bscscan.com/tx/0xe956b223bdf04f977251db110e1b540b6214c5a960eee22e7f9b049d581a4bc9"
              }
          ]
      }
      ]
  }
}/sendtransaction
Send transaction on the chain.
POST https://api.expand.network/chain/sendtransaction
Request Body
{
    "chainId" : "56",
    "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId" : "56",
        "transactionHash": "0x8375c5eedd17609292cecc051c18e180fa970b32a77011c48d3725e45e46e7b3" 
    }
}/decodetransaction
Get the decoded transaction for the provided raw transaction. 
POST https://api.expand.network/chain/decodetransaction
Request Body
{
    "chainId": "56",
    "rawTransaction": "0xf86a80843b9aca00830a3d8794a67e9b68c41b0f26184d64c26e0b2b81466e599485e8d4a51000808193a0d10d1098d97c6ee39ef89aeccfce05e5c736da024f5a6d9973fb0cfffd585e95a006117e1c44a882403df404cd8509c5bc7f8bd0f9425d306c46c6642d0ebb3f82"
}{
    "status": 200,
    "msg": "success",
    "data": {
        "parsedTx": {
            "nonce": 0,
            "gasPrice": {
                "type": "BigNumber",
                "hex": "0x3b9aca00"
            },
            "gasLimit": {
                "type": "BigNumber",
                "hex": "0x0a3d87"
            },
            "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "value": {
                "type": "BigNumber",
                "hex": "0xe8d4a51000"
            },
            "data": "0x",
            "chainId": 56,
            "v": 147,
            "r": "0xd10d1098d97c6ee39ef89aeccfce05e5c736da024f5a6d9973fb0cfffd585e95",
            "s": "0x06117e1c44a882403df404cd8509c5bc7f8bd0f9425d306c46c6642d0ebb3f82",
            "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "hash": "0xc646c843f859ad3478ff4ce9d31a17917b474b99d7c5ba81491197af4006dbf6",
            "type": null
        },
        "assetChanges": {
            "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "value": {
                "type": "BigNumber",
                "hex": "0xe8d4a51000"
            }
        }
    }
}Last updated

