> For the complete documentation index, see [llms.txt](https://documentation.script.tv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.script.tv/script-network-explorer/account-apis.md).

# Account APIs

## GetAccount

This API returns the details of the account being queried with address.

**REST Uri:** /account/{address}

**Query Parameters**

address: the address of the account

**Returns**

address: the account address

balance: the native token balance

reserved\_funds: fund reserved for micropayment through the off-chain resource-oriented payment pool

sequence: the current sequence number of the account

txs\_counter: the counter map contains how many transactions of each transaction type include this account

```
// Request
curl https://explorer.script.tv/api/account/0x3c6D5ED0353c22c31c5F91688A9D10E7Af2DF636
// Result
{
 "type": "account",
 "body": {
 "address": "0x3c6d5ed0353c22c31c5f91688a9d10e7af2df636",
 "balance": {
 "SCPTWei": "0",
 "SPAYWei": "1540957523000000000000"
 },
 "sequence": "0",
 "reserved_funds": [],
 "txs_counter": {
 "2": 2,
 "5": 973
 }
 }
}
```

## GetAccountTxHistory

This API returns the details of the account being queried with address.

**REST Uri:** /accountTx/:address

**Query Parameters**

address: the address of the account

type: type of the transaction

isEqualType: true returns a transaction list only include the type above, false returns a transaction list exclude the type above.

pageNumber: the number of page

limitNumber: the size of each page

**Returns**

currentPageNumber: the number of current page

totalPageNumber: the total number of page

For each transaction it is similar to the returns of the GetTransaction API.

```
// Request
curl " https://explorer.script.tv//api/accounttx/0x3c6D5ED0353c22c31c5F91688A9D10E7Af2DF636?type=2&pageNumber=1&limitNumber=50&isEqualType=true"
// Result
{
 "type": "account_tx_list",
 "body": [
 {...},
 {...}
 ],
 "totalPageNumber": 1,
 "currentPageNumber": 1
}
```

## GetTopTokenHolders

This API returns the list of top token holders.

**REST Uri:** /account/top/:tokenType/:limit

**Query Parameters**

tokenType: type of the token(SPAY)

limit: the size of returns

**Returns**

For each account it is similar to the returns of the GetAccount API.

```
// // Request
curl " https://explorer.script.tv//api/account/top/SPAY/5"
// Result
{
"type": "account_list",
"body": [
 {...},
 {...},
 {...},
 {...},
 {...}
 ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.script.tv/script-network-explorer/account-apis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
