> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stablepayfi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询目标商户的全部账户及余额

> 查询目标商户的全部账户及余额

完整[认证、签名、数据约定与错误响应](https://docs.stablepayfi.ai/zh/api/global-accounts/overview)。每次重试均须重新生成时间戳、nonce 与签名。

`GET /account` 返回目标商户的全部账户及余额，不支持分页与筛选。

## 请求头

**Authorization** `string` *required*

Bearer API Key。

**X-StablePay-Timestamp** `string` *required*

Unix 秒，允许与服务端相差最多 5 分钟。

**X-StablePay-Nonce** `string` *required*

每次请求唯一的随机串，16–64 字符。

**X-StablePay-Signature** `string` *required*

HMAC-SHA256 签名，小写十六进制；签名必须对应实际发送的请求体。

## 请求参数

**merchant\_id** `string`

10 位数字；商户 App 不传，服务商 App 传值指定作用商户

## 响应

**object** `string` *required*

固定为 list

**data** `array` *required*

账户对象数组

**as\_of** `integer` *required*

数据库观察时间

**account\_no** `string` *required*

8 位数字账户编号，保留前导零

**account\_name** `string` *required*

账户展示名称

**currency** `string` *required*

大写币种或资产代码

**status** `string` *required*

active 正常、restricted 受限

**is\_system\_default** `boolean` *required*

是否系统默认账户

**editable** `boolean` *required*

是否允许改名

**available\_amount** `integer` *required*

可用余额，币种最小单位

**frozen\_amount** `integer` *required*

冻结或预留余额

**total\_amount** `integer` *required*

总余额 = 可用 + 冻结

**created** `integer` *required*

创建时间，Unix 秒

## 状态与错误

401 鉴权失败；403 无权访问目标商户。

```bash cURL theme={"system"}
curl --request GET \
  --url "https://api.stablepay.co/api/v1/account" \
  --header "Authorization: Bearer <API_KEY>" \
  --header "X-StablePay-Timestamp: <TIMESTAMP>" \
  --header "X-StablePay-Nonce: <NONCE>" \
  --header "X-StablePay-Signature: <SIGNATURE>"
```

```javascript JavaScript theme={"system"}
const response = await fetch("https://api.stablepay.co/api/v1/account", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <API_KEY>",
    "X-StablePay-Timestamp": "<TIMESTAMP>",
    "X-StablePay-Nonce": "<NONCE>",
    "X-StablePay-Signature": "<SIGNATURE>"
  }
});
console.log(await response.json());
```

```json 200 theme={"system"}
{
  "object": "list",
  "data": [
    {
      "account_no": "00000001",
      "account_name": "Default Account",
      "currency": "USDT",
      "status": "active",
      "is_system_default": true,
      "editable": false,
      "available_amount": 10000,
      "frozen_amount": 2000,
      "total_amount": 12000,
      "created": 1788998400
    }
  ],
  "as_of": 1789084800
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.