Avalanche - C

/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.

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=43114&blockNumber=46286930&address=0x555CE236C0220695b68341bc48C68d52210cC35b&tokenAddress=0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E

/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

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.

startBlock

String

SStarting 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=43114

/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?chainId=43114

/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?chainId=43114&address=0x919dF3aDbF5cfC9fcfd43198EDFe5aA5561CB456

/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?chainId=43114&transactionHash=0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143

/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.

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=43114&address=0x341dc441D0540166A26b98d1960DD2f997e378eA&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

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

address*

String

Comma-separated value of user addresses.

endBlock

String

Last block of the range.

startBlock

String

Starting block of the range.

pageToken

String

The next page's token. Can be found at the end of the response.

sortOrder

String

The transaction sorting order. asc or desc.

https://historicallp.api.expand.network/chain/getusertransactions?startBlock=37838200&endBlock=37838250&chainSymbol=c-avax&address=0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979

/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.

{
    "chainId" : "43114",
    "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

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": "43114",
    "rawTransaction": "0xf86c808505d21dba00830a3d8794f73ee0e06a1b8ec3a7ff860d766e75f3eea7b985843b9aca0080830150f7a084e67381cbe0ef549cba454b7b252b324cc5d7a05be4e67a8f8242e71ec0bc39a07cd18e29ccc04a5cc34c886a8df02400c5432341a99559fcaed8bad622450b70"
}

Last updated