# Avalanche - C

### /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="168">Name</th><th width="99">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="../../../ids/chain-ids">Chain ID </a>page for details. </td></tr><tr><td>chainSymbol</td><td>String</td><td>Refer to the <a href="../../../ids/chain-ids">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=43114&blockNumber=46286930&address=0x555CE236C0220695b68341bc48C68d52210cC35b&tokenAddress=0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E
```

{% endtab %}

{% tab title="Sample Response" %}

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

{% 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 ](https://docs.expand.network/ids/chain-ids)page for details.                                              |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)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 | <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" %}

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

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "status": 200,
  "msg": "success",
  "data": {
    "blocks": [
      {
        "blockExtraData": "0x",
        "difficulty": "1",
        "extDataHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "extraData": "0xd883010916846765746888676f312e31352e35856c696e75780c856f1a19acb66a35be8afd8e0eb52b6ba956dcc1be47b3ff08e1994c531ac1",
        "gasLimit": 8000000,
        "gasUsed": 32113,
        "hash": "0x1b2ff9eb4347a8754f145963b4392e74b16331259ca4759e619d666c9c481183",
        "logsBloom": "0x00000000000000000000000000000000000100000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000008000001000000000000000000000000000000000000000000000000000000000000000000000080000000000000000010000000000000000000000400000000000000000000000000000000000000000004000000000000001000000000000000000000000000000000000000000000000000000000000002000000000001000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000",
        "miner": "0x0100000000000000000000000000000000000000",
        "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "0x0000000000000000",
        "number": 19001,
        "parentHash": "0xd93375ff4142bf28fb839c4273c4dfda813c1052fbe4bce09d99f85b3397d52d",
        "receiptsRoot": "0x0989ba3b91aa784d6e95d44b4f855e085b6e25e775442a1479fb4d85d53d375e",
        "size": 782,
        "timestamp": 1609456476,
        "totalDifficulty": "19001",
        "transactions": [
          {
            "chainId": "43114",
            "hash": "0x6dc7c9e23547cda2eb15b666201c8faa250091e3822345449a00d43ebc07db89",
            "transactionStatus": true,
            "blockNumber": "19001",
            "timestamp": null,
            "from": "0xaE7c8d805d05aCE4E05B93B6359AdD421E325C33",
            "to": "0xcB65daD78320a8d15Ad8a88001324e4e163ca534",
            "value": "0",
            "transactionFees": "15093110000000000",
            "gas": "32113",
            "gasPrice": "470000000000",
            "input": "0xa9059cbb00000000000000000000000077c31cd409fce1984abe6f23743bf6046de4b9e00000000000000000000000000000000000000000000000000000000000000fff",
            "nonce": 4512,
            "type": null,
            "network": null,
            "v": "0x150f8",
            "r": "0xddd6689404f35066dbed919d1ceca65673d6b66ab40e2127cd99d8b6e8d36a8a",
            "s": "0x459bb80f8b3ad1245a97094f4c8c39554e0473e20f6db5182ba8a94a4aef29ad",
            "yParity": null,
            "transactionIndex": null,
            "accessList": null,
            "maxFeePerGas": null,
            "maxPriorityFeePerGas": null,
            "logs": [
              {
                "address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "topics": [
                  "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                  "0x0000000000000000000000008f66c4ae756bebc49ec8b81966dd8bba9f127549",
                  "0x00000000000000000000000093606829ceeabff5d3234fdb2968be03174c9c24"
                ],
                "data": "0x000000000000000000000000000000000000000000000000000000003b654402",
                "blockNumber": 45551810,
                "transactionHash": "0x30c4f7b1f927560f2d7faae4604c3c193005637897fa44a90df6497121bb4c8d",
                "transactionIndex": 0,
                "blockHash": "0xa1860cc85b126e928736972760941a68dbdabfc6187379f59287bbaa82a7818e",
                "logIndex": 0,
                "removed": false,
                "id": "log_08da991b"
              }
            ]
          }
        ],
        "transactionsRoot": "0x8ca037a0dad66bafb827fb455e82244ae83dd362dd7e120775f026b0234db7fc",
        "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/ids/chain-ids)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |

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

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

{% endtab %}

{% tab title="Sample Response" %}

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

{% 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/ids/chain-ids)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)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=43114&address=0x919dF3aDbF5cfC9fcfd43198EDFe5aA5561CB456
```

