WSPN
Language
  • English
Version
  • V1.0
HomeWallet
Language
  • English
Version
  • V1.0
HomeWallet
Twitter
Telegram
Linkedin
  1. Transaction
  • Introduction
  • Get Started
  • Signature
  • What is WUSD
  • Webhook Service
  • Sandbox Environment
  • Blockchain Confirmations
  • Appendix
  • API Keys
  • Core Functionality
    • Core Functionality
    • Quickstart: Deposit via Blockchain Wallet
    • Quickstart: Withdraw via Blockchain Wallet
    • Quickstart: Deposit via Funds Transfer
    • Quickstart: Withdraw to Bank
  • Api Reference
    • Authentication
      • Get Access Token
      • Refresh Access Token
    • Wallet
      • Address
        • Get Deposit Address
        • Add Whitelist Address
        • Get Whitelist Address
        • Delete Whitelist Address
      • Remit Info
        • Get Deposit Remit Info
        • Add Remit Info
        • Edit Remit Info
        • Get Remit Info
        • Delete Remit Info
      • Transaction
        • Get Balance
          POST
        • Create Fiat Deposit
          POST
        • Create Fiat Withdraw
          POST
        • Create Crypto Withdraw
          POST
        • Get Fiat Transaction
          GET
        • Get Exchange Rate
          POST
        • Create Mint/Redeem
          POST
        • Mint/Redeem History
          POST
        • Get Mint Redeem Receipt
          POST
        • Get Fiat Transaction Receipt
          POST
        • Get Crypto Transaction Receipt
          POST
  1. Transaction

Create Mint/Redeem

Developing
POST
/openapi/v1/mint-redeem/create
API convert all of their balance from one currency to another, ensuring the
correct amount is exchanged based on the current exchange rate.

Request

Body Params text/plain
Example
FieldTypeRequiredMax LengthDescription
queryObjectY
sellCurrencyStringY
buyCurrencyStringY
sellAmountStringY20sell currency account all balance, decimal scale: 2,JPY: 0
quoteIdStringY20The 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.
requestIdStringY64A unique identifier for the request.
If the same request is sent again with the same requestId, it will be rejected to prevent duplicate processing.
Example:{ "query": { "sellCurrency": "USD", "buyCurrency": "WUSD", "sellAmount": "1", "quoteId": "8367087144895845572", "requestId": "af52515a-1779-4bdd-81f11-D21121" } }

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
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" 
    }
}'

Responses

🟢200成功
application/json
Body
header
object 
required
success
boolean 
required
result
object 
required
id
integer 
required
status
string 
required
sellCurrency
string 
required
buyCurrency
string 
required
sellAmount
string 
required
buyAmount
string 
required
rate
string 
required
quoteId
string 
required
createdTime
string 
required
completedTime
string 
required
Example
{
  "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"
  }
}
Previous
Get Exchange Rate
Next
Mint/Redeem History
Built with