API Reference
Wallets
Initialize Swap: BTC to USD [POST]

Initialize Swap: BTC to USD

https://sandboxapi.bitnob.co/api/v1/wallets/initialize-swap-for-usd (opens in a new tab)


Body Parameters

ParametertypeRequired
amountint32

Request

Wallets/ Initialize Swap: BTC to USD [POST]
curl --request POST \
   --url https://sandboxapi.bitnob.co/api/v1/wallets/initialize-swap-for-usd \
   --header 'Authorization: Bearer API-KEY' \
   --header 'accept: application/json' \
   --header 'content-type: application/json' \
   --data '{"amount":0}'

Responses

🟢 200 - Result example
{
"status": true,
"message": "Quote retrieved successfully",
"data": {
  "quote": {
    "expiration": "2024-03-05T10:10:38.807Z",
    "expirationInSec": "210",
    "amount": 1,
    "volume": 0.00001502,
    "price": 66576.057,
    "__v": 0,
    "description": "quote for selling $1 of BTC",
    "id": "65e6eecce6e92367539f6673"
  },
  "quoteId": "65e6eecce6e92367539f6673"
}
}
Last updated on