# 1、法币兑换加密
请求方式
- POST
URL:
/api/v1/exchange/express/trade/buy
Content-Type:
Content-Type: application/json; charset=utf-8
请求头参数(Header)
Param | Type | Description | Sample |
---|---|---|---|
access_key | String | 商户后台获取的访问密钥 | pFqV75X3 |
timestamp | int64 | Unix 毫秒时间戳(13 位) | 1679724896223 |
nonce | String | UUID V4 随机字符串 | 794c26b0-d33c-4394-b2bb-c485eca16d9e |
sign | String | 通过签名算法计算的签名 | kAXyh+eerqrefyaF8dyFB0M4FVo= |
上述参数全部作为 HTTP Header 传入
请求体数据示例: INR
{
"externalOrderId": "20250513184347329830",
"chainType": "BSC",
"tokenType": "USDT",
"addressTo": "0xa8666442fA7583F783a169CC9F3333333360295E8",
"tokenAmount": "1",
"currencyType": "INR",
"payType": "BANK",
"remark": "test",
"notifyUrl": ""
}
参数说明:
参数名 | 类型 | 是否必填 | 描述 |
---|---|---|---|
tokenAmount | Decimal | 是 | 代币金额 |
externalOrderId | String | 是 | 商户订单号 |
chainType | String | 是 | 链类型 BSC |
tokenType | String | 是 | 代币类型 USDT |
addressTo | String | 是 | 地址 |
currencyType | String | 是 | 货币类型 INR |
payType | string | 是 | 支付类型:BANK UPI |
notifyUrl | String | 否 | 支付完成后回调地址(服务端) |
remark | String | 否 | 商户自定义备注信息 |
响应类型:
Header: { 'Content-Type': 'application/json;charset=utf-8'}
创建收款响应说明:
正常响应数据示例(HTTP 200)
{
"code": "200",
"success": true,
"msg": "成功",
"msgEn": "SUCCESS",
"data": {
"chainType": "BSC",
"currencyAmount": "83.2309",
"tokenAmount": "1",
"currencyType": "INR",
"tokenType": "USDT",
"externalOrderId": "20250513184347329830",
"orderId": "OEXCHEXCH202505131043481747133028307-U0000000401298824",
"tradeType": "BUY",
"payUrl": null,
"exchangePrice": "83.2309",
"orderFee": "0.0118",
"bankAccountNumber": null,
"bankAccountType": null,
"bankCode": null,
"bankName": null,
"cashierUrl": "http://fiat/OEXCHEXCH202505131043481747133028307-U0000000401298824"
}
}
响应参数说明
参数名 | 类型 | 描述 |
---|---|---|
chainType | String | 主链 |
currencyAmount | String | 法币金额 |
tokenAmount | String | 代币金额 |
currencyType | String | 法币类型 |
tokenType | String | 代币类型 |
externalOrderId | String | 商户订单号 |
orderId | String | 订单号 |
tradeType | String | 交易类型 |
payUrl | String | 法币支付链接(根据实际情况使用) |
BankAccountNumber | String | 渠道银行账户号码(根据实际情况使用) |
exchangePrice | String | 汇率 |
orderFee | String | 手续费 |
BankAccountType | String | 渠道银行账户类型(根据实际情况使用) |
BankCode | String | 渠道银行代码(根据实际情况使用) |
BankName | String | 渠道银行名(根据实际情况使用) |
cashierUrl | String | 兑换收银台链接 |
请求体数据示例: BRL
{
"externalOrderId": "20250513192309317184",
"chainType": "BSC",
"tokenType": "USDT",
"addressTo": "0xa8666442fA7583F783a169CC9F5449333333395E8",
"tokenAmount": "10.214234221423422312",
"currencyType": "BRL",
"payType": "PIX",
"remark": "test",
"notifyUrl": ""
}
参数说明:
参数名 | 类型 | 是否必填 | 描述 |
---|---|---|---|
tokenAmount | Decimal | 是 | 代币金额 |
externalOrderId | String | 是 | 商户订单号 |
chainType | String | 是 | 链类型 BSC |
tokenType | String | 是 | 代币类型 USDT |
addressTo | String | 是 | 地址 |
currencyType | String | 是 | 货币类型 BRL |
payType | string | 是 | 支付类型:PIX |
notifyUrl | String | 否 | 支付完成后回调地址(服务端) |
remark | String | 否 | 商户自定义备注信息 |
响应类型:
Header: { 'Content-Type': 'application/json;charset=utf-8'}
创建收款响应说明:
正常响应数据示例(HTTP 200)
{
"code": "200",
"success": true,
"msg": "成功",
"msgEn": "SUCCESS",
"data": {
"chainType": "BSC",
"currencyAmount": "60.72",
"tokenAmount": "10.214234221423422312",
"currencyType": "BRL",
"tokenType": "USDT",
"externalOrderId": "20250513192309317184",
"orderId": "OEXCHEXCH202505131123101747135390221-U0000000401298839",
"tradeType": "BUY",
"payUrl": null,
"exchangePrice": "5.944444",
"orderFee": "0.204284684428468447",
"bankAccountNumber": null,
"bankAccountType": null,
"bankCode": null,
"bankName": null,
"cashierUrl": "http://fiat/OEXCHEXCH202505131123101747135390221-U0000000401298839"
}
}
响应参数说明
参数名 | 类型 | 描述 |
---|---|---|
chainType | String | 主链 |
currencyAmount | String | 法币金额 |
tokenAmount | String | 代币金额 |
currencyType | String | 法币类型 |
tokenType | String | 代币类型 |
externalOrderId | String | 商户订单号 |
orderId | String | 订单号 |
tradeType | String | 交易类型 |
payUrl | String | 法币支付链接(根据实际情况使用) |
BankAccountNumber | String | 渠道银行账户号码(根据实际情况使用) |
exchangePrice | String | 汇率 |
orderFee | String | 手续费 |
BankAccountType | String | 渠道银行账户类型(根据实际情况使用) |
BankCode | String | 渠道银行代码(根据实际情况使用) |
BankName | String | 渠道银行名(根据实际情况使用) |
cashierUrl | String | 兑换收银台链接 |