发起换汇
换汇询价
Endpoint
Sandbox
POST https://preapi.futurepay-develop.com/api/v1/fx/inquiryProduction
POST https://api.futurepay.global/api/v1/fx/inquiryRequest Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
direction | M | int | 指定买入卖出,0:指定买入,1:指定卖出 |
buyCcy | M | String | 买入币种 |
sellCcy | M | String | 卖出币种 |
amount | M | BigDecimal | 交易金额 |
Request Example
{
"direction": 1,
"sellCcy": "MXN",
"buyCcy": "USD",
"amount": "1000"
}Response
| Field | Type | Description |
|---|---|---|
token | String | 换汇汇率锁定Token,发起换汇时需传参调用 |
direction | int | 汇率查询方向,0:买入,1:卖出 |
rate | BigDecimal | 汇率 |
expireTime | Long | 过期时间,Unix 时间戳(秒) |
selling | Money | 卖出金额 |
buying | Money | 买入金额 |
currencyPair | String | 币种对 |
Money
| Field | Type | Description |
|---|---|---|
amount | BigDecimal | 金额 |
currency | String | 币种 |
accuracy | int | 精度 |
Response Example
{
"code": "0",
"msg": "succeeded",
"serverTime": 1781602704768,
"data": {
"token": "fxq_30M8iSJmv6lLbW",
"direction": 1,
"selling": {
"amount": 1000.00,
"currency": "MXN",
"accuracy": 2
},
"buying": {
"amount": 57.31,
"currency": "USD",
"accuracy": 2
},
"currencyPair": "USDMXN",
"rate": "17.4487608109",
"expireTime": 1781602734
},
"success": true
}申请换汇
Endpoint
Sandbox
POST https://preapi.futurepay-develop.com/api/v1/fx/applyProduction
POST https://api.futurepay.global/api/v1/fx/applyRequest Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
reference | M | String | 商户请求订单号 |
token | M | String | 换汇汇率查询 Token |
Request Example
{
"reference": "321315787ss",
"token": "8239018321kk"
}Response
| Field | Type | Description |
|---|---|---|
tradeNo | String | 换汇订单号 |
status | int | 换汇状态,10:处理中,2000:成功,2500:失败,3000:取消 |
Response Example
{
"code": "0",
"msg": "succeeded",
"serverTime": 1763113556851,
"data": {
"tradeNo": "Fx43890183213474",
"status": 10
},
"success": true
}换汇订单查询
Endpoint
Sandbox
POST https://preapi.futurepay-develop.com/api/v1/fx/query-detailProduction
POST https://api.futurepay.global/api/v1/fx/query-detailRequest Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
merchantReference | O | String | 商户订单号 |
tradeNo | O | String | 换汇订单号 |
Request Example
{
"tradeNo": "Fx238190384173291"
}Response
| Field | Type | Description |
|---|---|---|
tradeNo | String | 换汇订单号 |
direction | int | 汇率查询方向,0:买入,1:卖出 |
rate | BigDecimal | 汇率 |
createTime | Long | 创建时间,Unix 时间戳(秒) |
buyAmount | Money | 买入金额 |
sellAmount | Money | 卖出金额 |
status | int | 换汇状态,10:处理中,2000:成功,2500:失败,3000:取消 |
Money
| Field | Type | Description |
|---|---|---|
amount | BigDecimal | 金额 |
currency | String | 币种 |
accuracy | int | 精度 |
Response Example
{
"code": "0",
"msg": "succeeded",
"serverTime": 1763113556851,
"data": {
"sellAmount": {
"currency": "USD",
"amount": 100.00,
"accuracy": 2
},
"buyAmount": {
"currency": "CNH",
"amount": 700.00,
"accuracy": 2
},
"rate": 7.0000000000,
"createTime": 1763113556851,
"tradeNo": "Fx83290213809131",
"direction": 1,
"status": 2000
},
"success": true
}Webhook
Event
EXCHANGE_ORDER_RESULT
Payload Example
{
"appId": "1929723739684102144",
"merchantId": "1929723739654762496",
"notificationItems": [
{
"msg": "SUCCESS",
"reference": "ZXCZXCZXC",
"eventCode": "EXCHANGE_ORDER_RESULT",
"tradeNo": "FX805275403079772",
"status": 2000,
"eventDate": 1774438800740
}
]
}Updated 28 days ago
Did this page help you?