# 生成钱包地址

### 近期有老板发现这个接口会有个别钱包生成的跟私钥不对，为防止这种情况发生，建议调用完这个接口以后再去调用私钥获取地址信息的接口，那样才是万无一失的。 2022年6月27日22:48:56

~~也可用官方生成地址接口：<https://api.shasta.trongrid.io/wallet/generateaddress> （此接口于2022年8月24日 404 ，不需要再去调用了）~~

**简要描述**

* 生成地址接口

**请求URL**

* `/api/trc20/generateAddress`

**请求方式**

* GET

**返回示例**

```
{
    "code": 1,
    "data": {
        "privateKey": "41369219ae69fc11ecb589cdd5fdd9a0248918402bdf4d6fe0a7fb6ca752b38b",
        "address": "THJWy3Ej8gv52nmVfWfHZdyRuWX7Qfi3W6",
        "hexAddress": "41506fc7c4241599326c272d26fd08a47f3957d98b"
    }
}
```

**返回参数说明**

| 参数名        | 类型     | 说明   |
| ---------- | ------ | ---- |
| privateKey | string | 私钥   |
| address    | string | 钱包地址 |


---

# 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://tronapi.gitbook.io/trx/api/sheng-cheng-qian-bao-di-zhi.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.
