> For the complete documentation index, see [llms.txt](https://docs.tajirchain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tajirchain.com/etherscan-compatible-explorer-api/account.md).

# Account

The Account module retrieves address balances, transactions, token transfers, owned tokens and mined blocks.

### Endpoint

```
https://explorer.tajirchain.com/api?module=account
```

### Available Actions

| Action            | Purpose                                     |
| ----------------- | ------------------------------------------- |
| `eth_get_balance` | Get the native balance at a specified block |
| `balance`         | Get the current native TJR balance          |
| `balancemulti`    | Get balances for multiple addresses         |
| `pendingtxlist`   | Get pending transactions for an address     |
| `txlist`          | Get normal transactions for an address      |
| `txlistinternal`  | Get internal transactions                   |
| `tokentx`         | Get ERC-20 transfers                        |
| `tokennfttx`      | Get ERC-721 transfers                       |
| `token1155tx`     | Get ERC-1155 transfers                      |
| `token404tx`      | Get ERC-404 transfers                       |
| `tokenbalance`    | Get an address balance for a token          |
| `tokenlist`       | Get tokens owned by an address              |
| `getminedblocks`  | Get blocks produced by an address           |
| `listaccounts`    | Get indexed accounts and balances           |

### Get Balance at a Block

#### Action

```
eth_get_balance
```

#### Parameters

| Parameter | Required | Description                                     |
| --------- | -------- | ----------------------------------------------- |
| `address` | Yes      | Account address                                 |
| `block`   | No       | Block number, `latest`, `earliest` or `pending` |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=eth_get_balance&address=0xADDRESS&block=latest"
```

The result is returned as hexadecimal wei.

### Get Current TJR Balance

#### Action

```
balance
```

| Parameter | Required | Description     |
| --------- | -------- | --------------- |
| `address` | Yes      | Account address |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=balance&address=0xADDRESS"
```

Example response:

```json
{
  "message": "OK",
  "result": "1000000000000000000",
  "status": "1"
}
```

Balances are returned in wei. TJR uses 18 decimal places.

### Get Multiple Balances

#### Action

```
balancemulti
```

| Parameter | Required | Description                                        |
| --------- | -------- | -------------------------------------------------- |
| `address` | Yes      | Comma-separated address list, maximum 20 addresses |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=balancemulti&address=0xADDRESS1,0xADDRESS2"
```

The `stale` field indicates that the Explorer is refreshing an indexed balance.

### Get Pending Transactions

#### Action

```
pendingtxlist
```

| Parameter | Required | Description                                |
| --------- | -------- | ------------------------------------------ |
| `address` | Yes      | Account address                            |
| `page`    | No       | Page number                                |
| `offset`  | No       | Results per page; use together with `page` |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=pendingtxlist&address=0xADDRESS&page=1&offset=10"
```

### Get Normal Transactions

#### Action

```
txlist
```

| Parameter         | Required | Description                        |
| ----------------- | -------- | ---------------------------------- |
| `address`         | Yes      | Account address                    |
| `startblock`      | No       | First block to search              |
| `endblock`        | No       | Last block to search               |
| `page`            | No       | Page number                        |
| `offset`          | No       | Results per page                   |
| `sort`            | No       | `asc` or `desc`; default is `desc` |
| `filter_by`       | No       | `to` or `from`                     |
| `start_timestamp` | No       | Starting Unix timestamp            |
| `end_timestamp`   | No       | Ending Unix timestamp              |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=txlist&address=0xADDRESS&startblock=0&endblock=latest&page=1&offset=10&sort=desc"
```

A maximum of 10,000 transactions may be returned. Use pagination and limited block ranges.

### Get Internal Transactions

#### Action

```
txlistinternal
```

At least a transaction hash or address should be supplied.

| Parameter            | Required    | Description                       |
| -------------------- | ----------- | --------------------------------- |
| `txhash`             | Conditional | Transaction hash                  |
| `address`            | Conditional | Account or contract address       |
| `startblock`         | No          | First block, when using `address` |
| `endblock`           | No          | Last block, when using `address`  |
| `page`               | No          | Page number                       |
| `offset`             | No          | Results per page                  |
| `sort`               | No          | `asc` or `desc`                   |
| `include_zero_value` | No          | Include zero-value internal calls |

By transaction:

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=txlistinternal&txhash=0xTRANSACTION_HASH"
```

By address:

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=txlistinternal&address=0xADDRESS&startblock=0&endblock=latest&page=1&offset=10&sort=desc"
```

### Get ERC-20 Transfers

#### Action

```
tokentx
```

An address or token contract address is required.

| Parameter         | Required    | Description             |
| ----------------- | ----------- | ----------------------- |
| `address`         | Conditional | Account address         |
| `contractaddress` | Conditional | ERC-20 contract address |
| `startblock`      | No          | First block             |
| `endblock`        | No          | Last block              |
| `page`            | No          | Page number             |
| `offset`          | No          | Results per page        |
| `sort`            | No          | `asc` or `desc`         |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=tokentx&address=0xADDRESS&page=1&offset=10&sort=desc"
```

### Get ERC-721 Transfers

#### Action

```
tokennfttx
```

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=tokennfttx&address=0xADDRESS&page=1&offset=10&sort=desc"
```

Supported parameters:

* `address`
* `contractaddress`
* `startblock`
* `endblock`
* `page`
* `offset`
* `sort`

An `address` or `contractaddress` is required.

### Get ERC-1155 Transfers

#### Action

```
token1155tx
```

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=token1155tx&address=0xADDRESS&page=1&offset=10&sort=desc"
```

Supported parameters are the same as `tokennfttx`.

### Get ERC-404 Transfers

#### Action

```
token404tx
```

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=token404tx&address=0xADDRESS&page=1&offset=10&sort=desc"
```

Supported parameters are the same as `tokennfttx`.

### Get Token Balance

#### Action

```
tokenbalance
```

| Parameter         | Required | Description            |
| ----------------- | -------- | ---------------------- |
| `contractaddress` | Yes      | Token contract address |
| `address`         | Yes      | Holder address         |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=tokenbalance&contractaddress=0xTOKEN_CONTRACT&address=0xADDRESS"
```

The result is returned in the token’s smallest unit.

### Get Tokens Owned by an Address

#### Action

```
tokenlist
```

| Parameter | Required | Description    |
| --------- | -------- | -------------- |
| `address` | Yes      | Holder address |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=tokenlist&address=0xADDRESS"
```

The result can include token name, symbol, type, balance, contract address and decimals.

### Get Mined Blocks

#### Action

```
getminedblocks
```

| Parameter | Required | Description            |
| --------- | -------- | ---------------------- |
| `address` | Yes      | Block producer address |
| `page`    | No       | Page number            |
| `offset`  | No       | Results per page       |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=getminedblocks&address=0xADDRESS&page=1&offset=10"
```

Depending on the network’s block-production model, results may be empty.

### List Indexed Accounts

#### Action

```
listaccounts
```

| Parameter | Required | Description      |
| --------- | -------- | ---------------- |
| `page`    | No       | Page number      |
| `offset`  | No       | Results per page |

```bash
curl "https://explorer.tajirchain.com/api?module=account&action=listaccounts&page=1&offset=10"
```

Use limited pagination. Do not attempt to retrieve the complete account index in one request.
