# Kaia

## /getbalance

Get the balance 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="190">Name</th><th width="95">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<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>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><tr><td>vsCurrencies</td><td>String</td><td>A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.</td></tr></tbody></table>

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

```json
https://api.expand.network/chain/getbalance?address=0xb6ab494d9b20ede5e57b42b6d7f058a9c802b0e2&blockNumber=196533060&tokenAddress=0xd077a400968890eacc75cdc901f0356c943e4fdb&timestamp=1759314478&vsCurrencies=inr&chainId=8217
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "balance": "206875000000000",
        "usdPrice": "0.15125935122269693",
        "prices": {
            "usd": [
                {
                    "KAIA": "0.15125935122269693"
                }
            ],
            "inr": [
                {
                    "KAIA": "13.422043908551384"
                }
            ]
        },
        "logoUrl": "https://images.ctfassets.net/hwqnbx905qdp/5ZRKbbTbhbx9qCKeHaAqtd/631d6128cb9dc10726a72874a61e2458/eip155_8217-0x0000000000000000000000000000000000000000.webp",
        "tags": [
            "native"
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## /getblock

Get details of a block.

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

#### Query Parameters

<table><thead><tr><th width="165">Name</th><th width="92">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<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>blockNumber<mark style="color:red;">*</mark></td><td>String</td><td>The block number or block hash.</td></tr></tbody></table>

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

```url
https://historicallp.api.expand.network/chain/getblock?blockNumber=196533060&chainId=8217
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "baseFeePerGas": 25000000000,
        "difficulty": "1",
        "extraData": "0x",
        "gasLimit": 999999999999,
        "gasUsed": 244254,
        "hash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
        "logsBloom": "0x001000000084001000000000000002200000000000000000000000024800000000000000000000000000001000000000080010000000000000008000042000000000000000000000000100080010010000000010000000000004000000080020000000000000000000800010000400000002000000000000000000110101000080800000000a0400000400004000080000000000000040004004100000020000020000000000008000000000000000001000000000800840040004000800080000100002080008000000000000000000000000000008000000000000000000000010204180000010100000000000100000000000000000000000000008084000",
        "miner": "0x81513e31072d1cd8ab3B0c5A290e97513f000756",
        "mixHash": "0xc3f26ef24425cb5e1d4cb443d94d5651738794e07576a4dc6e04612c7aaa061f",
        "nonce": "0x0000000000000000",
        "number": 196533060,
        "parentHash": "0xeec0c32654022ed102fc7dcbf7ee9ba030dee4d5dc9313645e8c84ecc42f8047",
        "randomReveal": "0x9072380da070fffccc23509258810f461547e23d80323c2a739d275621e825139036882a34604b6d99d1b607bb075cf5005a88c8c0f720fe984662eca8f387a6d9b5ed8d68f6264e0f23da770b3b62b5ac5de943f12487bc04170b45306c73a4",
        "receiptsRoot": "0x5b43a6f0e693c74d8219ecea259a561681105ccdd5ca7b49f28b375913523bca",
        "size": 4974,
        "timestamp": 1758608738,
        "transactions": [
            {
                "chainId": "8217",
                "hash": "0x28944ae47fe2de68a7d661e0bba453e9ac93201b257710a28723a02b08be58ee",
                "transactionStatus": true,
                "blockNumber": "196533060",
                "timestamp": null,
                "from": "0x33c7C8382421E621E483Dd7Ad3dd74Ac4e93a970",
                "to": "0x0AD835Bc633552d80CDC4f6E411210b517E1397b",
                "value": "0",
                "transactionFees": "2830133625000000",
                "gas": "284085",
                "gasPrice": "27775000000",
                "input": "0x904e912900000000000000000000000000000000cc16157ebf2f4e73b2e9a01dbabb5384000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000bb6db8f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000002d153c234906b37aa73d58465de4cef9ea33feb100000000000000000000000000000000000000000000000000000000000186a0",
                "nonce": 25,
                "type": null,
                "network": null,
                "v": "0x4055",
                "r": "0x6f987805b5657cb79df437606fb4c4ba6b10ebdf5f2dceddad7e140c737db36e",
                "s": "0xac2648833ecbd7862949293d37e176bacf82391bd573d09898bd2d61d843cf2",
                "yParity": null,
                "transactionIndex": null,
                "accessList": null,
                "maxFeePerGas": null,
                "maxPriorityFeePerGas": null,
                "logs": [
                    {
                        "address": "0xd077A400968890Eacc75cdc901F0356c943e4fDb",
                        "topics": [
                            "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                            "0x00000000000000000000000033c7c8382421e621e483dd7ad3dd74ac4e93a970",
                            "0x0000000000000000000000000ad835bc633552d80cdc4f6e411210b517e1397b"
                        ],
                        "data": "0x00000000000000000000000000000000000000000000000000000000000186a0",
                        "blockNumber": 196533060,
                        "transactionHash": "0x28944ae47fe2de68a7d661e0bba453e9ac93201b257710a28723a02b08be58ee",
                        "transactionIndex": 0,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 0,
                        "removed": false,
                        "id": "log_ae71052b"
                    },
                    {
                        "address": "0xd077A400968890Eacc75cdc901F0356c943e4fDb",
                        "topics": [
                            "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                            "0x00000000000000000000000033c7c8382421e621e483dd7ad3dd74ac4e93a970",
                            "0x0000000000000000000000000ad835bc633552d80cdc4f6e411210b517e1397b"
                        ],
                        "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb86faf",
                        "blockNumber": 196533060,
                        "transactionHash": "0x28944ae47fe2de68a7d661e0bba453e9ac93201b257710a28723a02b08be58ee",
                        "transactionIndex": 0,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 1,
                        "removed": false,
                        "id": "log_567823ce"
                    },
                    {
                        "address": "0xd077A400968890Eacc75cdc901F0356c943e4fDb",
                        "topics": [
                            "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                            "0x0000000000000000000000000ad835bc633552d80cdc4f6e411210b517e1397b",
                            "0x0000000000000000000000002d153c234906b37aa73d58465de4cef9ea33feb1"
                        ],
                        "data": "0x00000000000000000000000000000000000000000000000000000000000186a0",
                        "blockNumber": 196533060,
                        "transactionHash": "0x28944ae47fe2de68a7d661e0bba453e9ac93201b257710a28723a02b08be58ee",
                        "transactionIndex": 0,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 2,
                        "removed": false,
                        "id": "log_2f50a77b"
                    },
                    {
                        "address": "0x0AD835Bc633552d80CDC4f6E411210b517E1397b",
                        "topics": [
                            "0x639640d80e13a4a583a2a46f45b4c0eb3bead3aedaae97b64bb90605e83d5976",
                            "0x00000000000000000000000000000000cc16157ebf2f4e73b2e9a01dbabb5384"
                        ],
                        "data": "0xd15c68f55d14477cd87ae67b118f552b89e008fb364d42e968fc517a5117b963",
                        "blockNumber": 196533060,
                        "transactionHash": "0x28944ae47fe2de68a7d661e0bba453e9ac93201b257710a28723a02b08be58ee",
                        "transactionIndex": 0,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 3,
                        "removed": false,
                        "id": "log_a5bceed0"
                    }
                ]
            },
            {
                "chainId": "8217",
                "hash": "0x706113cbb07cab208611add24e8ad21b010fdac41f47da554ad3c1fb577427aa",
                "transactionStatus": true,
                "blockNumber": "196533060",
                "timestamp": null,
                "from": "0xA9aA1c740bbF47871DAD0c30B0B9c15961148A96",
                "to": "0x9399a2dfAD16F9DB1791f7B4323393F409A8eA1e",
                "value": "0",
                "transactionFees": "2722977675000000",
                "gas": "272511",
                "gasPrice": "27775000000",
                "input": "0xfa6870bd00000000000000000000000000000000ce4474e06c1779b4891124f17a6a8444000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000014a437261d8f720c7222e9c3df41f40b340e512000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb0000000000000000000000000000000000000000000000000000000000517b600000000000000000000000000000000000000000000000000000000068d23d740000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000004163a4216b53a0bc10337224070947c155f95569820ce9f85d2e29fee1bff7ca1a6464a54772dbd51756c0031cc98dc3aa40716dc82565ea278805e89788daca5d1c00000000000000000000000000000000000000000000000000000000000000",
                "nonce": 13,
                "type": null,
                "network": null,
                "v": "0x4056",
                "r": "0xfe88357e9220d2c593dd8a23b1eb24f64a93ea644d8092e6ba18a72b9927304b",
                "s": "0x5fdfe81dbbf2ce7e41779f09d1d90bf9f91ba3bde47f262f6a00b1ec0a037d49",
                "yParity": null,
                "transactionIndex": 1,
                "accessList": null,
                "maxFeePerGas": null,
                "maxPriorityFeePerGas": null,
                "logs": [
                    {
                        "address": "0x3482148F07FD33c679979dB3eA0b352C2380F898",
                        "topics": [
                            "0x2cd023a3cb2b5585df437221f807347b0683b2f3c4a562be1f055baafd2e22af",
                            "0x00000000000000000000000000000000ce4474e06c1779b4891124f17a6a8444",
                            "0x000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb"
                        ],
                        "data": "0x000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c",
                        "blockNumber": 196533060,
                        "transactionHash": "0x706113cbb07cab208611add24e8ad21b010fdac41f47da554ad3c1fb577427aa",
                        "transactionIndex": 1,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 4,
                        "removed": false,
                        "id": "log_9d32dc4a"
                    },
                    {
                        "address": "0xd077A400968890Eacc75cdc901F0356c943e4fDb",
                        "topics": [
                            "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                            "0x000000000000000000000000014a437261d8f720c7222e9c3df41f40b340e512",
                            "0x0000000000000000000000009399a2dfad16f9db1791f7b4323393f409a8ea1e"
                        ],
                        "data": "0x0000000000000000000000000000000000000000000000000000000000517b60",
                        "blockNumber": 196533060,
                        "transactionHash": "0x706113cbb07cab208611add24e8ad21b010fdac41f47da554ad3c1fb577427aa",
                        "transactionIndex": 1,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 5,
                        "removed": false,
                        "id": "log_d9eb2b8d"
                    },
                    {
                        "address": "0x014a437261D8F720C7222e9C3dF41F40B340e512",
                        "topics": [
                            "0x6cca423c6ffc06e62a0acc433965e074b11c28479b0449250ce3ff65ac9e39fe",
                            "0x000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb"
                        ],
                        "data": "0x0000000000000000000000000000000000000000000000000000000000517b60",
                        "blockNumber": 196533060,
                        "transactionHash": "0x706113cbb07cab208611add24e8ad21b010fdac41f47da554ad3c1fb577427aa",
                        "transactionIndex": 1,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 6,
                        "removed": false,
                        "id": "log_02614ec1"
                    },
                    {
                        "address": "0xd077A400968890Eacc75cdc901F0356c943e4fDb",
                        "topics": [
                            "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                            "0x0000000000000000000000009399a2dfad16f9db1791f7b4323393f409a8ea1e",
                            "0x000000000000000000000000a9aa1c740bbf47871dad0c30b0b9c15961148a96"
                        ],
                        "data": "0x0000000000000000000000000000000000000000000000000000000000517b60",
                        "blockNumber": 196533060,
                        "transactionHash": "0x706113cbb07cab208611add24e8ad21b010fdac41f47da554ad3c1fb577427aa",
                        "transactionIndex": 1,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 7,
                        "removed": false,
                        "id": "log_8bbc5f87"
                    },
                    {
                        "address": "0x9399a2dfAD16F9DB1791f7B4323393F409A8eA1e",
                        "topics": [
                            "0x91a20618d6d654633e162ed6b2bd1f848a5d60848e71c08971c731eb0b0c2f3e",
                            "0x00000000000000000000000000000000ce4474e06c1779b4891124f17a6a8444",
                            "0x000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb"
                        ],
                        "data": "0x000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000014a437261d8f720c7222e9c3df41f40b340e512000000000000000000000000a9aa1c740bbf47871dad0c30b0b9c15961148a960000000000000000000000000000000000000000000000000000000000517b60",
                        "blockNumber": 196533060,
                        "transactionHash": "0x706113cbb07cab208611add24e8ad21b010fdac41f47da554ad3c1fb577427aa",
                        "transactionIndex": 1,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 8,
                        "removed": false,
                        "id": "log_3cbe9560"
                    }
                ]
            },
            {
                "chainId": "8217",
                "hash": "0x09696be1c5dc952e5cd7f8fcd9e405a27f403c67e7c533fc9d15be2e6bdce591",
                "transactionStatus": true,
                "blockNumber": "196533060",
                "timestamp": null,
                "from": "0x5531A4D2B4237E87148630c3cB0051999Bb205A9",
                "to": "0xf93B0d3E03422416B787e850C51f7be47ab481E5",
                "value": "0",
                "transactionFees": "1218855000000000",
                "gas": "4300000",
                "gasPrice": "27500000000",
                "input": "0x0f73bcc20000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000b54200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002544a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001aeabf88ecb298eb9fbc28eb9890ec98a4ed95b4ec98814f535429000000000000",
                "nonce": 12684647,
                "type": null,
                "network": null,
                "v": "0x4056",
                "r": "0x12beb0d82eaf92554b157320cb758cc84800d2e9fa700b96c82eb63e6583ac7",
                "s": "0x1ad7de657dd71d0e10d273399a0d1e2b60f909138a89115af61a43177f0de647",
                "yParity": null,
                "transactionIndex": 2,
                "accessList": null,
                "maxFeePerGas": null,
                "maxPriorityFeePerGas": null,
                "logs": [
                    {
                        "address": "0xf93B0d3E03422416B787e850C51f7be47ab481E5",
                        "topics": [
                            "0x23b798d2d48eb64eaa15f6b93414c84032fada9b76ade5854af0acadd57d7065",
                            "0xbcff12704be84695bcae04bed99f28737805bc5e5507d16a4d005393724d1a65",
                            "0x000000000000000000000000000000000000000000000000000000000000b542"
                        ],
                        "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001aeabf88ecb298eb9fbc28eb9890ec98a4ed95b4ec98814f535429000000000000",
                        "blockNumber": 196533060,
                        "transactionHash": "0x09696be1c5dc952e5cd7f8fcd9e405a27f403c67e7c533fc9d15be2e6bdce591",
                        "transactionIndex": 2,
                        "blockHash": "0x7a99bc838822f051801f0ec63d9881a7f7cedf19e01e0e97cbe91c8c3bdb9b6d",
                        "logIndex": 9,
                        "removed": false,
                        "id": "log_179c294f"
                    }
                ]
            }
        ],
        "transactionsRoot": "0xd4211b960ca418c138c16b8b209b714f4e835f9a11b87bf27a0fab03e87dec3c",
        "uncles": []
    }
}
```

{% endtab %}
{% endtabs %}

## /portfolio

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

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

#### Query Parameters

| Name                                      | Type   | Description                                                                                                               |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| rpc                                       | String | Remote procedural call URL.                                                                                               |
| chainId                                   | String | Refer to the [Chain ID ](https://docs.expand.network/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 | Public addess of the user.                                                                                                |
| tokens                                    | String | Comma-separated value of ERC-20 tokens to get value of. Maximum 10 at a time.                                             |
| <p>assetType</p><p></p>                   | String | `fungible`/`nonFungible` standard choice. By default, `all`.                                                              |
| <p>timestamp</p><p></p><p></p>            | String | The Timestamp of the block number up to which the balances will be fetched. Note-Only applicable for assetType `fungible` |
| <p>blockNumber</p><p></p><p></p>          | String | The block number up to which the balances will be fetched. Note-Only applicable for assetType `fungible`                  |

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

```json5
https://api.expand.network/chain/portfolio?address=0x56b4b18f6293252fc5eec4e5df1915f7218d04fc&chainId=8217&availableOnly=false
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "583980967286324075259711",
        "evmTokens": [
            {
                "name": "WETH",
                "symbol": "WETH",
                "decimals": "18",
                "address": "0x55acee547df909cf844e32dd66ee55a6f81dc71b",
                "balance": "2616533160461554494",
                "assetType": "ERC20",
                "USDPrice": "3957.588421654",
                "logoUrl": "https://images.ctfassets.net/hwqnbx905qdp/5wYtjebgyENWzA1C7dFp0t/c52bad629966e6e185967828e1af76bf/eip155_8217-0x55acee547df909cf844e32dd66ee55a6f81dc71b.webp",
                "tags": null
            },
            {
                "name": "Tether USD",
                "symbol": "USDT",
                "decimals": "6",
                "address": "0x9025095263d1e548dc890a7589a4c78038ac40ab",
                "balance": "25457960354",
                "assetType": "ERC20",
                "USDPrice": "1.0003938084",
                "logoUrl": "https://images.ctfassets.net/hwqnbx905qdp/6gHHp1dKMN94clQB2BZxWt/b1acaba653bb940969555c2bf2541ab8/eip155_8217-0x9025095263d1e548dc890a7589a4c78038ac40ab.webp",
                "tags": [
                    "stablecoin"
                ]
            },
            {
                "name": "Bridged USDC (Stargate)",
                "symbol": "USDC.e",
                "decimals": "6",
                "address": "0xE2053BCf56D2030d2470Fb454574237cF9ee3D4B",
                "balance": "10936326509",
                "assetType": "ERC20",
                "USDPrice": "0.9995869005",
                "logoUrl": "https://images.ctfassets.net/hwqnbx905qdp/2oDlk4TXbiI0SR6ElCehUW/5191562ed123a8b94b966a15a5b9fa4d/eip155_8217-0xE2053BCf56D2030d2470Fb454574237cF9ee3D4B.webp",
                "tags": [
                    "stablecoin"
                ]
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## /gettransaction

Get details of a transaction.

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

#### Query Parameters

<table><thead><tr><th width="180">Name</th><th width="84">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<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>transactionHash<mark style="color:red;">*</mark></td><td>String</td><td>The transaction hash.</td></tr></tbody></table>

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

```uri
https://api.expand.network/chain/gettransaction?chainId=8217&transactionHash=0x7a4259d9e5add14229e3d9607a740e7eb178f649ee8c9c8201fa05545ffd9141
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "8217",
        "hash": "0x7a4259d9e5add14229e3d9607a740e7eb178f649ee8c9c8201fa05545ffd9141",
        "transactionStatus": true,
        "blockNumber": "196533119",
        "timestamp": null,
        "from": "0xb6ab494d9b20edE5E57b42b6D7f058A9c802B0e2",
        "to": "0x23bEd69b2EdF057DD3D6dB8b6990AB9792eB43eC",
        "value": "0",
        "transactionFees": "1793125000000000",
        "gas": "71725",
        "gasPrice": "25000000000",
        "input": "0xb856c49200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
        "nonce": 0,
        "type": 2,
        "network": null,
        "v": "0x0",
        "r": "0x4776b0e5636e26a128006d6cfcb4054efd4152365a5f6ddbe07f0d7170234a37",
        "s": "0x4f8f4b040e34b822c0d4adc6bf68ceea2dc88ebea901b0954f586c1a2f276a7b",
        "yParity": null,
        "transactionIndex": 5,
        "accessList": [],
        "maxFeePerGas": "25000000000",
        "maxPriorityFeePerGas": "25000000000",
        "logs": [
            {
                "address": "0x23bEd69b2EdF057DD3D6dB8b6990AB9792eB43eC",
                "topics": [
                    "0x1cda624e8d4498808db987403eac202d4c03ddb3477ac5b96cd9fb05c1cce6a3"
                ],
                "data": "0x000000000000000000000000b6ab494d9b20ede5e57b42b6d7f058a9c802b0e20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
                "blockNumber": 196533119,
                "transactionHash": "0x7a4259d9e5add14229e3d9607a740e7eb178f649ee8c9c8201fa05545ffd9141",
                "transactionIndex": 5,
                "blockHash": "0x7d0a0a468be4128081107ceb08055966f0ed8947e973f8912fb5afda6abc80f5",
                "logIndex": 0,
                "removed": false,
                "id": "log_fd860e0b"
            }
        ]
    }
}
```

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

<table><thead><tr><th width="154">Name</th><th width="111">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<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></tbody></table>

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

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

{% endtab %}

{% tab title="Sample Response" %}

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

{% endtab %}
{% endtabs %}

## /getstorage

Get data stored in the given slot.

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

#### Query Parameters

<table><thead><tr><th width="154">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="/pages/5o1xMsQPqXw9GBfGTpdB">Chain ID </a>page for details.</td></tr><tr><td>chainSymbol<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>address<mark style="color:red;">*</mark></td><td>String</td><td>Contract address whose storage is needed.</td></tr><tr><td>index</td><td>String</td><td>Slot index on the smart contract. By default,  it is taken as 0.</td></tr></tbody></table>

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

```url
https://api.expand.network/chain/getstorage?address=0xb6ab494d9b20ede5e57b42b6d7f058a9c802b0e2&index=0&chainId=8217
```

{% endtab %}

{% tab title="Sample Response" %}

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

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

<table><thead><tr><th width="172">Name</th><th width="89">Type</th><th>Description</th></tr></thead><tbody><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. By default, Ethereum.</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>rawTransaction<mark style="color:red;">*</mark></td><td>String</td><td>The raw transaction to be given for decoding.</td></tr></tbody></table>

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

```json
{
    "rawTransaction": "0xf8ab8085066720b30082c8c69455acee547df909cf844e32dd66ee55a6f81dc71b80b844a9059cbb0000000000000000000000007d18db7c02029f4cd817085dfbc78d9c22c442900000000000000000000000000000000000000000000000000000000000000001824056a055fcf5b72b7c84e37f17f975ba400db7d9f87da09912254472436df8a898be98a014e4a31af18cb8dca5e96f3fb0a12f32451feae3ad09af4ac28511cf770af01e",
    "chainId": "8217"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "parsedTx": {
            "nonce": 0,
            "gasPrice": {
                "type": "BigNumber",
                "hex": "0x066720b300"
            },
            "gasLimit": {
                "type": "BigNumber",
                "hex": "0xc8c6"
            },
            "to": "0x55Acee547DF909CF844e32DD66eE55a6F81dC71b",
            "value": {
                "type": "BigNumber",
                "hex": "0x00"
            },
            "data": "0xa9059cbb0000000000000000000000007d18db7c02029f4cd817085dfbc78d9c22c442900000000000000000000000000000000000000000000000000000000000000001",
            "chainId": 8217,
            "v": 16470,
            "r": "0x55fcf5b72b7c84e37f17f975ba400db7d9f87da09912254472436df8a898be98",
            "s": "0x14e4a31af18cb8dca5e96f3fb0a12f32451feae3ad09af4ac28511cf770af01e",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "hash": "0xb49757ac7683d44060e5d19b3f7a73a8457d8a32a00c7e33b5018bf0f9c303b7",
            "type": null
        },
        "assetChanges": {
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0x55Acee547DF909CF844e32DD66eE55a6F81dC71b",
            "value": {
                "type": "BigNumber",
                "hex": "0x00"
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}

## **/**&#x73;endtransaction

Send transaction on the chain.

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

#### Request Body

<table><thead><tr><th width="180">Name</th><th width="110">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<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>rawTransaction<mark style="color:red;">*</mark></td><td>String</td><td>The encoded transaction, obtained from the signed transaction.</td></tr></tbody></table>

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

```json
{
    "rawTransaction": "0xf8ab8085066720b30082c8c69455acee547df909cf844e32dd66ee55a6f81dc71b80b844a9059cbb0000000000000000000000007d18db7c02029f4cd817085dfbc78d9c22c442900000000000000000000000000000000000000000000000000000000000000001824056a055fcf5b72b7c84e37f17f975ba400db7d9f87da09912254472436df8a898be98a014e4a31af18cb8dca5e96f3fb0a12f32451feae3ad09af4ac28511cf770af01e",
    "chainId": "8217"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "8217",
        "transactionHash": "0x7a4259d9e5add14229e3d9607a740e7eb178f649ee8c9c8201fa05"
    }
}

```

{% 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/kaia.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.
