交易
鉴权
签名方式:每个请求用 App Key / Secret 签名。请求头如下:
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string · header | 必填 | OpenAPI 后台 上的账户 Access Token,作为原始 token 传入(不带 Bearer 前缀),并参与签名计算。 |
X-Api-Key | string · header | 必填 | 你的 App Key。 |
X-Timestamp | string · header | 必填 | 请求时间戳,单位秒(Unix 时间)。 |
X-Api-Signature | string · header | 必填 | HMAC-SHA256 签名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。 |
该接口用于获取资金流入/流出方向、资金类别、资金金额、发生时间、关联股票代码和资金流水说明信息。
请求
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
start_time | string | 必填 | 开始时间,时间戳,以 `秒` 为单位,例如:`1650037563` |
end_time | string | 必填 | 结束时间,时间戳,以 `秒` 为单位,例如:`1650747581` |
business_type | string | 可选 | 资金类型。<b>可选值:</b>, `1` - 现金,`2` - 股票,`3` - 基金 |
symbol | string | 可选 | 标的代码,例如:`AAPL.US` |
page | string | 可选 | 起始页。<b>默认值:</b> `1`, <b>数据校验规则:</b>, <b>取值范围:</b> `>=1` |
size | string | 可选 | 每页大小。<b>默认值:</b> `50`, <b>数据校验规则:</b> `1~10000` |
响应
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
list | object[] | 可选 | 流水信息 |
└ transaction_flow_name | string | 必填 | 流水名称 |
└ direction | string | 必填 | 流出方向。<b>可选值:</b>, `1` - 流出,`2` - 流入 |
└ business_type | string | 必填 | 资金类别。<b>可选值:</b>, `1` - 现金,`2` - 股票,`3` - 基金 |
└ balance | string | 必填 | 资金金额 |
└ currency | string | 必填 | 资金币种 |
└ business_time | string | 必填 | 业务时间 |
└ symbol | string | 可选 | 关联股票代码信息 |
└ description | string | 可选 | 资金流水说明 |
响应 JSON 示例
{
"code": 0,
"data": {
"list": [
{
"transaction_flow_name": "BuyContract-Stocks",
"direction": 1,
"balance": "-248.60",
"currency": "USD",
"business_time": "1621507957",
"symbol": "AAPL.US",
"description": "AAPL"
},
{
"transaction_flow_name": "BuyContract-Stocks",
"direction": 1,
"balance": "-125.16",
"currency": "USD",
"business_time": "1621504824",
"symbol": "AAPL.US",
"description": "AAPL"
}
]
}
}错误码
参见错误码文档。