Optimism
/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. |
/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. |
/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. |
/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. |
/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. |
/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 |
|
/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. |
/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. |
Last updated