文档中心/API 接口

API REFERENCE

查询换汇订单

POSThttps://mapi.yabandpay.com/Payments
实际接口
API PLAYGROUND · 实际接口

查询换汇订单

POSThttps://mapi.yabandpay.com/Payments
填写凭据后自动签名

请求参数2

先填写必填项

查询换汇订单

trade_id必填stringdata.trade_id询价的id
request_id必填stringdata.request_id请求id需保持唯一,建议24以上位数字+字母

凭据仅在当前页面使用。secret_key 不保存,也不发送给文档服务器。

该API用于查询换汇订单信息

在换汇订单创建并执行完成后,可通过该接口查询订单的最新状态、成交信息及相关交易详情。

请使用专有账号

user=040268

参数类型描述是否必填
userStringMerchant级的UID必填
signString签名必填
methodStringv3.QueryFXOrder必填
timeLong时间戳必填
  • 参数
参数类型描述是否必填
trade_idString询价的id必填
request_idString请求id需保持唯一,建议24以上位数字+字母必填

签名示例:

拼接为URL方式并排序后的字符串

"method=v3.QueryFXOrder&request_id=20304095064069023960369q-11&time=1546588959&trade_id=6e5cf660fb58455cd68a413a8249061a&user=040268"

得到的 stringA 使用 secret_key做签名

得到的签名如下:

"YOUR_SIGNATURE"

提交示例:

{
  "user": "040268",
  "sign": "YOUR_SIGNATURE",
  "method": "v3.QueryFXOrder",
  "time": 1546588959,
  "data": {
    "trade_id": "6e5cf660fb58455cd68a413a8249061a",
    "request_id": "20304095064069023960369q-11"
  }
}

返回示例:

{
  "status": true,
  "code": "200",
  "data": {
    "booking_status": "success",
    "settlement_status": "settled",
    "sell_currency": "GBP",
    "buy_currency": "DKK",
    "sold_currency": "GBP",
    "sold_amount": "1.00",
    "bought_currency": "DKK",
    "bought_amount": "8.54",
    "tenor": "TOD",
    "exchange_rate": "8.544924729",
    "order_id": "YOUR_ORDER_ID",
    "quote_id": "83e96dc0-8f8e-48c7-9bc4-6acc1019fced",
    "trade_id": "6e5cf660fb58455cd68a413a8249061a",
    "reference": "YB test"
  },
  "message": "",
  "response_id": "202603181711118835985708"
}

更多信息:

返回结果:
  1. 调用成功,则返回"status": true
  2. 调用失败,则返回"status": false
返回代码:
StatusCodeMessage
true200
false-1000Internal error
false-403The signature Error
false-2001The user not exist
false-3001Required field is missing
false-4118Incorrect request ID
booking_status
StatusDescription
successThe FX booking request was successfully processed and the order has been created or executed.
failedThe request failed due to an internal system error. Please retry later or contact technical support if the issue persists.
pendingThe request is pending because the request signature verification failed. Please verify the signature parameters and try again.
reversedThe request could not be processed because the specified user does not exist in the system.
rolledThe request was rejected because one or more required fields are missing in the request parameters.
updatedThe request ID provided is incorrect or does not match any existing transaction.
settlement_status:
StatusDescription
openThe FX order has been successfully created and is awaiting settlement.
settledThe FX transaction has been fully settled and the funds have been delivered according to the agreed tenor.
pendingThe FX order has been created but settlement has not yet been completed. This may occur while waiting for the settlement date (e.g., SPOT T+2).
cancelledThe FX order has been cancelled and will not be settled.