# Arbitrum

### /getbalance

## Get the balance or number of the given token in the requested public address.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/chain/getbalance`

#### Query Parameters

| Name                                      | Type   | Description                                                                                                                  |
| ----------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                       | String | Remote procedural call URL                                                                                                   |
| chainId<mark style="color:red;">\*</mark> | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| address<mark style="color:red;">\*</mark> | String | The public address to get the balance of.                                                                                    |
| tokenAddress                              | String | The address of token to get the balance of.                                                                                  |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/chain/getbalance/?address=0x2cc78c19e6e5c8d663c99d0f576eb6653230d8e5&chainId=42161
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "balance": "31694433813985696"
    }
}
```

{% endtab %}
{% endtabs %}

### /getblock

## Get details of a block.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/chain/getblock`

#### Query Parameters

| Name                                          | Type   | Description                                                                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                           | String | Remote procedural call URL.                                                                                                  |
| chainId<mark style="color:red;">\*</mark>     | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                                   | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| blockNumber<mark style="color:red;">\*</mark> | String | The block number or block hash.                                                                                              |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/chain/getblock?blockNumber=2525553&chainId=42161
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "difficulty": "0",
        "gasLimit": 57346493,
        "gasUsed": 1482,
        "hash": "0x9363fe08f3264f657af4d02e90ab82969a03a89f6825198a25b3d4a5b454bc97",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": "0x0000000000000000",
        "number": 2525553,
        "parentHash": "0x3869bab721f6ed96e2a097ce77018d7a8dfbdb7a1ac5e5b3b5078c083cebb06f",
        "size": 736,
        "timestamp": 1635132745,
        "totalDifficulty": "0",
        "transactions": [
            "0x7b0abe54bb652fb69da1169aa20cf91753d0d9e44e698cdb14fb363ca938737b"
        ],
        "transactionsRoot": "0x6e4dd2ef1c7eb942b254c4bf28a5a3a18a401a31227fc22b22c33181d879f693",
        "uncles": []
    }
}
```

{% endtab %}
{% endtabs %}

### /getgasprice

## Get the current gas price from the network.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/chain/getgasprice`

#### Query Parameters

| Name                                      | Type   | Description                                                                                                                  |
| ----------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                       | String | Remote procedural call URL.                                                                                                  |
| chainId<mark style="color:red;">\*</mark> | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/chain/getgasprice?chainId=42161
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "gasPrice": "100000000"
    }
}
```

{% endtab %}
{% endtabs %}

### /getstorage

## Get data stored in the given slot.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/chain/getstorage`

#### Query Parameters

| Name                                      | Type   | Description                                                                                                                  |
| ----------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                       | String | Remote procedural call URL.                                                                                                  |
| chainId<mark style="color:red;">\*</mark> | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| address<mark style="color:red;">\*</mark> | String | Contract address whose storage is needed.                                                                                    |
| index                                     | String | Slot index on the smart contract. By default,  it is taken as 0.                                                             |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/chain/getstorage?chainId=42161&address=0x825d6bc6e67C255c2a053bbd7c6100eEc4025656
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "data": "0x0000000000000000000000000547f5965b015d8f6c92e6bcda6ca040567fd238"
    }
}
```

{% endtab %}
{% endtabs %}

### /gettransaction

## Get details of a transaction.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/chain/gettransaction`

#### Query Parameters

| Name                                              | Type   | Description                                                                                                                  |
| ------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                               | String | Remote procedural call URL.                                                                                                  |
| chainId<mark style="color:red;">\*</mark>         | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                                       | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| transactionHash<mark style="color:red;">\*</mark> | String | The transaction hash.                                                                                                        |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/chain/gettransaction?chainId=42161&transactionHash=0x28c980e3d75a98d29269bdf88d6e375d1657e96c3a1412e5347aa84f03542896
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "hash": "0x28c980e3d75a98d29269bdf88d6e375d1657e96c3a1412e5347aa84f03542896",
        "transactionStatus": null,
        "blockNumber": 56842886,
        "timestamp": null,
        "from": "0x0547F5965B015D8F6C92E6BCDA6Ca040567Fd238",
        "to": "0x825d6bc6e67C255c2a053bbd7c6100eEc4025656",
        "value": "0",
        "transactionFees": "57732100000000",
        "gas": 577321,
        "gasPrice": "100000000",
        "input": "0x52f7c98800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "nonce": 5,
        "network": null
    }
}
```

{% endtab %}
{% endtabs %}

### /portfolio

## Get detailed information about the verified assets or tokens currently associated with a user's wallet address.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/chain/portfolio`

#### Query Parameters

| Name                                      | Type    | Description                                                                                                                  |
| ----------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                       | String  | Remote procedural call URL.                                                                                                  |
| chainId                                   | String  | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                               | String  | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| address<mark style="color:red;">\*</mark> | 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 | <p>By default, false. <br>If true, tokens with balance > 0 will be listed.</p>                                               |
| pageToken                                 | String  | Present at the end of a lengthy response to fetch the next page.                                                             |
| assetType                                 | String  | <p><code>fungible</code>/<code>nonFungible</code> standard choice.  <br>By default, <code>all</code>.</p>                    |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/chain/portfolio?chainId=42161&address=0x299d68A01B4c9C550c0CCDCa8EE3C616d319214E&availableOnly=true
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "728003934801000",
        "evmTokens": [
            {
                "name": "Global Token",
                "symbol": "GBL",
                "decimals": "18",
                "address": "0xc14a7747cfec02cfea62e72bb93538de6b2078e6",
                "balance": "39515873923087022849",
                "assetType": "ERC20",
                "USDPrice": "7.912071535453639"
            },
            {
                "name": "Tether USD",
                "symbol": "USDT",
                "decimals": "6",
                "address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
                "balance": "23432910",
                "assetType": "ERC20",
                "USDPrice": "1.0000000000000002"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### **/sendtransaction**

## Send transaction on the chain.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/chain/sendtransaction`

#### Request Body

| Name                                             | Type   | Description                                                                                                                  |
| ------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| rpc                                              | String | Remote procedural call URL.                                                                                                  |
| chainId<mark style="color:red;">\*</mark>        | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| chainSymbol                                      | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. |
| rawTransaction<mark style="color:red;">\*</mark> | String | The encoded transaction, obtained from the signed transaction.                                                               |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "chainId" : "42161",
    "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId" : "42161",
        "transactionHash": "0x8375c5eedd17609292cecc051c18e180fa970b32a77011c48d3725e45e46e7b3" 
    }
}
```

{% endtab %}
{% endtabs %}

### /decodetransaction

## Get the decoded transaction for the provided raw transaction.&#x20;

<mark style="color:green;">`POST`</mark> `https://api.expand.network/chain/decodetransaction`

#### Request Body

| Name                                             | Type   | Description                                                                                                                                        |
| ------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| chainId                                          | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details. By default, Ethereum. |
| chainSymbol                                      | String | Refer to the [Chain ID ](https://docs.expand.network/~/changes/CwwHZ0oIeFsEWwiEWd1b/important-ids/chain-id)page for details.                       |
| rawTransaction<mark style="color:red;">\*</mark> | String | The raw transaction to be given for decoding.                                                                                                      |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "chainId": "42161",
    "rawTransaction": "0xf86a808405f5e100830c885d946fb447ae94f5180254d436a693907a1f57696900839896808083014986a0ef42c905354ab2e801e5d82dde6ac0524cc508d52efcf09e142f10d353cbebd9a04e74de901d830125391974592395e1c605b1526585c5d69154e4b83b81d8cc50"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "parsedTx": {
            "nonce": 0,
            "gasPrice": {
                "type": "BigNumber",
                "hex": "0x05f5e100"
            },
            "gasLimit": {
                "type": "BigNumber",
                "hex": "0x0c885d"
            },
            "to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "value": {
                "type": "BigNumber",
                "hex": "0x989680"
            },
            "data": "0x",
            "chainId": 42161,
            "v": 84358,
            "r": "0xef42c905354ab2e801e5d82dde6ac0524cc508d52efcf09e142f10d353cbebd9",
            "s": "0x4e74de901d830125391974592395e1c605b1526585c5d69154e4b83b81d8cc50",
            "from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
            "hash": "0x1f625c983d622282e4493a943da892bdddd8c164026e67a5f5ac9f175ded0139",
            "type": null
        },
        "assetChanges": {
            "from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
            "to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "value": {
                "type": "BigNumber",
                "hex": "0x989680"
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}
