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

NameTypeDescription

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

/getblock

Get details of a block.

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

Query Parameters

NameTypeDescription

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

/getgasprice

Get the current gas price from the network.

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

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

https://api.expand.network/chain/getgasprice?chainId=8453

/getstorage

Get data stored in the given slot.

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

Query Parameters

NameTypeDescription

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

/gettransaction

Get details of a transaction.

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

Query Parameters

NameTypeDescription

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

/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

NameTypeDescription

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

fungible/nonFungible standard choice. By default, all.

https://api.expand.network/chain/portfolio?chainId=8453&address=0xA5af143fd6f6093FDcF6D51d3641F08eaa07d53f&availableOnly=true

/sendtransaction

Send transaction on the chain.

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

Request Body

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

rawTransaction*

String

The encoded transaction, obtained from the signed transaction.

{
    "chainId": "8453",
    "rawTransaction": "0xf86a80830f4272830a3d8794a67e9b68c41b0f26184d64c26e0b2b81466e5994843b9aca00808302948ca0e073bcaa02ab49f019278be707e3e50433ac7ae6107649a8b1cbdbc368e9482ea05ba36d559c5b70ffa289f90a572adc0863c46fdd067c40c2f37b9ea666fcc8e7"
}

Last updated