# Optimism

### /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="181">Name</th><th width="108">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=10&blockNumber=121941909&address=0xacD03D601e5bB1B275Bb94076fF46ED9D753435A&tokenAddress=0x94b008aA00579c1307B0EF2c499aD98a8ce58e58
```

{% endtab %}

{% tab title="Sample Response" %}

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

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

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

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "status": 200,
  "msg": "success",
  "data": {
    "blocks": [
      {
        "baseFeePerGas": 5099625,
        "blobGasUsed": "0x0",
        "difficulty": "0",
        "excessBlobGas": "0x0",
        "extraData": "0x",
        "gasLimit": 30000000,
        "gasUsed": 3592084,
        "hash": "0xa20276b3686a11527ba0a4adc533142455eba720143055f91f6ebbcd6bcfa106",
        "logsBloom": "0x06216282224000004549a08000000492000848080000028020044400012001310400088408c60001e004c01120100000a045005004082042a56141c40220c98002c048084800081a1800200cc00110015085000002708088104a00c0a0a04080260525018205004600a0108080004801020018821200144102105198000914218c030004000c10464d4802090010210022411201a8b30801000000102200810a1380020650004b20309044440d001402044840000068011180000095241000a04000980201800c0002a0a26640008000020088502080828481100206b834704016308109024200014094048000003100000110000012a8442000040800010001",
        "miner": "0x4200000000000000000000000000000000000011",
        "mixHash": "0x33d851fb401e6d210339e03f0c78b78a82e964ebab318d3339559b8df42671a0",
        "nonce": "0x0000000000000000",
        "number": 120176435,
        "parentBeaconBlockRoot": "0x7827f91de909daa000e52825679cbc06dbcf7072b4a8ab68b54cbb6d0dcec42e",
        "parentHash": "0x1fa37c3ac8d773edc1a34db90392209dd1d6db946838ec228e49cfa94e27c1e4",
        "receiptsRoot": "0x01002939a3817612c1358ffe9ad2717cf601b05f92e933317734e3747cabdfd8",
        "size": 9790,
        "timestamp": 1715951647,
        "totalDifficulty": "210470125",
        "transactions": [
          {
            "chainId": "10",
            "hash": "0x42ec283b0645b4baf8d51d12367166d5deee083a17337a10030d16fa1bd3cf01",
            "transactionStatus": true,
            "blockNumber": "120176435",
            "timestamp": null,
            "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
            "to": "0x4200000000000000000000000000000000000015",
            "value": "0",
            "transactionFees": "0",
            "gas": "1000000",
            "gasPrice": "0",
            "input": "0x440a5e2000000558000c5fc5000000000000000100000000664757cf00000000012f7ef800000000000000000000000000000000000000000000000000000001af3d359f0000000000000000000000000000000000000000000000000000000000000001e7d237613847583de24917e06316788eb50ffbd5481897a62d33af2d4280acfe0000000000000000000000006887246668a3b87f54deb3b94ba47a6f63f32985",
            "nonce": 14941372,
            "type": 126,
            "network": null,
            "v": "0x0",
            "r": "0x0",
            "s": "0x0",
            "yParity": null,
            "transactionIndex": null,
            "accessList": null,
            "maxFeePerGas": null,
            "maxPriorityFeePerGas": null,
            "logs": []
          }
        ]
      }
    ],
    "transactionsRoot": "0xc779fb506d30f19350f3f70015266c99d9e5da669f448adb0c8d6e00e7145c8c",
    "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" %}

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

{% endtab %}

{% tab title="Sample Response" %}

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

{% 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=10&address=0x5470EA9f962D138229043F903b96E083484A6330
```

{% endtab %}

