Ethereum

/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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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/?address=0x731FDBd6871aD5cD905eE560A84615229eD8197a

/getblock

Get details of a block.

GET https://api.expand.network/chain/getblock

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

blockNumber*

String

The block number or block hash.

https://api.expand.network/chain/getblock?blockNumber=16318231

/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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

https://api.expand.network/chain/getgasprice

/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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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?address=0x6839f0eB2a4f323aC616b99BA01547dE592BC965

/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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

transactionHash*

String

The transaction hash.

https://api.expand.network/chain/gettransaction?transactionHash=0x00ac1582db64ee60e1be6b653c42ca5d199d749c2e0e3990f3ab00433fcdc1d6

/getgasfees

Retrieves the total fee spent, current price, adjusted price (in cents), and the transaction list associated with a specified address within a given block range.

GET https://api.expand.network/chain/getgasfees

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

address*

String

Addess of the user

startBlock

String

Starting block of the range by default it is latestblock-100

endBlock

String

Last block of the range

by default it is latest block

https://api.expand.network/chain/getgasfees?address=0x690B9A9E9aa1C9dB991C7721a92d351Db4FaC990

/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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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=1&address=0x356dB816602c85e2075774bB77D13995c8Bab023&availableOnly=true

/getusertransactions

Get the historical transaction details for a specific user address.

GET https://api.expand.network/chain/getusertransactions

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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=0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5&page=509&chainId=1

/getflashbotblocks

Get details of the flashbot blocks.

GET https://api.expand.network/chain/getflashbotblocks

Query Parameters

Name
Type
Description

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

https://api.expand.network/chain/getflashbotblocks?chainId=1

/getflashbottransactions

Get details of the flashbot transactions.

GET https://api.expand.network/chain/getflashbottransactions

Query Parameters

Name
Type
Description

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

https://api.expand.network/chain/getflashbottransactions?chainId=1

/getflashbotbundle

Get details of the specified flashbot bundle.

GET https://api.expand.network/chain/getflashbotbundle

Query Parameters

Name
Type
Description

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

bundleHash*

String

The bundle hash.

https://api.expand.network/chain/getflashbotbundle?bundleHash=0x2228f5d8954ce31dc1601a8ba264dbd401bf1428388ce88238932815c5d6f23f

/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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

rawTransaction*

String

The encoded transaction, obtained from the signed transaction.

bdnTransaction

Boolean

If true, then txn goes through the bdn route, which speeds up the transaction process.

By default, false.

mevProtection

Boolean

If true, then txn goes through flashbots.

{
    "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}

With bdnTransaction: true

{
    "chainId": "1",
    "rawTransaction": "0xf8672385070e93c2cf8261a8946fb447ae94f5180254d436a693907a1f57696900830186a08026a0544037b4bd1f139c5d5cbc926d239f4eff34ecc428872e9ba576d6b921254c15a014e0e56c6b2d752d03e059098d69b59b26063a8767bcd1cfc00fc0e9e7ab8365",
    "bdnTransaction": true
}

With mevProtection: true

{
    "chainId":"1",
    "rawTransaction": "0xf8a68205180f82753e94dc31ee1784292379fbb2964b3b9c4124d8f89c6080b844a9059cbb000000000000000000000000a67e9b68c41b0f26184d64c26e0b2b81466e5994000000000000000000000000000000000000000000000000000000174876e8002ea0952b0468aff066f3e00a1d476b8894d84bfc47a1a3cdab9d6809a3461cc713e5a018219ee382aa3c7edf73a87bd8a75e2c40a97efbdf56a6cfd353af06fb74101d",
    "mevProtection": true
}

/genericsmartcontractmethod

Executes a read query on a verified smart contract on etherscan. In case of un-verified smart contracts, ABI needs to be provided to proceed accordingly.

POST https://api.expand.network/chain/genericsmartcontractmethod

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

contractAddress*

String

Address of the Contract to perform read operation on.

parameters

Array

Parameters to the read function

abi

String

Abi of the smart contract

methodName*

String

Name of the read function to be called

blockNumber

String

BlockNumber to perform read query on. by Default latestBlock

{
    "contractAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "methodName": "getAmountsIn",
    "parameters": [
        "4515444785",
        [
            "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "0x6B175474E89094C44Da98b954EedeAC495271d0F"
        ]
    ]
}

/decodetransaction

Get the decoded transaction for the provided raw transaction.

POST https://api.expand.network/chain/decodetransaction

Request Body

Name
Type
Description

chainId

String

Refer to the Chain ID page for details. By default, Ethereum.

chainSymbol

String

Refer to the Chain ID page for details.

rawTransaction*

String

The raw transaction to be given for decoding.

{ 
    "chainId" : "1",
    "rawTransaction":"0xf865808509c9919d87830a4a1194a67e9b68c41b0f26184d64c26e0b2b81466e5994018025a07542477f2599acdda95c37ff0492bd0ac656687780033807e0434ccf69bd4015a005f33bf2cde8001f51b46e18db78049b4509b824f09dccb45b4dbb9087d17049"
}

Last updated

#553: ENC-2526-LIDO

Change request updated