{% endtab %}

{% tab title="Sample Response" %}

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

{% 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/ids/chain-ids)page for details. |
| chainSymbol                                       | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| transactionHash<mark style="color:red;">\*</mark> | String | The transaction hash.                                                                |

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

```
https://api.expand.network/chain/gettransaction?chainId=43114&transactionHash=0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "43114",
    "hash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
    "transactionStatus": true,
    "blockNumber": "33133735",
    "timestamp": null,
    "from": "0x23b64B4792a8EE4501Ae43357c36703457AA40C8",
    "to": "0xD85b5E176A30EdD1915D6728FaeBD25669b60d8b",
    "value": "40383985111293828",
    "transactionFees": "11617575000000000",
    "gas": "534681",
    "gasPrice": "25000000000",
    "input": "0xe55856660000000000000000000000000000000000000000000000000000000000000004000000000000000000000000ca9c40c8690e816482ccafe8b1eae460ba4c8ea7000000000000000000000000000000000000000000000000000000000003ca550000000000000000000000000000000000000000000000000000004089b07fa200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000023b64b4792a8ee4501ae43357c36703457aa40c800000000000000000000000023b64b4792a8ee4501ae43357c36703457aa40c80000000000000000000000000000000000000000000000000000000000000001",
    "nonce": 55,
    "type": 2,
    "network": null,
    "v": "0x0",
    "r": "0x2cd55ee7c5ebb08f55ed0f3bc80b1223a4fdd6a80846b1b2cee2ca75bed1875c",
    "s": "0x62ec6bec8f723b62ad399142aaaa964072e8c864008ff990a83f84027ce0c871",
    "yParity": null,
    "transactionIndex": 8,
    "accessList": [],
    "maxFeePerGas": "31250000000",
    "maxPriorityFeePerGas": "0",
    "logs": [
      {
        "address": "0xcA9c40C8690e816482cCafE8b1eaE460bA4C8ea7",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0x",
        "logIndex": 31,
        "removed": false,
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x00000000000000000000000023b64b4792a8ee4501ae43357c36703457aa40c8",
          "0x0000000000000000000000000000000000000000000000000000000000000000",
          "0x0000000000000000000000000000000000000000000000000000000000000001"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_b55815f5"
      },
      {
        "address": "0x9c120F9281308D71C838F8FADB41a82Bfc7ffFEF",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080351b8d13789e4d8d2717631559251955685881a31494dd0b8b19b4ef8530bb6d00000000000000000000000023b64b4792a8ee4501ae43357c36703457aa40c800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        "logIndex": 32,
        "removed": false,
        "topics": [
          "0xb4d3a3f85e85fdbd1d39f939d8c75355ec33ef437522432fe1a7b8b20bb4fab4",
          "0x000000000000000000000000ca9c40c8690e816482ccafe8b1eae460ba4c8ea7"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_56a65a89"
      },
      {
        "address": "0xCD2E3622d483C7Dc855F72e5eafAdCD577ac78B4",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0x000000000000000000000000000000000000000000000000005795cbf46629d6",
        "logIndex": 33,
        "removed": false,
        "topics": [
          "0xdf21c415b78ed2552cc9971249e32a053abce6087a0ae0fbf3f78db5174a3493"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_9ae24065"
      },
      {
        "address": "0x4D73AdB72bC3DD368966edD0f0b2148401A178E2",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000220001000000000000000000000000000000000000000000000000000000000001f5f4000000000000000000000000000000000000000000000000000000000000",
        "logIndex": 34,
        "removed": false,
        "topics": [
          "0xb0c632f55f1e1b3b2c3d82f41ee4716bb4c00f0f5d84cdafc141581bb8757a4f"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_7540523d"
      },
      {
        "address": "0x5a54fe5234E811466D5366846283323c954310B2",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0x000000000000000000000000000000000000000000000000000000000000006d0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000006f484eacd997d9880205af22f6a4881ea0e1ccd70000000000000000000000000000000000000000000000000001aae2afd8acce",
        "logIndex": 35,
        "removed": false,
        "topics": [
          "0x4e41ee13e03cd5e0446487b524fdc48af6acf26c074dacdbdfb6b574b42c8146"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_3c26e2ce"
      },
      {
        "address": "0x4D73AdB72bC3DD368966edD0f0b2148401A178E2",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003180000000000012b60006a6f484eacd997d9880205af22f6a4881ea0e1ccd7006d6f484eacd997d9880205af22f6a4881ea0e1ccd716f1be70000000000000000000000000000000000000000000000000000000000003e3d40000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ca9c40c8690e816482ccafe8b1eae460ba4c8ea70000000000000000000000007692f71caa72985ca81f395c9b1e0ccbd48445950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001925cb010db48c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000018000000000000000000000000023b64b4792a8ee4501ae43357c36703457aa40c800000000000000000000000023b64b4792a8ee4501ae43357c36703457aa40c80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000007f73742e6465706f73697470686f746f732e636f6d2f323230383332302f323239372f762f3338302f6465706f73697470686f746f735f32323937383235342d73746f636b2d696c6c757374726174696f6e2d6f6e652d626c75652d706c616e65742d64650000000000000000000000009c120f9281308d71c838f8fadb41a82b000000000000000000000000000000000000000000000000000000000003ca550000000000000000000000000000000000000000000000000000004089b07fa20000000000000000",
        "logIndex": 36,
        "removed": false,
        "topics": [
          "0xe9bded5f24a4168e4f3bf44e00298c993b22376aad8c58c7dda9718a54cbea82"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_4164def0"
      },
      {
        "address": "0xE8303f9b7d7a3DE35F8c9B4405411c5EbfaF4c2c",
        "blockHash": "0xfa61ebd3800c4727e03a3afa9013c632695fbbb6a59cf2c6a2607c770745c7d0",
        "blockNumber": 33133735,
        "data": "0xf6e9b414bdd7ebfb577c7ae88654ffeb9e95d5844f9391dde84610d1267e0ecb",
        "logIndex": 37,
        "removed": false,
        "topics": [
          "0x0f5759b4182507dcfc771071166f98d7ca331262e5134eaa74b676adce2138b7"
        ],
        "transactionHash": "0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143",
        "transactionIndex": 8,
        "id": "log_db46b75f"
      }
    ]
  }
}
```

