# Get account information

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount

Retrieves account details for a given address.

Reference: https://www.alchemy.com/docs/chains/tron/tron-solidity-http-api-endpoints/tron-solidity-http-api-endpoints/get-account-information

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "string",
  "visible": false
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({address: 'string', visible: false})
};

fetch('https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount"

payload = {
    "address": "string",
    "visible": False
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount"

	payload := strings.NewReader("{\n  \"address\": \"string\",\n  \"visible\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount")
  .header("Content-Type", "application/json")
  .body("{\n  \"address\": \"string\",\n  \"visible\": false\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://tron-mainnet.g.alchemy.com/v2/docs-demo/walletsolidity/getaccount");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"address\": \"string\",\n  \"visible\": false\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /walletsolidity/getaccount
method: POST
operation:
  summary: Get account information
  description: Retrieves account details for a given address.
  tags:
    - Tron Solidity HTTP API Endpoints
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            address:
              type: string
            visible:
              type: boolean
  responses:
    '200':
      description: Successful response with account information
      content:
        application/json:
          schema:
            type: object
            example:
              address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
              balance: 100001
              create_time: 1675582485000
              latest_opration_time: 1750688181000
              latest_consume_time: 1712481906000
              latest_consume_free_time: 1750688112000
              net_window_size: 28800000
              net_window_optimized: true
              account_resource:
                latest_consume_time_for_energy: 1761509451000
                energy_window_size: 28800000
                acquired_delegated_frozenV2_balance_for_energy: 1000000
                energy_window_optimized: true
              owner_permission:
                permission_name: owner
                threshold: 1
                keys:
                  - address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
                    weight: 1
              active_permission:
                - type: Active
                  id: 2
                  permission_name: active
                  threshold: 1
                  operations: 7fff1fc0033e0300000000000000000000000000000000000000000000000000
                  keys:
                    - address: TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g
                      weight: 1
              frozenV2:
                - {}
                - type: ENERGY
                - type: TRON_POWER
              assetV2:
                - key: '1004977'
                  value: 8888880000
                - key: '1005026'
                  value: 8888880000
              free_asset_net_usageV2:
                - key: '1004977'
                  value: 0
                - key: '1005026'
                  value: 0
              asset_optimized: true
```
