Finalize Swap
https://sandboxapi.onbrails.com/api/v1/wallets/finalize-swap (opens in a new tab)
Finalize a currency swap
Body Parameters
Parameter | type | Required |
---|---|---|
quoteId (ID from initialize swap response data) | string | ✅ |
Request
Wallets/Finalize Swap [POST]
curl --request POST \
--url https://sandboxapi.onbrails.com/api/v1/wallets/finalize-swap \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"quoteId":"string"}'
Responses
🟢 200 - Result example
{
"status": true,
"message": "swap finalized",
"data": {
"id": "79146e20-ff2b-428d-b246-b42a3575c51f",
"createdAt": "2023-12-12T23:21:08.784Z",
"updatedAt": "2023-12-12T23:21:08.784Z",
"reference": "1574c5578897",
"description": "sell usd ",
"balanceAfter": 484160.444,
"amount": 10,
"centAmount": 1000,
"fees": 0,
"centFees": 0,
"spotPrice": "1150",
"action": "swap_usd_ngn",
"type": "debit",
"status": "success",
"channel": "swap",
"companyId": "a1673c3d-995d-4c04-a5a4-8d56ed26dcb9"
}
}