换汇申请
请求地址
[POST] /v1/mid-open-api/exchange/create需要验证签名
接口描述
通过查询到的汇率信息发起换汇申请
提示
平台接收到换汇请求,会校验汇率是否在有效期,如果校验失败,会通知换汇失败。
请求头
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | M | access_token |
| Content-Type | string | M | application/json |
请求参数
Request:
| Parameter | Type | Required | Description |
|---|---|---|---|
| partner_order_id | string(64) | M | 客户订单号 ,需要保证唯一 |
| client_id | string(64) | M | 客户ID |
| sell_currency | string(3) | M | 卖出币种 |
| buy_currency | string(3) | M | 买入币种 |
| sell_amount | decimal(18,2) | M | 卖出金额,最多两位小数 |
| buy_amount | decimal(18,2) | M | 买入金额=卖出金额*汇率,四舍五入保留两位小数 |
| rate_id | long | M | 汇率ID |
| rate | decimal(18,9) | M | 汇率 |
| extra_info | string(128) | O | 扩展字段 |
返回响应
| Parameter | Type | Required | Description |
|---|---|---|---|
| partner_order_id | string(64) | M | 客户订单号 |
| order_id | string(64) | M | 平台订单号 |
| status | string(64) | M | 状态,见下方说明 |
返回示例
- 成功
- 失败
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": "PROCESSING",
"partner_order_id": "test_6ac4adc3d17d",
"order_id": "OE2309060002435297"
}
}
{
"code": 900000,
"message": "system error,pls call the technical support",
"data": null
}
错误码
| 错误码 | 描述 | 解决方案 |
|---|---|---|
| 900000 | system error | 系统错误,请联系PingPong技术人员核查 |
| 900002 | illegal param | 参数有误,请根据提示更正信息 |
| 950000 | query account error | 账户查询错误,请稍后重试或联系PingPong技术人员核查 |
status状态值
| 状态值 | 描述 |
|---|---|
| PROCESSING | 处理中 |
| SUCCESS | 成功 |
| FAILED | 失败 |