From e7d96d038d3d092824f919b1603ad3b3f28c1cc1 Mon Sep 17 00:00:00 2001 From: cabbage Date: Wed, 1 Mar 2023 15:29:22 +0800 Subject: [PATCH] http-api docs : prc-20 docs url bug --- docs/http-api/account_balance_prc20.md | 23 +++++++---------------- docs/zh/http-api/account_balance_prc20.md | 23 +++++++---------------- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/docs/http-api/account_balance_prc20.md b/docs/http-api/account_balance_prc20.md index d2acb113..187ce927 100644 --- a/docs/http-api/account_balance_prc20.md +++ b/docs/http-api/account_balance_prc20.md @@ -8,39 +8,30 @@ order: 4 `GET` ### URL -`/server/v1/account/balance/prc10` +`/server/v1/account/balance/prc20` ### Request example ``` -/server/v1/account/balance/prc10?addr=gx1sqyqeef3ym6q9x7anlgxmxh6u7sjfx6ccc3d4m&denom=uplugcn +/server/v1/account/balance/prc20?addr=gx1sqyqeef3ym6q9x7anlgxmxh6u7sjfx6ccc3d4m&contract=gx1ay6eqcf0crujlkkvvzkrzd8e8fayh85yl6qgcl ``` #### Request parameters - `addr string Required` :Address -- `denom string Required`:Currency, please fill in min_ unit in the token information to query, such as min_ unit of PC is uplugcn +- `contract string Required`: Contract address ### Return value - `code int64 ` : 0 or field does not exist is success, others are failures - `message string` : Response information -- `balances object` : Data returned successfully - - `denom` : Query currency - - `amount`: Balance, which is normal only after dividing decimal places +- `data float64` : Balance of #### Return to example ```json { - "balances": [ - { - "denom": "uplugcn", - "amount": "22919755" - } - ], - "pagination": { - "next_key": null, - "total": "1" - } + "code": 0, + "data": 1999, + "message": "ok" } ``` \ No newline at end of file diff --git a/docs/zh/http-api/account_balance_prc20.md b/docs/zh/http-api/account_balance_prc20.md index 60abfc4c..885229ae 100644 --- a/docs/zh/http-api/account_balance_prc20.md +++ b/docs/zh/http-api/account_balance_prc20.md @@ -8,38 +8,29 @@ order: 4 `GET` ### URL -`/server/v1/account/balance/prc10` +`/server/v1/account/balance/prc20` ### 请求示例 ``` -/server/v1/account/balance/prc10?addr=gx1sqyqeef3ym6q9x7anlgxmxh6u7sjfx6ccc3d4m&denom=uplugcn +/server/v1/account/balance/prc20?addr=gx1sqyqeef3ym6q9x7anlgxmxh6u7sjfx6ccc3d4m&contract=gx1ay6eqcf0crujlkkvvzkrzd8e8fayh85yl6qgcl ``` #### 请求参数 - `addr string 必填` :地址 -- `denom string 必填`:币种,请填写代币信息中的min_unit进行查询,例如pc的min_unit为uplugcn +- `contract string 必填`:合约地址 ### 返回值 - `code int64 ` : 0或字段不存在为成功,其他均为失败 - `message string` : 响应信息 -- `balances object` : 成功返回数据 - - `denom` : 查询币种 - - `amount`: 余额,需要除小数位后才是正常数值 +- `balances float64` : 余额 #### 返回示例 ```json { - "balances": [ - { - "denom": "uplugcn", - "amount": "22919755" - } - ], - "pagination": { - "next_key": null, - "total": "1" - } + "code": 0, + "data": 1999, + "message": "ok" } ``` \ No newline at end of file