{% 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="../../../ids/chain-ids">Chain ID </a>page for details.</td></tr><tr><td>chainSymbol</td><td>String</td><td>Refer to the <a href="../../../ids/chain-ids">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=43114&address=0x341dc441D0540166A26b98d1960DD2f997e378eA&availableOnly=true
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "183750000000000",
        "evmTokens": [
            {
                "name": "Lava Degen ID",
                "symbol": "SDD",
                "decimals": "0",
                "address": "0xb8ee8ce133100033b1bdd03cb4cc2bdebf781b6d",
                "balance": "1",
                "assetType": "ERC721",
                "tokenId": "4227"
            }
        ]
    }
}
```

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

| 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/ids/chain-ids)page for details. |
| chainSymbol                               | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)page for details. |
| address<mark style="color:red;">\*</mark> | 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 | <p>The transaction sorting order. <br>asc or desc.</p>                               |

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

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

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "transactions": [
            {
                "nativeTransaction": {
                    "blockNumber": "37838218",
                    "blockIndex": 1,
                    "blockHash": "0xa90a9fae3b80de5ada2baa9313d5f22a36f9bcac4ab85e926d5af53f0017bea9",
                    "txHash": "0x54852168aec81e25228077a05ccb2717a102df5ddac44a9148323bd557a5a92e",
                    "txStatus": "1",
                    "txType": 2,
                    "gasLimit": "300000",
                    "gasUsed": "133593",
                    "gasPrice": "81000000000",
                    "nonce": "4249",
                    "blockTimestamp": 1700136217,
                    "from": {
                        "address": "0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979"
                    },
                    "to": {
                        "address": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4"
                    },
                    "method": {
                        "callType": "CONTRACT_CALL",
                        "methodHash": "0x8a657e67",
                        "methodName": "swapAVAXForExactTokens(uint256,address[],address,uint256)"
                    },
                    "value": "1640955933498300000"
                },
                "erc20Transfers": [
                    {
                        "from": {
                            "address": "0xCDFD91eEa657cc2701117fe9711C9a4F61FEED23"
                        },
                        "to": {
                            "address": "0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979"
                        },
                        "logIndex": 6,
                        "value": "1623065279150000000000",
                        "erc20Token": {
                            "ercType": "ERC-20",
                            "address": "0x22d4002028f537599bE9f666d1c4Fa138522f9c8",
                            "name": "Platypus",
                            "symbol": "PTP",
                            "decimals": 18,
                            "logoUri": "https://images.ctfassets.net/gcj8jwzm6086/06600fa5-b70b-48c7-a3bb-437d70952216/fa231762bdbc2c0b391f885d89e32d02/43114-0x22d4002028f537599bE9f666d1c4Fa138522f9c8.png",
                            "price": {
                                "value": 0.014573,
                                "currencyCode": "usd"
                            }
                        }
                    }
                ],
                "internalTransactions": [
                    {
                        "from": {
                            "address": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4"
                        },
                        "to": {
                            "address": "0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979"
                        },
                        "internalTxType": "CALL",
                        "value": "102213470370951213",
                        "isReverted": false,
                        "gasUsed": "0",
                        "gasLimit": "164253"
                    }
                ]
            }
        ]
    }
}
```

