Skip to main content
POST
/
v1
/
quotes
Create a new Quote
curl --request POST \
  --url https://api.sandbox.busha.so/v1/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_currency": "BTC",
  "target_currency": "BTC",
  "quote_currency": "NGN",
  "quote_amount": "100",
  "reversal_policy": "conversion_only",
  "reference": "QUO_123456abc",
  "source_amount": "100",
  "target_amount": "100",
  "pay_in": {
    "type": "address",
    "network": "BTC",
    "phone": "+2348012345678",
    "recipient_id": "64ae8c26ea1033204c805a8a"
  },
  "pay_out": {
    "type": "address",
    "recipient_id": "64ae8c26ea1033204c805a8a",
    "address": "tb1qj4263506wyu8khrz2dwce0agk8lhyjgy269rxr",
    "network": "BTC",
    "memo": "memo"
  }
}
'
{
  "status": "success",
  "message": "message for success",
  "data": {
    "id": "bus_123456789",
    "source_currency": "BTC",
    "target_currency": "BTC",
    "source_amount": "100",
    "target_amount": "100",
    "profile_id": "bus_123456789",
    "rate": {
      "product": "BTCUSDT",
      "rate_explained": "1 BTC = 1000 USDT",
      "source_currency": "BTC",
      "target_currency": "BTC",
      "rate": "100",
      "side": "sell",
      "type": "FIXED"
    },
    "fees": [
      {
        "name": "processing_fee",
        "amount": {
          "amount": "100",
          "currency": "BTC"
        },
        "type": "FIXED",
        "converted_amount": {
          "amount": "100",
          "currency": "BTC"
        }
      }
    ],
    "reference": "QUO_123456abc",
    "status": "pending",
    "created_at": "2023-10-15T12:15:30Z",
    "updated_at": "2023-10-15T12:20:45Z",
    "pay_in": {
      "type": "address",
      "recipient_id": "64ae8c26ea1033204c805a8a",
      "address": "tb1qj4263506wyu8khrz2dwce0agk8lhyjgy269rxr",
      "network": "BTC",
      "memo": "address memo",
      "profile_id": "profile-id-1234",
      "recipient_details": {
        "account_name": "<string>",
        "bank_name": "<string>",
        "account_number": "<string>",
        "country_code": "NG",
        "provider": "<string>",
        "iban": "NG12345678901234567890",
        "currency": "<string>",
        "phone_number": "<string>",
        "name": "<string>",
        "email": "sbsbs@busha.co",
        "bank_code": "100020"
      },
      "blockchain_hash": "31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "blockchain_url": "https://explorer.com/tx/31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "session_id": "31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "from_address": "31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "expires_at": "2023-10-15T12:15:30Z"
    },
    "pay_out": {
      "type": "address",
      "recipient_id": "64ae8c26ea1033204c805a8a",
      "address": "tb1qj4263506wyu8khrz2dwce0agk8lhyjgy269rxr",
      "network": "BTC",
      "memo": "address memo",
      "profile_id": "profile-id-1234",
      "recipient_details": {
        "account_name": "<string>",
        "bank_name": "<string>",
        "account_number": "<string>",
        "country_code": "NG",
        "provider": "<string>",
        "iban": "NG12345678901234567890",
        "currency": "<string>",
        "phone_number": "<string>",
        "name": "<string>",
        "email": "sbsbs@busha.co",
        "bank_code": "100020"
      },
      "blockchain_hash": "31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "blockchain_url": "https://explorer.com/tx/31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "session_id": "31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "from_address": "31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171",
      "expires_at": "2023-10-15T12:15:30Z"
    },
    "expires_at": "2023-12-01T15:04:05Z",
    "two_step": {
      "type": "authenticator",
      "message": "Enter your 2FA code to continue",
      "resend_allowed": false
    },
    "quote_rate": {
      "product": "BTCUSDT",
      "rate_explained": "1 BTC = 1000 USDT",
      "source_currency": "BTC",
      "target_currency": "BTC",
      "rate": "100",
      "side": "sell",
      "type": "FIXED"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer Authentication

Headers

X-BU-PROFILE-ID
string

User profile header

Example:

"BUS_YOK8tp5Zga01qOKEsqp07"

X-BU-PUBLIC-KEY
string
Example:

"pub_uibaidu930ani"

Body

application/json

Create a new Quote

source_currency
string<string>
required

A valid currency

Required string length: 1 - 10
Example:

"BTC"

target_currency
string<string>
required

A valid currency

Required string length: 1 - 10
Example:

"BTC"

quote_currency
string<string>

This optional field specifies the fiat currency to display amounts in, which is converted from the source amount

Required string length: 1 - 10
Example:

"NGN"

quote_amount
string

The amount in the quote currency. Required when quote_currency is provided

Example:

"100"

reversal_policy
enum<string>

This optional field specifies the reversal policy for the conversion. Allowed values are 'conversion_only'.

Available options:
conversion_only
reference
string
Required string length: 12 - 64
Example:

"QUO_123456abc"

source_amount
string

Source Amount. Either source_amount or target_amount must be set.

Example:

"100"

target_amount
string

Target Amount. Either source_amount or target_amount must be set.

Example:

"100"

pay_in
object
pay_out
object

Response

Quote Response

General response Values

status
enum<string>
required
Available options:
success,
error
Example:

"success"

message
string
required
Example:

"message for success"

data
object
required