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

# 获取加密货币划转记录

> 查询商户钱包之间内部加密货币划转的完整历史，可按代币代码、日期范围和客户端 ID 筛选。

使用此接口获取涉及一个或多个商户钱包的内部加密货币划转历史。每笔完成的划转会生成两条记录——转出方的一条负数（借记）记录和接收方的一条正数（贷记）记录。使用 `merchantId` 筛选条件可将结果限定为单个商户。可与[加密货币划转](https://docs.velafi.com/cn/api-reference/merchant/crypto-transfer.md)接口配合使用，构建完整的审计追踪。

> [!NOTE]
>
> 所有请求都必须包含 `X-BH-TOKEN` 请求头，其值为通过 `GET /v2/token/generate` 获取的业务令牌。

## 接口地址

`GET https://api.velafi.com/v2/assets/internalTransferOrders`

## 查询参数

**merchantId** `number`

按商户 ID 筛选记录。

**tokenId** `string`

按代币代码筛选，例如 `USDT`、`BTC`。

**clientId** `string`

按你提供的划转标识符筛选。

**startTime** `number`

日期范围的开始时间，为毫秒级 Unix 时间戳。

**endTime** `number`

日期范围的结束时间，为毫秒级 Unix 时间戳。

**pageSize** `number`

每页返回的记录数。

## 响应字段

**code** `number`

HTTP 风格的响应码。`200` 表示成功。

**msg** `string`

可读的状态信息，例如 `SUCCESS`。

**data** `array`

**data 条目字段**

**id** `string`

该划转记录的唯一 ID。

**tokenId** `string`

该记录的代币代码。

**amount** `string`

划转金额。负数 = 借记（转出方），正数 = 贷记（接收方）。

**clientId** `string`

你提供的划转标识符。

**merchantId** `string`

该记录所属商户的 ID。

**fromMerchantId** `string`

转出方商户 ID。

**toMerchantId** `string`

接收方商户 ID。

## 示例

```bash cURL theme={null}
curl -G https://api.velafi.com/v2/assets/internalTransferOrders \
  -H "X-BH-TOKEN: YOUR_TOKEN" \
  --data-urlencode "merchantId=246" \
  --data-urlencode "tokenId=USDT" \
  --data-urlencode "pageSize=10"
```

```json Response theme={null}
{
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "id": "4355",
      "tokenId": "USDT",
      "amount": "10",
      "clientId": "crypto-transfer-001",
      "merchantId": "61",
      "fromMerchantId": "246",
      "toMerchantId": "61"
    },
    {
      "id": "4354",
      "tokenId": "USDT",
      "amount": "-10",
      "clientId": "crypto-transfer-001",
      "merchantId": "246",
      "fromMerchantId": "246",
      "toMerchantId": "61"
    }
  ]
}
```

> [!NOTE]
>
> 一笔划转会生成两条记录：一条属于转出方（`amount` 为负数），一条属于接收方（`amount` 为正数）。`merchantId` 字段表明每条记录代表的是哪个商户的视角。


## Related topics

- [创建加密货币划转](https://docs.velafi.com/cn/api-reference/merchant/crypto-transfer.md)
- [获取加密货币提现记录](https://docs.velafi.com/cn/api-reference/crypto-wallet/get-crypto-withdrawal-history.md)
- [获取加密货币充值记录](https://docs.velafi.com/cn/api-reference/crypto-wallet/get-crypto-deposit-history.md)
- [获取加密货币列表](https://docs.velafi.com/cn/api-reference/basic-configuration/get-list-of-crypto-currencies.md)
- [获取加密货币/法币报价](https://docs.velafi.com/cn/api-reference/quote/get-user-quote-for-crypto-fiat.md)


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