{% tab title="Sample Response" %}

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

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

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

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "10",
    "hash": "0xda0dd3b42e45d85ddb470cab146bbc957ee0eb5a6c95ab9996b6c3a1868b0082",
    "transactionStatus": true,
    "blockNumber": "71563515",
    "timestamp": null,
    "from": "0x6Af9Fed62bb9011A12cB8AA69e771c1BD0AD988E",
    "to": "0x5470EA9f962D138229043F903b96E083484A6330",
    "value": "0",
    "transactionFees": "155081000000",
    "gas": "164014",
    "gasPrice": "1000000",
    "input": "0xb6b55f25000000000000000000000000000000000000000000000005be07ce1fc37bd490",
    "nonce": 91,
    "type": null,
    "network": null,
    "v": "0x37",
    "r": "0xaa5d462ea82810d8b4a25c9c4bde5f4227129ce76320661e2923d924b887d987",
    "s": "0x60673ae3d96c8128e665a551fa677f922dc7d7e5bf46417ad012810ecd40ff0a",
    "yParity": null,
    "transactionIndex": null,
    "accessList": null,
    "maxFeePerGas": null,
    "maxPriorityFeePerGas": null,
    "logs": [
      {
        "address": "0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9",
        "blockHash": "0x023ce51c258329572f4c38e3506f292f5a89d7022d2d2f9a757acd7b77ea5713",
        "blockNumber": 71563515,
        "data": "0x000000000000000000000000000000000000000000000005be07ce1fc37bd490",
        "logIndex": 0,
        "removed": false,
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x0000000000000000000000006af9fed62bb9011a12cb8aa69e771c1bd0ad988e",
          "0x0000000000000000000000005470ea9f962d138229043f903b96e083484a6330"
        ],
        "transactionHash": "0xda0dd3b42e45d85ddb470cab146bbc957ee0eb5a6c95ab9996b6c3a1868b0082",
        "transactionIndex": 0,
        "id": "log_826bee00"
      },
      {
        "address": "0x5470EA9f962D138229043F903b96E083484A6330",
        "blockHash": "0x023ce51c258329572f4c38e3506f292f5a89d7022d2d2f9a757acd7b77ea5713",
        "blockNumber": 71563515,
        "data": "0x000000000000000000000000000000000000000000000005be07ce1fc37bd490",
        "logIndex": 1,
        "removed": false,
        "topics": [
          "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c",
          "0x0000000000000000000000006af9fed62bb9011a12cb8aa69e771c1bd0ad988e"
        ],
        "transactionHash": "0xda0dd3b42e45d85ddb470cab146bbc957ee0eb5a6c95ab9996b6c3a1868b0082",
        "transactionIndex": 0,
        "id": "log_baae694e"
      }
    ]
  }
}
```

{% 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=10&address=0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001&availableOnly=true
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "0",
        "evmTokens": [
            {
                "name": "$FLOKI AIRDROP AT flokicrypto.xyz",
                "symbol": "$FLOKI",
                "decimals": "0",
                "address": "0x0b0556f2604431e78f5aca455c6de70078c681c7",
                "balance": "1",
                "assetType": "ERC1155",
                "tokenId": "0"
            },
            {
                "name": "FLOKI AIRDROP AT floki-crypto.online",
                "symbol": "$FLOKI",
                "decimals": "0",
                "address": "0xba3991734d633e9e6ac71139537518abc50a23f0",
                "balance": "4",
                "assetType": "ERC1155",
                "tokenId": "1"
            },
            {
                "name": "Omnichain Adventures",
                "symbol": "OMNIA",
                "decimals": "0",
                "address": "0xd12999440402d30f69e282d45081999412013844",
                "balance": "1",
                "assetType": "ERC721",
                "tokenId": "3587678"
            }
        ]
    }
}
```

