Generate order information

After wallet sent the FROM currency, upload hash to get the order details

Endpoint usage

POST https://sswap.swft.pro/api/exchangeRecord/updateDataAndStatus

The fields with * are required, and the fields without * are optional

Request Body

{
 "resCode":100,
 "resMsg":"success",
 "data":{
  "orderId":"..." // 订单号orderId
  }
}

Code example

// example
//You can get the order number through the swap interface
const params = {
    hash: '0x05920386bc07d71b58109fab0ab591c5e07d7b15f7a8d77c692fd735048d9dba', //  User sends token hash
    fromTokenAddress: '0x55d398326f99059ff775485246999027b3197955',
    toTokenAddress: '0xa71edc38d189767582c38a3145b5873052c3e47a',
    fromAddress:"0x19...",
    toAddress:"0x19...",
    fromTokenChain:"HECO",
    toTokenChain:"HECO",
    fromTokenAmount: "3293000000000000000",
    amountOutMin:"28891153244504185000",
    fromCoinCode:"HT(HECO)",
    toCoinCode:"USDT(HECO)"
}
const res = await axios.post('https://sswap.swft.pro/api/exchangeRecord/updateDataAndStatus',params)
console.log(res)

Postman

Last updated