---
title: "余额查询"
description: "余额查询接口的请求方式、响应字段与调用示例。"
slug: "/api/fund-remaining"
sidebarTitle: "余额查询"
updated: "2026-09-28"
---

# 余额查询

## API 简介

通过此接口实时查询账户的余额情况。

## 查询结果

```json
{
    "success": true,
    "code": "200",
    "msg": "success",
    "data": {
        "remaining": 10820856.78
    },
    "timestamp": 1739845090213
}
```

其中 `data.remaining` 为账户余额，单位为元，保留两位小数（分）。

## API 接口

> 接口域名：https://api.bocha.cn
>
> EndPoint：https://api.bocha.cn/v1/fund/remaining

## 调用方式

### 请求方式

GET

### 请求示例

**cURL**

```bash
curl -X GET 'https://api.bocha.cn/v1/fund/remaining' \
--header 'Authorization: Bearer BOCHA-API-KEY' \
--header 'Content-Type: application/json'
```

**Python**

```python
import requests

url = "https://api.bocha.cn/v1/fund/remaining"

headers = {
  'Authorization': 'Bearer BOCHA-API-KEY',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)
print(response.text)
```
