查询订单状态
介绍
此接口用于查询订单结果。
接口说明
路径:GET /open/api/v3/merchant/query/trade
❗️该接口只能在服务端被调用
Header参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
appid | Y | string | 应用的唯一标识 |
timestamp | Y | string | 当前 UTC 13位时间戳, 5分钟内有效 |
sign | Y | string | 将appId,timeStamp,和请求的参数按字母排序进行签名,签名方式可参考这里 |
Body参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
orderNo | N | string | 订单编号 |
merchantOrderNo | N | string | 商户系统订单编号 |
side | Y | string | 订单交易方向可选:BUY 或 SELL 不传时默认查询买币订单 |
示例
买币请求参数:
https://openapi-test.alchemypay.org/merchant/query/trade?orderNo=1028577684629876736&side=BUY>
查询结果
买币订单查询
{
"success": true,
"returnCode": "0000",
"returnMsg": "SUCCESS",
"extend": "",
"data": {
"payTime": "20240218 17:57:27",
"txTime": "20240218 18:02:00",
"networkFee": "0.59",
"rebateFiatAmount": "0.00",////rebate amount(priced in fiat)
"fiatInUSD": "16.16",
"network": "ELF",
"tokenAddress": "",
"cryptoPrice": "0.58960000",
"payType": "CREDIT_CARD",
"rampFee": "0.97",
"appId": "f83Is2y7L425rxl8",
"fiat": "EUR",
"txHash": "b42deff9e2f8203610206e12c81141a1535500857e73019bf4a497976eab3d3d",
"rampFeeInUSD": "1.04",//rampFee (priced in USD)
"side": "BUY",
"amount": "15.00000000",
"orderNo": "1208713811041964032",
"address": "2e2cHgY9uL12P2xYo6w4MZETXB38oGimUPsfKQPHuJCu1FPCTy",
"cryptoNetworkFee": "1",//priced counted on purchased tokens
"networkFeeInUSD": "0.63",//networkFee (priced in USD)
"networkfee": "0.59",//expired
"cryptoAmountInUSDT": "14.48063802",//The token received by user (priced in USDT)
"rebateUsdAmount": "0.00",//rebate amount
"crypto": "ELF",
"rampFeeUnit": "EUR",
"rampfee": "0.97",//expired
"cryptoQuantity": "22.78759300",
"createTime": "20240218 17:57:09",
"alpha2": "DE",
"status": "FINISHED"//PENDING, PAY_FAIL, PAY_SUCCESS, TRANSFER, CANCEL, FINISHED
},
"traceId": "65ead0a2c1d741ee8080a393696061b1"
}
此两个字段中止使用:"networkfee" ,"rampfee"
status为FINISHED返回以下参数:
参数名 | 类型 | 说明 |
---|---|---|
fiatInUSD | string | 法币金额(以USD计价) |
rampFeeInUSD | string | 服务费(以USD计价) |
cryptoNetworkFee | string | 以购买的token计价 |
networkFeeInUSD | string | 网络费(以USD计价),按cryptoNetworkFee计算成USD计价 |
cryptoAmountInUSDT | string | 用户收到的的token(以USDT计价) |
卖币订单查询
{
"orderNo": "1080106145537236992",
"address": "dev03dc84dbfeb74853aa91154efa9b7a13", // wallet address user need to transfer
"payTime": "2023-02-28 20:44:46", // transfer fiat start time
"completeTime": "2023-02-28 20:41:08", // block confirm time
"merchantOrderNo": "kvhl6zvvrg",
"crypto": "USDT",
"network": "TRX",
"cryptoPrice": "1.0000000000", // fiat
"cryptoAmount": "100.0000000000",
"fiatAmount": "100.0000000000", //fiat amount contains ramp feee
"appId": "ahzxh0klegv1fzol",
"fiat": "USD",
"txHash": "sdasdasdasdasdasdsad",
"email": "[email protected]",
"signature": "9aa9b34e950061f1bb1e9ccd6fadcedab8e354f6",
"status": "4", // 1:order create success 2:user trnasfered token 3:start to pay fiat to user 4:payment success 5:payment fail 6:refund success 7:order expired
"orderAddress": "https://ramp-dev.alchemytech.cc/#/sellOrder?sellOrderId\u003d1080106145537236992", // order detail page
"cryptoActualAmount": "100.0000000000", //
"rampFee": "1.7500000000", // fiat
"receiptTime": "2023-02-28 20:45:22", //transfer fiat success time
"paymentType": "10001", // 10001 banktransfer
"name": "asdfsfsd", // account name
"account": "******4567", // account number
"card": "", // card No
"failReason": "" // failReason
}
Updated 10 months ago