{% 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="../../../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>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=0xf4dd9Bc7ae7Ae04502ec85FB9f4EE0463E905b20&chainId=10
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "nextPageToken": "eyJhbGciOiJIUzI1NiJ9.eyJ0YWJsZUluZGV4IjowLCJsYXN0RXZhbHVhdGVkS2V5Ijp7IndhbGxldEFkZHJlc3MiOiIweGY0ZGQ5YmM3YWU3YWUwNDUwMmVjODVmYjlmNGVlMDQ2M2U5MDViMjAiLCJ0aW1lc3RhbXBfYmxvY2tOdW1iZXJfdHhJbmRleCI6IjAwMDAwMDE3MzMwMzUyMTUwMDEyODcxODIxOTAwMDAxIn0sInBhZ2VOdW1iZXIiOjAsImtleUNvbmRpdGlvbkV4cHJlc3Npb24iOnsid2FsbGV0QWRkcmVzcyI6eyJlcSI6IjB4ZjRkZDliYzdhZTdhZTA0NTAyZWM4NWZiOWY0ZWUwNDYzZTkwNWIyMCJ9LCJ0aW1lc3RhbXBfYmxvY2tOdW1iZXJfdHhJbmRleCI6eyJiZXR3ZWVuIjpbIjAwMDAwMDE2MTA2Mzk1MDAwMDAwMDAwMDAwMDAwMDAwIiwiMDAwMDAwMTczMzA0MDY2MzAwMDAwMDAwMDAwOTk5OTkiXX19LCJsaW1pdCI6IjUiLCJvcmRlciI6ImRlc2NlbmRpbmcifQ.m02VvH0dPZ0ruZ-TIQp1CNDoV3bEeAn7oyAI8q5fIIM",
        "pageSize": "5",
        "transactions": [
            {
                "hash": "0x8ac9b1476c03894a4ee9db0dc994b915c0505b871f66a40b8f5fe7b00024f68b",
                "nonce": "18422",
                "transaction_index": "1",
                "from_address_entity": "Kraken",
                "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                "from_address_label": "Kraken: Hot Wallet",
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0xa195ce2f91f28f6e1233d31604f8df9b538925cf",
                "to_address_label": null,
                "value": "52459267700000000",
                "gas": "21000",
                "gas_price": "2000000401",
                "receipt_cumulative_gas_used": "64887",
                "receipt_gas_used": "21000",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-12-01T08:03:23.000Z",
                "block_number": "128720713",
                "block_hash": "0xcc96a52e1f6c7a49ee038c9784462eaa4588df49f768f458d4c9995b806ffe98",
                "transaction_fee": "0.000042412136191476",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [],
                "native_transfers": [
                    {
                        "from_address_entity": "Kraken",
                        "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                        "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                        "from_address_label": "Kraken: Hot Wallet",
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xa195ce2f91f28f6e1233d31604f8df9b538925cf",
                        "to_address_label": null,
                        "value": "52459267700000000",
                        "value_formatted": "0.0524592677",
                        "direction": "send",
                        "internal_transaction": false,
                        "token_symbol": "ETH"
                    }
                ],
                "summary": "Sent 0.05245 ETH to 0xa1...25cf",
                "possible_spam": false,
                "category": "send",
                "internal_transactions": []
            },
            {
                "hash": "0x33e9ee3137ce2d4a95e227096d5cd65227ecbc6cd757c4b8b84532d7effa8f77",
                "nonce": "1478",
                "transaction_index": "13",
                "from_address_entity": null,
                "from_address_entity_logo": null,
                "from_address": "0xc3a11b747dca056d5ff7c5904e49cdb82d4fa266",
                "from_address_label": null,
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0xaa4269fa8453c8584ed65c350a988172e66f62e4",
                "to_address_label": null,
                "value": "0",
                "gas": "3800000",
                "gas_price": "5000",
                "receipt_cumulative_gas_used": "4296710",
                "receipt_gas_used": "531693",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-12-01T07:50:39.000Z",
                "block_number": "128720331",
                "block_hash": "0x81c9dc0d421c92c5d5d3bc846c84616e2bab3a5904f032c26e62b4a15c84666f",
                "transaction_fee": "0.000000962921528016",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [],
                "native_transfers": [
                    {
                        "from_address_entity": null,
                        "from_address_entity_logo": null,
                        "from_address": "0xa67eca15af7324ce971eaf17e4af31a602d9155b",
                        "from_address_label": null,
                        "to_address_entity": "Kraken",
                        "to_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                        "to_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                        "to_address_label": "Kraken: Hot Wallet",
                        "value": "1",
                        "value_formatted": "1e-18",
                        "direction": "receive",
                        "internal_transaction": true,
                        "token_symbol": "ETH"
                    }
                ],
                "summary": "Received 0 ETH from 0xa6...155b",
                "possible_spam": false,
                "category": "receive",
                "internal_transactions": [
                    {
                        "transaction_hash": "0x33e9ee3137ce2d4a95e227096d5cd65227ecbc6cd757c4b8b84532d7effa8f77",
                        "block_number": 128720331,
                        "block_hash": "0x81c9dc0d421c92c5d5d3bc846c84616e2bab3a5904f032c26e62b4a15c84666f",
                        "type": "CALL",
                        "from": "0xaa4269fa8453c8584ed65c350a988172e66f62e4",
                        "to": "0x53a6ab16c50db4a3e5873ffc5ac30c488515dcac",
                        "value": "1",
                        "gas": "2300",
                        "gas_used": "195",
                        "input": "0x",
                        "output": "0x"
                    },
                    {
                        "transaction_hash": "0x33e9ee3137ce2d4a95e227096d5cd65227ecbc6cd757c4b8b84532d7effa8f77",
                        "block_number": 128720331,
                        "block_hash": "0x81c9dc0d421c92c5d5d3bc846c84616e2bab3a5904f032c26e62b4a15c84666f",
                        "type": "CALL",
                        "from": "0xaa4269fa8453c8584ed65c350a988172e66f62e4",
                        "to": "0xa67eca15af7324ce971eaf17e4af31a602d9155b",
                        "value": "1",
                        "gas": "2300",
                        "gas_used": "195",
                        "input": "0x",
                        "output": "0x"
                    },
                    {
                        "transaction_hash": "0x33e9ee3137ce2d4a95e227096d5cd65227ecbc6cd757c4b8b84532d7effa8f77",
                        "block_number": 128720331,
                        "block_hash": "0x81c9dc0d421c92c5d5d3bc846c84616e2bab3a5904f032c26e62b4a15c84666f",
                        "type": "CALL",
                        "from": "0x53a6ab16c50db4a3e5873ffc5ac30c488515dcac",
                        "to": "0x68b547d1bd2459b8f857b6c06e48d5b2f9eabc9a",
                        "value": "1",
                        "gas": "2300",
                        "gas_used": "0",
                        "input": "0x",
                        "output": "0x"
                    },
                    {
                        "transaction_hash": "0x33e9ee3137ce2d4a95e227096d5cd65227ecbc6cd757c4b8b84532d7effa8f77",
                        "block_number": 128720331,
                        "block_hash": "0x81c9dc0d421c92c5d5d3bc846c84616e2bab3a5904f032c26e62b4a15c84666f",
                        "type": "CALL",
                        "from": "0xa67eca15af7324ce971eaf17e4af31a602d9155b",
                        "to": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                        "value": "1",
                        "gas": "2300",
                        "gas_used": "0",
                        "input": "0x",
                        "output": "0x"
                    }
                ]
            },
            {
                "hash": "0x717337f6a3bc35a7189e9941802bfb0c6ea1e177a2baf7900b13938cc97b5c20",
                "nonce": "18421",
                "transaction_index": "1",
                "from_address_entity": "Kraken",
                "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                "from_address_label": "Kraken: Hot Wallet",
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0xa6cedb34b194c68518348e1148cc6983bed9155b",
                "to_address_label": null,
                "value": "5000000000000000000",
                "gas": "21000",
                "gas_price": "2000000394",
                "receipt_cumulative_gas_used": "64899",
                "receipt_gas_used": "21000",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-12-01T07:48:41.000Z",
                "block_number": "128720272",
                "block_hash": "0xfb6e0d481543358a744e671fe06cf1224dd09d940a628f49a6ed1daf8a7ce759",
                "transaction_fee": "0.000042892479659101",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [],
                "native_transfers": [
                    {
                        "from_address_entity": "Kraken",
                        "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                        "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                        "from_address_label": "Kraken: Hot Wallet",
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xa6cedb34b194c68518348e1148cc6983bed9155b",
                        "to_address_label": null,
                        "value": "5000000000000000000",
                        "value_formatted": "5",
                        "direction": "send",
                        "internal_transaction": false,
                        "token_symbol": "ETH"
                    }
                ],
                "summary": "Sent 5 ETH to 0xa6...155b",
                "possible_spam": false,
                "category": "send",
                "internal_transactions": []
            },
            {
                "hash": "0x5f4fd4ff276551e5c434e4f558ab208dddadac53e9807e603116fb8c15f276b4",
                "nonce": "18420",
                "transaction_index": "1",
                "from_address_entity": "Kraken",
                "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                "from_address_label": "Kraken: Hot Wallet",
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0xfd72e6b11c22de5dc9402d5f9e490b163d418e36",
                "to_address_label": null,
                "value": "94548620000000000",
                "gas": "21000",
                "gas_price": "2000000408",
                "receipt_cumulative_gas_used": "64887",
                "receipt_gas_used": "21000",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-12-01T06:45:11.000Z",
                "block_number": "128718367",
                "block_hash": "0x912882ba191991f42dcd3e97182299d6e8d94ffeba77ce38868225a5561e7664",
                "transaction_fee": "0.000042882704617581",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [],
                "native_transfers": [
                    {
                        "from_address_entity": "Kraken",
                        "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                        "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                        "from_address_label": "Kraken: Hot Wallet",
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xfd72e6b11c22de5dc9402d5f9e490b163d418e36",
                        "to_address_label": null,
                        "value": "94548620000000000",
                        "value_formatted": "0.09454862",
                        "direction": "send",
                        "internal_transaction": false,
                        "token_symbol": "ETH"
                    }
                ],
                "summary": "Sent 0.09454 ETH to 0xfd...8e36",
                "possible_spam": false,
                "category": "send",
                "internal_transactions": []
            },
            {
                "hash": "0x0c0b46baff3d363d96d440fdeefbb81c5c9aaf12615673fc598a416882cfa2f3",
                "nonce": "18419",
                "transaction_index": "1",
                "from_address_entity": "Kraken",
                "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                "from_address_label": "Kraken: Hot Wallet",
                "to_address_entity": null,
                "to_address_entity_logo": null,
                "to_address": "0xfd72e6b11c22de5dc9402d5f9e490b163d418e36",
                "to_address_label": null,
                "value": "2700000000000000",
                "gas": "21000",
                "gas_price": "2000000396",
                "receipt_cumulative_gas_used": "64899",
                "receipt_gas_used": "21000",
                "receipt_contract_address": null,
                "receipt_status": "1",
                "block_timestamp": "2024-12-01T06:40:15.000Z",
                "block_number": "128718219",
                "block_hash": "0x238577495ae83d611600d2c3f2e68dd281e531a028d3b6abacd2f024cdf7d96c",
                "transaction_fee": "0.000043026797681474",
                "method_label": null,
                "nft_transfers": [],
                "erc20_transfers": [],
                "native_transfers": [
                    {
                        "from_address_entity": "Kraken",
                        "from_address_entity_logo": "https://entities-logos.s3.us-east-1.amazonaws.com/kraken.png",
                        "from_address": "0xf4dd9bc7ae7ae04502ec85fb9f4ee0463e905b20",
                        "from_address_label": "Kraken: Hot Wallet",
                        "to_address_entity": null,
                        "to_address_entity_logo": null,
                        "to_address": "0xfd72e6b11c22de5dc9402d5f9e490b163d418e36",
                        "to_address_label": null,
                        "value": "2700000000000000",
                        "value_formatted": "0.0027",
                        "direction": "send",
                        "internal_transaction": false,
                        "token_symbol": "ETH"
                    }
                ],
                "summary": "Sent 0.0027 ETH to 0xfd...8e36",
                "possible_spam": false,
                "category": "send",
                "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 ](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" : "10",
    "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId" : "10",
        "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": "10",
    "rawTransaction": "0xf86c808401fedd93830d575194a67e9b68c41b0f26184d64c26e0b2b81466e5994888ac7230489e800008038a09055da16d4d23b1d1831ff8c150820a5e48dc931a0682c708b147ffb9db78f95a0037037cd03120d877daf33ae416fe4f14091624da042312a5c080a25752839f8"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "parsedTx": {
            "nonce": 0,
            "gasPrice": {
                "type": "BigNumber",
                "hex": "0x01fedd93"
            },
            "gasLimit": {
                "type": "BigNumber",
                "hex": "0x0d5751"
            },
            "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "value": {
                "type": "BigNumber",
                "hex": "0x8ac7230489e80000"
            },
            "data": "0x",
            "chainId": 10,
            "v": 56,
            "r": "0x9055da16d4d23b1d1831ff8c150820a5e48dc931a0682c708b147ffb9db78f95",
            "s": "0x037037cd03120d877daf33ae416fe4f14091624da042312a5c080a25752839f8",
            "from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
            "hash": "0x7616dbfb6f7b9a3d82049be986b913a4b03d264ed5ecc7496cfb6037bb157dde",
            "type": null
        },
        "assetChanges": {
            "from": "0xa2e73C17F437688946993F683930E3Fd42Dd4F8C",
            "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
            "value": {
                "type": "BigNumber",
                "hex": "0x8ac7230489e80000"
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}
