1app
Create Boldd AccountLogin
  • Introduction
  • Authentication
  • Balance
  • Get Exchange Rate
  • Response Code
  • RECEIVE PAYMENTS
    • Payments
      • Initialize Payment
      • Verify Payment
      • Payment List
      • Payment Details
    • Inline/Popup Checkout
    • Payouts / Settlements
      • Payouts List
      • Settlement Transactions
    • Dispute Management
      • Fetch Disputes
      • Accept a Dispute
      • Decline a Dispute
    • Customers List
    • Webhook Notifications
    • Repush Notification
  • Virtual Accounts
    • Get Available Banks
    • Setup Preferred Bank
    • Generate Account
    • Virtual Account List
    • Account Transactions
    • Virtual Account Webhook
      • Notifications history
  • MAKE PAYMENTS
    • Airtime Purchase
    • Send Money
      • Verify Account Number
      • Make Transfer
    • Data Purchase
      • Data Plans
      • Data Bundle
    • Electricity
      • Electricity Billers
      • Verify Meter Number
      • Vend Electricity
    • Cable TV
      • Cable TV List
      • Verify IUC
      • Vend CableTv
    • Bank List
    • Payment Status
  • CUSTOMERS
    • Create Customer
  • VIRTUAL CARDS
    • Create Card Account
    • Cards Issuance
    • Card Funding
    • Card Transactions
    • Get all Cards
    • Cards Details
    • Cards Pan
    • Freeze and Unfreeze Card
  • USD Account
    • Create USD Account
  • IDENTITY
    • BVN Check
    • NIN Checks
  • SUB-ACCOUNTS
    • Create a Sub-Account
    • Attach Bank to a Sub-Account
    • Attach Payout Account
    • Get All Sub-Accounts
    • Sub-Accounts History
    • Sub-Accounts Wallet
  • Miscellaneous
    • Create Wallet
    • Universal Blacklist
  • Contact
    • Contact Us
Powered by GitBook
On this page

Was this helpful?

Get Exchange Rate

This endpoint is used to get currency swap rate between two currency pairs e.g NGN to USD

POST {{base_url}}/business/rate

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer PUBLIC_KEY

Take a look at how you might do this:

curl --location '{{base_url}}/business/rate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer PUBLIC_KEY' \
--data '{
    "currencypair": "USDRWF"
}'
const axios = require('axios');
let data = JSON.stringify({
  "currencypair": "NGNKES"
});

let config = {
  method: 'post',
  url: '{{base_url}}/business/rate',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer PUBLIC_KEY', 
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => '{{base_url}}/business/rate,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "currencypair": "USDNGN"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer PUBLIC_KEY'
  ),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;
var headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer PUBLIC_KEY'
};
var request = http.Request('POST', Uri.parse('{{base_url}}/business/rate'));
request.body = json.encode({
  "currencypair": "USDNGN"
});
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

Sample Response

{
    "status": true,
    "message": "Exchange rate fetched successfully",
    "data": {
        "minAmount": 0.1,
        "maxAmount": 10000,
        "exchangeRate": 1429
    }
}

PreviousBalanceNextResponse Code

Last updated 2 months ago

Was this helpful?