{% 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/ids/chain-ids)page for details. |
| chainSymbol                                      | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)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" : "43114",
    "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId" : "43114",
        "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/ids/chain-ids)page for details. By default, Ethereum. |
| chainSymbol                                      | String | Refer to the [Chain ID ](https://docs.expand.network/ids/chain-ids)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": "43114",
    "rawTransaction": "0xf86c808505d21dba00830a3d8794f73ee0e06a1b8ec3a7ff860d766e75f3eea7b985843b9aca0080830150f7a084e67381cbe0ef549cba454b7b252b324cc5d7a05be4e67a8f8242e71ec0bc39a07cd18e29ccc04a5cc34c886a8df02400c5432341a99559fcaed8bad622450b70"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "parsedTx": {
            "nonce": 0,
            "gasPrice": {
                "type": "BigNumber",
                "hex": "0x05d21dba00"
            },
            "gasLimit": {
                "type": "BigNumber",
                "hex": "0x0a3d87"
            },
            "to": "0xF73eE0e06a1B8Ec3A7Ff860D766E75f3EEA7b985",
            "value": {
                "type": "BigNumber",
                "hex": "0x3b9aca00"
            },
            "data": "0x",
            "chainId": 43114,
            "v": 86263,
            "r": "0x84e67381cbe0ef549cba454b7b252b324cc5d7a05be4e67a8f8242e71ec0bc39",
            "s": "0x7cd18e29ccc04a5cc34c886a8df02400c5432341a99559fcaed8bad622450b70",
            "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "hash": "0x9a0f46a0d7adbfc10fa6eb0bf6b625472f59d02ebc1288f64f50ec4bb005c1ba",
            "type": null
        },
        "assetChanges": {
            "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "to": "0xF73eE0e06a1B8Ec3A7Ff860D766E75f3EEA7b985",
            "value": {
                "type": "BigNumber",
                "hex": "0x3b9aca00"
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}
