WSPN
Language
  • English
Version
  • V1.0
Wallet
Language
  • English
Version
  • V1.0
Wallet
Twitter
Telegram
Linkedin
  1. Transaction
  • Introduction
  • Get Started
  • Signature
  • About WUSD
  • Webhook Service
  • Sandbox Environment
  • Blockchain Confirmations
  • Appendix
  • API Keys
  • 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
      • User Account
        • Country List
        • Create
        • Batch Create
        • Kyb Submit
        • Kyb Batch Submit
        • Sub Account
        • Sub Account/Api Key
      • File Upload
        • File Upload
  1. Transaction

Get Exchange Rate

Developing
Sandbox
https://wallet.test.wspn.io
Sandbox
https://wallet.test.wspn.io
POST
/openapi/v1/mint-redeem/exchange-rate
This API retrieves the current exchange rate between two currencies, which is
used for performing a swap transaction.
The exchange rate is valid for 30 seconds and can only be used once.

Request

Body Params text/plain
Example
FieldTypeRequiredMax LengthDescription
queryObjectY
sellCurrencyStringY
buyCurrencyStringY
Example:{ "query": { "sellCurrency": "USD", "buyCurrency": "WUSD" } }

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/exchange-rate' \
--header 'Content-Type: text/plain' \
--data-raw '{
"query": {
        "sellCurrency": "USD",
        "buyCurrency": "WUSD"
    }
}'

Responses

🟢200成功
application/json
Body
header
object 
required
success
boolean 
required
result
object 
required
sellCurrency
string 
required
buyCurrency
string 
required
rateExpiryTime
string 
required
rate
string 
required
quoteId
string 
required
sellBalance
string 
required
Example
{
    "header": {
        "success": true
    },
    "result": {
        "sellCurrency": "USD",
        "buyCurrency": "WUSD",
        "rateExpiryTime": "2025-01-03 17:39:09",
        "rate": "0.9000",
        "quoteId": "8016139035117494952",
        "sellBalance": "0.00"
    }
}
Modified at 2025-01-03 09:41:10
Previous
Get Fiat Transaction
Next
Create Mint/Redeem
Built with