Finalize Swap: BTC to USD
https://sandboxapi.bitnob.co/api/v1/wallets/finalize-swap-for-usd (opens in a new tab)
Body Parameters
Parameter | type | Required |
---|---|---|
quoteId (ID from initialize swap response data) | string | ✅ |
amount | int32 | |
reference | string |
Request
Wallets/Finalize Swap [POST]
curl --request POST \
--url https://sandboxapi.bitnob.co/api/v1/wallets/finalize-swap-for-usd \
--header 'Authorization: Bearer API-KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"quoteId": "string",
"amount": 0,
"reference": "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"
}
}
Last updated on