Field | Type | Required | Max Length | Description |
---|---|---|---|---|
query | Object | Y | ||
sellCurrency | String | Y | ||
buyCurrency | String | Y | ||
sellAmount | String | Y | 20 | sell currency account all balance, decimal scale: 2,JPY: 0 |
quoteId | String | Y | 20 | The quote Id is a unique identifier for a price quote returned during an exchange rate request for a swap. It is used as a parameter during the swap and becomes invalid after a single use, ensuring the transaction is based on the quoted rate. |
requestId | String | Y | 64 | A unique identifier for the request. If the same request is sent again with the same requestId, it will be rejected to prevent duplicate processing. |
curl --location --request POST 'https://wallet.test.wspn.io/openapi/v1/mint-redeem/create' \
--header 'Content-Type: text/plain' \
--data-raw '{
"query": {
"sellCurrency": "USD",
"buyCurrency": "WUSD",
"sellAmount": "1",
"quoteId": "8367087144895845572",
"requestId": "af52515a-1779-4bdd-81f11-D21121"
}
}'
{
"header": {
"success": true
},
"result": {
"id": 250103125,
"status": "COMPLETED",
"sellCurrency": "USD",
"buyCurrency": "WUSD",
"sellAmount": "1000.00",
"buyAmount": "900.00",
"rate": "0.9000",
"quoteId": "8598890293453060261",
"createdTime": "2025-01-03 17:48:35",
"completedTime": "2025-01-03 17:48:36"
}
}