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
| Header | Value | Required | Description |
|---|---|---|---|
Authorization | Bearer {access_token} | Yes | JWT Bearer access token |
Content-Type | application/json | Yes | Request payload format |
Accept | application/json | Yes | Response payload format |
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
fetchAll | boolean | No | If 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
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
currencyFrom | string | Yes | 3-letter ISO code for the source currency. | USD |
currencyTo | string | Yes | 3-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
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates whether the request succeeded. |
rates | array | Array of rate results for the requested pairs. |
rates[].rate | string | Current indicative exchange rate. |
rates[].currencyFrom | string | Source currency code. |
rates[].currencyTo | string | Target currency code. |
Error Codes
| Status Code | Description | Reason |
|---|---|---|
401 Unauthorized | Authentication failure | Missing, invalid, or expired Bearer token. |
403 Forbidden | Access denied | Insufficient permissions to query FX rates. |
500 Server Error | Internal error | Server 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: