Skip to main content

Get Bulk Exchange Rates (Specs)

Overview

The POST /banking/ibans/v2/fx/bulk-exchange-rates endpoint retrieves live indicative foreign exchange rates for multiple currency pairs in a single HTTP request.

Use this endpoint to:

  • Populate multi-currency pricing tables and dashboards.
  • Compare exchange rates across multiple corridors before initiating trades.
  • Retrieve all available currency pairs by setting fetchAll=true.

Resource Access

  • HTTP Method: POST
  • Endpoint: /banking/ibans/v2/fx/bulk-exchange-rates
  • Authentication: Bearer token required

Request Headers

HeaderValueRequiredDescription
AuthorizationBearer {access_token}YesJWT Bearer access token
Content-Typeapplication/jsonYesRequest payload format
Acceptapplication/jsonYesResponse payload format

Query Parameters

ParameterTypeRequiredDescriptionExample
fetchAllbooleanNoIf true and the request body is empty, fetches rates for all active currency pairs.true

Request Body

The request body accepts a JSON array of currency pair objects.

Request Fields

FieldTypeRequiredDescriptionExample
currencyFromstringYes3-letter ISO code for the source currency.USD
currencyTostringYes3-letter ISO code for the target currency.GBP

Request Example

[
{
"currencyFrom": "USD",
"currencyTo": "GBP"
},
{
"currencyFrom": "USD",
"currencyTo": "EUR"
},
{
"currencyFrom": "EUR",
"currencyTo": "GBP"
}
]

Response

Success Response (200 OK)

{
"success": true,
"rates": [
{
"rate": "0.72",
"currencyFrom": "USD",
"currencyTo": "GBP"
},
{
"rate": "0.90",
"currencyFrom": "USD",
"currencyTo": "EUR"
},
{
"rate": "0.80",
"currencyFrom": "EUR",
"currencyTo": "GBP"
}
]
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the request succeeded.
ratesarrayArray of rate results for the requested pairs.
rates[].ratestringCurrent indicative exchange rate.
rates[].currencyFromstringSource currency code.
rates[].currencyTostringTarget currency code.

Error Codes

Status CodeDescriptionReason
401 UnauthorizedAuthentication failureMissing, invalid, or expired Bearer token.
403 ForbiddenAccess deniedInsufficient permissions to query FX rates.
500 Server ErrorInternal errorServer error while retrieving market rates.

Code Examples

cURL

curl -X POST "https://api.ahrvo.network/banking/ibans/v2/fx/bulk-exchange-rates" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '[
{"currencyFrom": "USD", "currencyTo": "GBP"},
{"currencyFrom": "USD", "currencyTo": "EUR"}
]'

JavaScript (Fetch)

const response = await fetch('https://api.ahrvo.network/banking/ibans/v2/fx/bulk-exchange-rates', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{ currencyFrom: 'USD', currencyTo: 'GBP' },
{ currencyFrom: 'USD', currencyTo: 'EUR' }
])
});

const data = await response.json();
if (data.success) {
data.rates.forEach(pair => {
console.log(`1 ${pair.currencyFrom} = ${pair.rate} ${pair.currencyTo}`);
});
}

Python (requests)

import requests

url = "https://api.ahrvo.network/banking/ibans/v2/fx/bulk-exchange-rates"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = [
{"currencyFrom": "USD", "currencyTo": "GBP"},
{"currencyFrom": "USD", "currencyTo": "EUR"}
]

response = requests.post(url, json=payload, headers=headers)
data = response.json()

if data.get("success"):
for pair in data["rates"]:
print(f"1 {pair['currencyFrom']} = {pair['rate']} {pair['currencyTo']}")

Interactive API Console

Test the endpoint directly in your browser: