# Base

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

<table><thead><tr><th width="175">Name</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL</td></tr><tr><td>chainId<mark style="color:red;">*</mark></td><td>String</td><td>Refer to the <a href="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details. </td></tr><tr><td>chainSymbol</td><td>String</td><td>Refer to the <a href="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details.</td></tr><tr><td>blockNumber</td><td>String</td><td><p>Block number for which the balance needs to be retrieved.</p><p>By default, it will pick the latest block number when not specified.</p></td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>The public address to get the balance of.</td></tr><tr><td>tokenAddress</td><td>String</td><td>The address of token to get the balance of.</td></tr><tr><td>timestamp</td><td>String</td><td>The timestamp of the block number.<br><strong>Note</strong>- When both a timestamp and a block number are provided, the timestamp will take precedence.</td></tr></tbody></table>

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

```url
https://api.expand.network/chain/getbalance?chainId=8453&blockNumber=15351657&address=0x20FE51A9229EEf2cF8Ad9E89d91CAb9312cF3b7A&tokenAddress=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
```

{% endtab %}

{% tab title="Sample Response" %}

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

{% endtab %}
{% endtabs %}

### /getblock

Get details of a block.

<mark style="color:blue;">`GET`</mark> `https://historicallp.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 ](/ids/chain-ids.md)page for details.                                                                      |
| chainSymbol                               | String | Refer to the [Chain ID ](/ids/chain-ids.md)page for details.                                                                      |
| startBlock                                | String | Starting block of the range. Note: Maximum supported range is 10, meaning the startBlock is determined by endBlock - 9.           |
| endBlock                                  | String | <p>Last block of the range. </p><p>Note: Maximum supported range is 10, meaning the endBlock is determined by startBlock + 9.</p> |

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

```url
https://historicallp.api.expand.network/chain/getblock?chainId=8453
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "status": 200,
  "msg": "success",
  "data": {
    "baseFeePerGas": 52,
    "difficulty": "0",
    "extraData": "0x",
    "gasLimit": 30000000,
    "gasUsed": 918397,
    "hash": "0x97250c54e310eb29a30b7ab4184b1cce9e466e7063b5590d52b73709e0bb230e",
    "logsBloom": "0x00320000000000380000010082000002000002400000000000848000280000100100000000000000040400100400000000000000000420000200000000102000000041108400004800000008000020200000400800000014000000000000000000000200c00002000140000010040000000000000204040000000012000a0000080001000004000100000000000000000400800000200208000800400000000000108010000000010000081080000000000000000000000000000010800000008000000200000000000000004000100000000000042020100001000000000000000008000085408000000010000000800000a000010000001000010400000004",
    "miner": "0x4200000000000000000000000000000000000011",
    "mixHash": "0x9e3ca5a8047da9c040f7b92fd39e6bfd76a6fc08c9f9afd15b3453c206c6ab22",
    "nonce": "0x0000000000000000",
    "number": 6283173,
    "parentHash": "0xed86a845409a882270d4512487b7dafdfe91157da6d1e6c50d738de5a4a3ae92",
    "receiptsRoot": "0x4e6cf0bb0f40be05a6e77c767a7a97186d13f2e5ab2735a958963c231545b043",
    "size": 4031,
    "timestamp": 1699355693,
    "totalDifficulty": "0",
    "transactions": [
      {
        "chainId": "8453",
        "hash": "0xefd80cb6f1e2b08a00ae403b9c07db6722c9dd7e98498c7e8e658a20c28f9b44",
        "transactionStatus": true,
        "blockNumber": "6283173",
        "timestamp": null,
        "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
        "to": "0x4200000000000000000000000000000000000015",
        "value": "0",
        "transactionFees": "0",
        "gas": "1000000",
        "gasPrice": "0",
        "input": "0x015d8eb900000000000000000000000000000000000000000000000000000000011a968e00000000000000000000000000000000000000000000000000000000654a1b67000000000000000000000000000000000000000000000000000000054e8dc227ca326b2e75777ac174fe3b26a4253a7251a3941f6baf85dc5876503434ef969000000000000000000000000000000000000000000000000000000000000000050000000000000000000000005050f69a9786f081509234f1a7f4684b5e5b76c900000000000000000000000000000000000000000000000000000000000000bc00000000000000000000000000000000000000000000000000000000000a6fe0",
        "nonce": 6283172,
        "type": 126,
        "network": null,
        "v": "0x0",
        "r": "0x0",
        "s": "0x0",
        "yParity": null,
        "transactionIndex": null,
        "accessList": null,
        "maxFeePerGas": null,
        "maxPriorityFeePerGas": null,
        "logs": []
      }
    ],
    "transactionsRoot": "0xb5bde09f63711b915471936e273ed18b8dc7d6038ce053fe629ae82a66133bff",
    "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 ](/ids/chain-ids.md)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](/ids/chain-ids.md)page for details. |

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

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

{% endtab %}

{% tab title="Sample Response" %}

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

{% 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 ](/ids/chain-ids.md)page for details.     |
| chainSymbol                               | String | Refer to the [Chain ID ](/ids/chain-ids.md)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=8453&address=0xCA6f5B49967B492FEE81cA9C92a63a98903DD965
```

{% endtab %}

{% tab title="Sample Response" %}

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

{% 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 ](/ids/chain-ids.md)page for details. |
| chainSymbol                                       | String | Refer to the [Chain ID ](/ids/chain-ids.md)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=8453&transactionHash=0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "8453",
    "hash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
    "transactionStatus": true,
    "blockNumber": "6283395",
    "timestamp": null,
    "from": "0x2c40a57BC2E05eBcd00C2c007097f838c7b3a115",
    "to": "0x10d16248bED1E0D0c7cF94fFD99A50c336c7Bcdc",
    "value": "264853642455711",
    "transactionFees": "27221958120",
    "gas": "545832",
    "gasPrice": "58632",
    "input": "0x2d62fc1a000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000034ac8b7d0000000000000000000000000000000000000000000000000000000034691f45000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e00002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000068c7abb8b1c3d1ce467e28265770f3a7ecf3265400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000142c40a57bc2e05ebcd00c2c007097f838c7b3a11500000000000000000000000000000000000000000000000000000000000000000000000000000000000000142c40a57bc2e05ebcd00c2c007097f838c7b3a115000000000000000000000000",
    "nonce": 7,
    "type": 2,
    "network": null,
    "v": "0x1",
    "r": "0xf5468f7b1dd4952216fbceb319e0881b38f9c5bf4ecac0471e21ba83d2e99477",
    "s": "0x3c993a5ff3b1bbb8315abd4550389c98e55048267c046456a5eea5c9df4cbf03",
    "yParity": "0x1",
    "transactionIndex": 4,
    "accessList": [],
    "maxFeePerGas": "58648",
    "maxPriorityFeePerGas": "58570",
    "logs": [
      {
        "address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
        "topics": [
          "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
          "0x0000000000000000000000002c40a57bc2e05ebcd00c2c007097f838c7b3a115",
          "0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 8,
        "removed": false,
        "id": "log_3d65fdd5"
      },
      {
        "address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x0000000000000000000000002c40a57bc2e05ebcd00c2c007097f838c7b3a115",
          "0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000034ac8b7d",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 9,
        "removed": false,
        "id": "log_ecc2fe08"
      },
      {
        "address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc",
          "0x00000000000000000000000068c7abb8b1c3d1ce467e28265770f3a7ecf32654"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 10,
        "removed": false,
        "id": "log_35fe1ff4"
      },
      {
        "address": "0x4c80E24119CFB836cdF0a6b53dc23F04F7e652CA",
        "topics": [
          "0x34660fc8af304464529f48a778e03d03e4d34bcd5f9b6f0cfbf3cd238c642f7f"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc0000000000000000000000000000000000000000000000000000000034a474440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000678f000000000000000000000000000000000000000000000000000000000007afaa0000000000000000000000000000000000000000000000000000000000000000",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 11,
        "removed": false,
        "id": "log_04e0e7eb"
      },
      {
        "address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x00000000000000000000000010d16248bed1e0d0c7cf94ffd99a50c336c7bcdc",
          "0x0000000000000000000000004c80e24119cfb836cdf0a6b53dc23f04f7e652ca"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000034ac8b7d",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 12,
        "removed": false,
        "id": "log_83b6c61f"
      },
      {
        "address": "0x4c80E24119CFB836cdF0a6b53dc23F04F7e652CA",
        "topics": [
          "0x6939f93e3f21cf1362eb17155b740277de5687dae9a83a85909fd71da95944e7"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000005d8f00000000000000000000000000000000000000000000000000000076387ba3c5",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 13,
        "removed": false,
        "id": "log_283af9eb"
      },
      {
        "address": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa",
        "topics": [
          "0xdf21c415b78ed2552cc9971249e32a053abce6087a0ae0fbf3f78db5174a3493"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000cb4c0d4e15a6",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 14,
        "removed": false,
        "id": "log_8ac52c14"
      },
      {
        "address": "0x38dE71124f7a447a01D67945a51eDcE9FF491251",
        "topics": [
          "0xb0c632f55f1e1b3b2c3d82f41ee4716bb4c00f0f5d84cdafc141581bb8757a4f"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000002ab98000000000000000000000000000000000000000000000000000000000000",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 15,
        "removed": false,
        "id": "log_2633890d"
      },
      {
        "address": "0xD56e4eAb23cb81f43168F9F45211Eb027b9aC7cc",
        "topics": [
          "0x87e46b0a6199bc734632187269a103c05714ee0adae5b28f30723955724f37ef"
        ],
        "data": "0x00000000000000000000000000000000000000000000000000000faffcf2285f",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 16,
        "removed": false,
        "id": "log_d4bdabd1"
      },
      {
        "address": "0x38dE71124f7a447a01D67945a51eDcE9FF491251",
        "topics": [
          "0xe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002540000000000007b6100b8af54be5b6eec24d6bfacf1cce4eaf680a8239398006a9d1b1669c73b033dfe47ae5a0164ab96df25b94400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005d8f00000000000000000000000000000000000000000000000000000076387ba3c50000000000000000000000000000000000000000000000000000000034a47444000000000000000000000000000000000000000000000000000000000000678f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007afaa0000000000000000000000000000000000000000000000000000000034ac8b7d00000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000142c40a57bc2e05ebcd00c2c007097f838c7b3a1150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 17,
        "removed": false,
        "id": "log_b81b4bc3"
      },
      {
        "address": "0xAF54BE5B6eEc24d6BFACf1cce4eaF680A8239398",
        "topics": [
          "0x8d3ee0df6a4b7e82a7f20a763f1c6826e6176323e655af64f32318827d2112d4"
        ],
        "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000007b61",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 18,
        "removed": false,
        "id": "log_683a516c"
      },
      {
        "address": "0x10d16248bED1E0D0c7cF94fFD99A50c336c7Bcdc",
        "topics": [
          "0xe005092a469280dafcad91e38921cc6f96eac91d73413489fd8719634163345e",
          "0x0002000000000000000000000000000000000000000000000000000000000000"
        ],
        "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "blockNumber": 6283395,
        "transactionHash": "0xcf15634c154cb70b8e02268eedd58d4949312414f796ca3296eebe07dc94ffb4",
        "transactionIndex": 4,
        "blockHash": "0xfe8efe5b0571ba47ca724c65d3ca69a35fe2c521cd9e726701548e027c4b2493",
        "logIndex": 19,
        "removed": false,
        "id": "log_eeaf2cff"
      }
    ]
  }
}
```

{% 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

<table><thead><tr><th width="167">Name</th><th width="112">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>chainId</td><td>String</td><td>Refer to the <a href="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details.</td></tr><tr><td>chainSymbol</td><td>String</td><td>Refer to the <a href="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details.</td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>Public addess of the user.</td></tr><tr><td>tokens</td><td>String</td><td>Comma-separated value of ERC-20 tokens to get value of. Maximum 10 at a time.</td></tr><tr><td>pageToken</td><td>String</td><td>Present at the end of a lengthy response to fetch the next page.</td></tr><tr><td>assetType</td><td>String</td><td><code>fungible</code>/<code>nonFungible</code> standard choice.  <br>By default, <code>all</code>.</td></tr><tr><td>timestamp</td><td>String</td><td>The Timestamp of the block number up to which the balances will be fetched.<br>Note-Only applicable for assetType <code>fungible</code></td></tr><tr><td>blockNumber</td><td>String</td><td>The block number up to which the balances will be fetched.<br>Note-Only applicable for assetType <code>fungible</code></td></tr><tr><td>include24hrChange</td><td>Boolean</td><td>If <code>true</code>return the token data with 24-hour changes.<br>By default, <code>false</code></td></tr></tbody></table>

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

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

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "3975672043073686",
        "evmTokens": [
            {
                "name": "The Doge NFT",
                "symbol": "DOG",
                "decimals": "18",
                "address": "0xafb89a09d82fbde58f18ac6437b3fc81724e4df6",
                "balance": "10000000000000000000",
                "assetType": "ERC20",
                "USDPrice": "0.013040102445834898"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### **/getusertransactions**

Get the historical transaction details for a specific user address.&#x20;

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

#### Query Parameters

<table><thead><tr><th width="175">Name</th><th width="109">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>chainId</td><td>String</td><td>Refer to the <a href="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details.</td></tr><tr><td>chainSymbol</td><td>String</td><td>Refer to the <a href="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details. </td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>The public address of the user.</td></tr><tr><td>pageToken</td><td>String</td><td>The page cursor present at the top to fetch the next page.</td></tr><tr><td>pageSize</td><td>String</td><td>The page size. <br>By Default 30 and Max 100</td></tr><tr><td>sortOrder</td><td>String</td><td>The transaction sorting order. <br>asc or desc. <br>By default, desc.</td></tr><tr><td>startBlock</td><td>String</td><td>The starting block number from which to get the transactions.<br>By default, the Genesis block</td></tr><tr><td>endBlock</td><td>String</td><td>The ending block number from which to get the transactions<br>By default, the current block</td></tr><tr><td>fromTimestamp</td><td>String</td><td>The start date from which to get the transactions ( format in seconds or date string )<br>Note-If 'fromTimestamp' and 'startBlock' are provided, 'startBlock' will be used.<br>By default, the Genesis block timestamp</td></tr><tr><td>toTimestamp</td><td>String</td><td><p>The end date from which to get the transactions ( format in seconds or date string )<br>Note- If 'toTimestamp' and 'endBlock' are provided, 'endBlock' will be used.</p><p>By default, the current block timestamp</p></td></tr></tbody></table>

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

```url
https://historicallp.api.expand.network/chain/getusertransactions?pageSize=5&address=0xF977814e90dA44bFA03b6295A0616a897441aceC&chainId=8453
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "nextPageToken": "eyJhbGciOiJIUzI1NiJ9.eyJ0YWJsZUluZGV4IjowLCJsYXN0RXZhbHVhdGVkS2V5Ijp7IndhbGxldEFkZHJlc3MiOiIweGY5Nzc4MTRlOTBkYTQ0YmZhMDNiNjI5NWEwNjE2YTg5NzQ0MWFjZWMiLCJ0aW1lc3RhbXBfYmxvY2tOdW1iZXJfdHhJbmRleCI6IjAwMDAwMDE3MzI5Nzc4NjkwMDAyMzA5NDI2MTAwMDYzIn0sInBhZ2VOdW1iZXIiOjAsImtleUNvbmRpdGlvbkV4cHJlc3Npb24iOnsid2FsbGV0QWRkcmVzcyI6eyJlcSI6IjB4Zjk3NzgxNGU5MGRhNDRiZmEwM2I2Mjk1YTA2MTZhODk3NDQxYWNlYyJ9LCJ0aW1lc3RhbXBfYmxvY2tOdW1iZXJfdHhJbmRleCI6eyJiZXR3ZWVuIjpbIjAwMDAwMDE2ODY3ODkzNDcwMDAwMDAwMDAwMDAwMDAwIiwiMDAwMDAwMTczMzA0MDc0NTAwMDAwMDAwMDAwOTk5OTkiXX19LCJsaW1pdCI6IjUiLCJvcmRlciI6ImRlc2NlbmRpbmcifQ.YMgDx4OjdzQjN6TslYNrzUqYiKUJjyyn3w4nqUXvINU",
        "pageSize": "5",
        "transactions": [
            {
                "hash": "0xc8f36c00ff0ae6022cee08974abbc2cb0f4c2528566ae02a9ce8c8e019db9229",
                "nonce": "157",
                "transaction_index": "56",
                "from_address_entity": null,
                "from_address_entity_logo": null,
                "from_address": "0xe80ec33a43c5d4b02b56677a0b1590b0dffe7e0d",
                "from_address_label": null,
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                "to_address_label": null,
                "value": "0",
                "gas": "6203802",
                "gas_price": "38018238",
                "receipt_cumulative_gas_used": "14926055",
                "receipt_gas_used": "6153795",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-11-30T17:58:39.000Z",
                "block_number": "23100086",
                "block_hash": "0x01e2f9b98b663680156e1ff5792be3efe16eabff8b1956e47af09bb458f73ced",
                "transaction_fee": "0.000407927698305152",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [
                    {
                        "token_name": "SIMMI",
                        "token_symbol": "SIMMI",
                        "token_decimals": "8",
                        "from_address_entity": null,
                        "from_address_entity_logo": null,
                        "from_address": "0xec43bb90fe51c9fb1c9fa3e0913c7dd33f4a8cfd",
                        "from_address_label": null,
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
                        "to_address_label": null,
                        "address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                        "log_index": 966,
                        "value": "91007200000000000",
                        "possible_spam": false,
                        "verified_contract": false,
                        "security_score": null,
                        "direction": "receive",
                        "value_formatted": "910072000"
                    }
                ],
                "native_transfers": [],
                "summary": "Received 910,072,000 SIMMI from 0xec...8cfd",
                "possible_spam": false,
                "category": "token receive",
                "internal_transactions": []
            },
            {
                "hash": "0x7620969f76f506e74d41fadc2a28e193fc0e370f171479c2af89e80aa3573e33",
                "nonce": "154",
                "transaction_index": "94",
                "from_address_entity": null,
                "from_address_entity_logo": null,
                "from_address": "0xe80ec33a43c5d4b02b56677a0b1590b0dffe7e0d",
                "from_address_label": null,
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                "to_address_label": null,
                "value": "0",
                "gas": "4868766",
                "gas_price": "66892072",
                "receipt_cumulative_gas_used": "23762782",
                "receipt_gas_used": "4829271",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-11-30T16:00:11.000Z",
                "block_number": "23096532",
                "block_hash": "0x73701d8f063e432eecd2b5527b697957a8b5a2e1e787705cae3ee7afcb29afbc",
                "transaction_fee": "0.001100532770970039",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [
                    {
                        "token_name": "SIMMI",
                        "token_symbol": "SIMMI",
                        "token_decimals": "8",
                        "from_address_entity": null,
                        "from_address_entity_logo": null,
                        "from_address": "0xec43bb90fe51c9fb1c9fa3e0913c7dd33f4a8cfd",
                        "from_address_label": null,
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
                        "to_address_label": null,
                        "address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                        "log_index": 1298,
                        "value": "103118000000000000",
                        "possible_spam": false,
                        "verified_contract": false,
                        "security_score": null,
                        "direction": "receive",
                        "value_formatted": "1031180000"
                    }
                ],
                "native_transfers": [],
                "summary": "Received 1,031,180,000 SIMMI from 0xec...8cfd",
                "possible_spam": false,
                "category": "token receive",
                "internal_transactions": []
            },
            {
                "hash": "0xe23deb8e7b5732d7565cef064f98791d35eafff62d8d98caa1dacb563300df38",
                "nonce": "116",
                "transaction_index": "67",
                "from_address_entity": null,
                "from_address_entity_logo": null,
                "from_address": "0xe80ec33a43c5d4b02b56677a0b1590b0dffe7e0d",
                "from_address_label": null,
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                "to_address_label": null,
                "value": "0",
                "gas": "1743852",
                "gas_price": "59185231",
                "receipt_cumulative_gas_used": "12903500",
                "receipt_gas_used": "1728963",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-11-30T15:21:19.000Z",
                "block_number": "23095366",
                "block_hash": "0x3cfca9b2ff45a3c008b3220120745a82f5727bd4fc979e68e6463526dafb20bd",
                "transaction_fee": "0.000290034255052147",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [
                    {
                        "token_name": "SIMMI",
                        "token_symbol": "SIMMI",
                        "token_decimals": "8",
                        "from_address_entity": null,
                        "from_address_entity_logo": null,
                        "from_address": "0xec43bb90fe51c9fb1c9fa3e0913c7dd33f4a8cfd",
                        "from_address_label": null,
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
                        "to_address_label": null,
                        "address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                        "log_index": 388,
                        "value": "118244000000000000",
                        "possible_spam": false,
                        "verified_contract": false,
                        "security_score": null,
                        "direction": "receive",
                        "value_formatted": "1182440000"
                    }
                ],
                "native_transfers": [],
                "summary": "Received 1,182,440,000 SIMMI from 0xec...8cfd",
                "possible_spam": false,
                "category": "token receive",
                "internal_transactions": []
            },
            {
                "hash": "0xcbe72850efc21f0ce259afd6cbd5847fa53154abb39034e14d78cced1eeb6a86",
                "nonce": "105",
                "transaction_index": "59",
                "from_address_entity": null,
                "from_address_entity_logo": null,
                "from_address": "0xe80ec33a43c5d4b02b56677a0b1590b0dffe7e0d",
                "from_address_label": null,
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                "to_address_label": null,
                "value": "0",
                "gas": "2192525",
                "gas_price": "35377985",
                "receipt_cumulative_gas_used": "11223095",
                "receipt_gas_used": "2174103",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-11-30T14:44:37.000Z",
                "block_number": "23094265",
                "block_hash": "0x25719e59a58b0cbc55e768bc4296d538f657f8722361c692049df07c29d2b3f0",
                "transaction_fee": "0.000275900410927471",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [
                    {
                        "token_name": "SIMMI",
                        "token_symbol": "SIMMI",
                        "token_decimals": "8",
                        "from_address_entity": null,
                        "from_address_entity_logo": null,
                        "from_address": "0xec43bb90fe51c9fb1c9fa3e0913c7dd33f4a8cfd",
                        "from_address_label": null,
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
                        "to_address_label": null,
                        "address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                        "log_index": 536,
                        "value": "118244000000000000",
                        "possible_spam": false,
                        "verified_contract": false,
                        "security_score": null,
                        "direction": "receive",
                        "value_formatted": "1182440000"
                    }
                ],
                "native_transfers": [],
                "summary": "Received 1,182,440,000 SIMMI from 0xec...8cfd",
                "possible_spam": false,
                "category": "token receive",
                "internal_transactions": []
            },
            {
                "hash": "0x7159f4d7a5096837b164d063c86b18f1fe2f5655d73cc5246ec6e39e15b4846a",
                "nonce": "104",
                "transaction_index": "63",
                "from_address_entity": null,
                "from_address_entity_logo": null,
                "from_address": "0xe80ec33a43c5d4b02b56677a0b1590b0dffe7e0d",
                "from_address_label": null,
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                "to_address_label": null,
                "value": "0",
                "gas": "2192525",
                "gas_price": "35358993",
                "receipt_cumulative_gas_used": "14834078",
                "receipt_gas_used": "2174103",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-11-30T14:44:29.000Z",
                "block_number": "23094261",
                "block_hash": "0x08448881039bdad4ef857930f4f78a9877e27ac5e4e326f7704a757cfcbe4ac7",
                "transaction_fee": "0.000275859120363295",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [
                    {
                        "token_name": "SIMMI",
                        "token_symbol": "SIMMI",
                        "token_decimals": "8",
                        "from_address_entity": null,
                        "from_address_entity_logo": null,
                        "from_address": "0xec43bb90fe51c9fb1c9fa3e0913c7dd33f4a8cfd",
                        "from_address_label": null,
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
                        "to_address_label": null,
                        "address": "0x3a02b900afb60d7b9e54f614acb9682bf3a865b2",
                        "log_index": 603,
                        "value": "118244000000000000",
                        "possible_spam": false,
                        "verified_contract": false,
                        "security_score": null,
                        "direction": "receive",
                        "value_formatted": "1182440000"
                    }
                ],
                "native_transfers": [],
                "summary": "Received 1,182,440,000 SIMMI from 0xec...8cfd",
                "possible_spam": false,
                "category": "token receive",
                "internal_transactions": []
            }
        ]
    }
}
```

{% 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 ](/ids/chain-ids.md)page for details.   |
| chainSymbol                                      | String | Refer to the [Chain ID ](/ids/chain-ids.md)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": "8453",
    "rawTransaction": "0xf86a80830f4272830a3d8794a67e9b68c41b0f26184d64c26e0b2b81466e5994843b9aca00808302948ca0e073bcaa02ab49f019278be707e3e50433ac7ae6107649a8b1cbdbc368e9482ea05ba36d559c5b70ffa289f90a572adc0863c46fdd067c40c2f37b9ea666fcc8e7"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "8453",
        "transactionHash": "0x2e5309f53a8c11841afc88c12c099e5c5c59271379fa3cc65df863fa18a64a60" 
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.expand.network/integrations/blockchains/evm-based-blockchains/base.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
