Polygon

/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

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.

timestamp

String

The timestamp of the block number. Note- When both a timestamp and a block number are provided, the timestamp will take precedence.

https://api.expand.network/chain/getbalance?chainId=137&blockNumber=58664722&address=0x804a712AD5BB31756B4Cd6Ee58176dce06594845&tokenAddress=0xD9a1070f832Cc02ff9d839500EEf6E8c64983726

/getblock

Get details of a block.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

blockNumber

String

The block number or block hash.

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=137

/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

chainSymbol

String

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

/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

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=137&address=0xb33EaAd8d922B1083446DC23f610c2567fB5180f

/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

chainSymbol

String

transactionHash*

String

The transaction hash.

https://api.expand.network/chain/gettransaction?chainId=137&transactionHash=0xee44d837079754929b0ef0e9752de8c78f0da4a601d3c61a7ac6660cb78f06e4

/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

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.

pageToken

String

Present at the end of a lengthy response to fetch the next page.

assetType

String

fungible/nonFungible standard choice. By default, all.

timestamp

String

The Timestamp of the block number up to which the balances will be fetched. Note-Only applicable for assetType fungible

blockNumber

String

The block number up to which the balances will be fetched. Note-Only applicable for assetType fungible

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

/getusertransactions

Get the historical transaction details for a specific user address.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

chainSymbol

String

address*

String

The public address of the user.

pageToken

String

The page cursor present at the top to fetch the next page.

pageSize

String

The page size. By Default 30 and Max 100

sortOrder

String

The transaction sorting order. asc or desc. By default, desc.

startBlock

String

The starting block number from which to get the transactions. By default, the Genesis block

endBlock

String

The ending block number from which to get the transactions By default, the current block

fromTimestamp

String

The start date from which to get the transactions ( format in seconds or date string ) Note-If 'fromTimestamp' and 'startBlock' are provided, 'startBlock' will be used. By default, the Genesis block timestamp

toTimestamp

String

The end date from which to get the transactions ( format in seconds or date string ) Note- If 'toTimestamp' and 'endBlock' are provided, 'endBlock' will be used.

By default, the current block timestamp

https://historicallp.api.expand.network/chain/getusertransactions?sortOrder=asc&address=0x006Dda54A6a3FAC2742F6db38029ADCd2dFE0A52&pageSize=5&chainId=137

/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

chainSymbol

String

rawTransaction*

String

The encoded transaction, obtained from the signed transaction.

{
    "chainId" : "137",
    "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}

/decodetransaction

Get the decoded transaction for the provided raw transaction.

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

Request Body

Name
Type
Description

chainId

String

chainSymbol

String

rawTransaction*

String

The raw transaction to be given for decoding.

{
    "chainId": "137",
    "rawTransaction": "0xf86c808511cf7b7e2f830a3b4f94a67e9b68c41b0f26184d64c26e0b2b81466e599485e8d4a5100080820135a0a6212e566b2e319cd45625034eed1579feb6b8663f470cebf0a676efec134a88a04830a7db11731943ebb2f2b78d054ddcf3153abe5571efb235efec00f555a870"
}

Last updated