FX Markup Configuration
Overview
Manage FX markup configurations for your company. You can set a universal markup that applies to all currency pairs, or configure specific markups for individual currency pairs. Retrieve existing configurations with optional filters.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /banking/ibans/v2/fx/markup/config | Set FX markup configuration |
GET | /banking/ibans/v2/fx/markup/config | Get FX markup configuration |
Authentication
All requests require a Bearer token in the Authorization header.
Set FX Markup Configuration
Resource Access
- HTTP Method:
POST - Endpoint:
/banking/ibans/v2/fx/markup/config - Authentication: Bearer token required
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
Content-Type | application/json | Yes | Request body content type |
x-api-key | string | No | API key for additional authentication |
Request Body
{
"markupPerc": 2.5,
"currencyFrom": "USD",
"currencyTo": "EUR",
"markupType": "currency_pair"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
markupPerc | number | Yes | Markup percentage (0–10) |
currencyFrom | string | Conditional | Source currency code (required for currency_pair type) |
currencyTo | string | Conditional | Target currency code (required for currency_pair type) |
markupType | string | Yes | Type: currency_pair or universal |
Markup Types
| Type | Description |
|---|---|
currency_pair | Apply markup to a specific currency pair (requires currencyFrom and currencyTo) |
universal | Apply the same markup to all currency pairs |
Response
{
"success": true
}
Get FX Markup Configuration
Resource Access
- HTTP Method:
GET - Endpoint:
/banking/ibans/v2/fx/markup/config - Authentication: Bearer token required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
currencyFrom | string | No | Filter by source currency code |
currencyTo | string | No | Filter by target currency code |
markupType | string | No | Filter by markup type: currency_pair or universal |
Response
{
"success": true,
"configs": [
{
"_id": "507f1f77bcf86cd799439011",
"companyId": "3046",
"markupType": "currency_pair",
"markupPerc": 1.5,
"currencyFrom": "USD",
"currencyTo": "EUR",
"isActive": true,
"createdAt": "2024-08-04T10:30:00Z",
"updatedAt": "2024-08-04T10:30:00Z"
}
],
"statusCode": 200
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates success |
configs | array | Array of markup configuration objects |
configs[]._id | string | Unique config identifier |
configs[].companyId | string | Company identifier |
configs[].markupType | string | Type of markup |
configs[].markupPerc | number | Applied markup percentage |
configs[].currencyFrom | string | Source currency (if currency_pair) |
configs[].currencyTo | string | Target currency (if currency_pair) |
configs[].isActive | boolean | Whether config is currently active |
configs[].createdAt | string (date-time) | Creation timestamp |
configs[].updatedAt | string (date-time) | Last update timestamp |
statusCode | integer | HTTP status code |
Error Responses
- 400 Bad Request: Invalid parameters
- 401 Unauthorized: Invalid or missing authentication token
- 403 Forbidden: Insufficient permissions
- 500 Internal Server Error: Server error
Code Examples
Set Markup - cURL
curl -X POST \
'https://gateway.ahrvo.network/banking/ibans/v2/fx/markup/config' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"markupPerc": 2.5,
"currencyFrom": "USD",
"currencyTo": "EUR",
"markupType": "currency_pair"
}'
Get Markup - cURL
curl -X GET \
'https://gateway.ahrvo.network/banking/ibans/v2/fx/markup/config?currencyFrom=USD¤cyTo=EUR&markupType=currency_pair' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Python
import requests
base_url = "https://gateway.ahrvo.network/banking/ibans/v2/fx/markup/config"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
# Set markup
response = requests.post(base_url, headers=headers, json={
"markupPerc": 2.5,
"currencyFrom": "USD",
"currencyTo": "EUR",
"markupType": "currency_pair"
})
print("Set markup:", response.json())
# Get markup
response = requests.get(base_url, headers=headers, params={
"currencyFrom": "USD",
"currencyTo": "EUR"
})
print("Configs:", response.json()["configs"])
JavaScript (Node.js)
const axios = require('axios');
const baseUrl = 'https://gateway.ahrvo.network/banking/ibans/v2/fx/markup/config';
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
// Set markup
axios.post(baseUrl, {
markupPerc: 2.5,
currencyFrom: 'USD',
currencyTo: 'EUR',
markupType: 'currency_pair'
}, { headers })
.then(res => console.log('Markup set:', res.data.success))
.catch(err => console.error(err.response.data));
// Get markup
axios.get(baseUrl, {
headers,
params: { currencyFrom: 'USD', currencyTo: 'EUR' }
})
.then(res => console.log('Configs:', res.data.configs))
.catch(err => console.error(err.response.data));
Usage Notes
- Markup percentage must be between
0and10 - For
currency_pairmarkup type, bothcurrencyFromandcurrencyToare required - For
universalmarkup type, no currency codes are needed - If a currency pair-specific configuration exists, it takes precedence over the universal configuration
- Configurations are scoped to your company and do not affect other companies