Swap endpoints exchange one supported asset for another. Keep swaps behind your backend authorization flow and only enable supported asset pairs for your environment.

Endpoints

GET  /api/v1/swaps/quotes
GET  /api/v1/swaps/market
POST /api/v1/swaps
POST /api/v1/swaps/{id}/confirm
POST /api/v1/swaps/{id}/cancel

Fetch a quote

GET /api/v1/swaps/quotes?from=usdt&to=bitcoin&amount=10
The from and to assets must be supported by Simfy Business for your environment. Example response:
{
  "status": "success",
  "message": "Success",
  "data": {
    "quotedPrice": "0.000012958877042030484",
    "originalQuotedPrice": "0.000012856028811538178896196",
    "fee": "1.0284823049230543e-7",
    "quotedCurrency": "BTC",
    "toAmount": "0.00012753152",
    "originalToAmount": "0.00012856"
  }
}

Create a swap

{
  "from": "usdt",
  "to": "bitcoin",
  "amount": 10,
  "password": "CUSTOMER_AUTHORIZATION_VALUE"
}
Confirm or cancel the swap using the returned swap request ID.