v1

latestOpenAPI 3.1.02026-07-24590534.0 KB

Confirm Instant Swap

This endpoint is used to confirm an instant swap quotation. After confirmation, the system enqueues the instant swap for execution and sends webhooks with the final status, either success or failure, once the trade is completed or has failed.

post/users/{user_id}/swap_quotation/{quotation_id}/confirm

Path parameters

user_idstring required

The User ID. Use 'me' if fetching wallets of main authenticated user, use the user_id if fetching for Sub-account linked to the authenticated user

quotation_idstring required

ID of a swap quotation

Response

200

statusstring
messagestring

Example response

{
  "status": "success",
  "message": "Successful",
  "data": {
    "id": "ib2m2s7i",
    "from_currency": "USDT",
    "to_currency": "SOL",
    "from_amount": "3.254",
    "received_amount": "0.019281934593118",
    "execution_price": "0.0059256",
    "status": "initiated",
    "created_at": "2024-04-10T12:38:13.108Z",
    "updated_at": "2024-04-10T12:38:13.108Z",
    "swap_quotation": {
      "id": "v3w65wfl",
      "from_currency": "USDT",
      "to_currency": "SOL",
      "quoted_price": "0.0059256098933983",
      "quoted_currency": "SOL",
      "from_amount": "3.254",
      "to_amount": "0.019281934593118",
      "confirmed": true,
      "expires_at": "2024-04-10T12:38:21.000Z",
      "created_at": "2024-04-10T12:38:06.000Z",
      "updated_at": "2024-04-10T12:38:12.966Z",
      "user": {
        "id": "23azi7bj",
        "sn": "QDXXIRPXXKS",
        "email": "testuser@gmail.com",
        "first_name": "Oye",
        "last_name": "Olalekan",
        "display_name": "appstate",
        "created_at": "2021-04-09T09:48:14.000Z",
        "updated_at": "2024-03-12T10:34:34.000Z"
      }
    },
    "user": {
      "id": "23azi7bj",
      "sn": "QDXXIRPXXKS",
      "email": "testuser@gmail.com",
      "first_name": "Oye",
      "last_name": "Olalekan",
      "display_name": "appstate",
      "created_at": "2021-04-09T09:48:14.000Z",
      "updated_at": "2024-03-12T10:34:34.000Z"
    }
  }
}