Skip to main content

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

MethodEndpointDescription
POST/banking/ibans/v2/fx/markup/configSet FX markup configuration
GET/banking/ibans/v2/fx/markup/configGet 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

HeaderValueRequiredDescription
Acceptapplication/jsonYesContent type for the response
AuthorizationBearer {access_token}YesBearer token for authentication
Content-Typeapplication/jsonYesRequest body content type
x-api-keystringNoAPI key for additional authentication

Request Body

{
"markupPerc": 2.5,
"currencyFrom": "USD",
"currencyTo": "EUR",
"markupType": "currency_pair"
}

Request Fields

FieldTypeRequiredDescription
markupPercnumberYesMarkup percentage (0–10)
currencyFromstringConditionalSource currency code (required for currency_pair type)
currencyTostringConditionalTarget currency code (required for currency_pair type)
markupTypestringYesType: currency_pair or universal

Markup Types

TypeDescription
currency_pairApply markup to a specific currency pair (requires currencyFrom and currencyTo)
universalApply 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

ParameterTypeRequiredDescription
currencyFromstringNoFilter by source currency code
currencyTostringNoFilter by target currency code
markupTypestringNoFilter 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

FieldTypeDescription
successbooleanIndicates success
configsarrayArray of markup configuration objects
configs[]._idstringUnique config identifier
configs[].companyIdstringCompany identifier
configs[].markupTypestringType of markup
configs[].markupPercnumberApplied markup percentage
configs[].currencyFromstringSource currency (if currency_pair)
configs[].currencyTostringTarget currency (if currency_pair)
configs[].isActivebooleanWhether config is currently active
configs[].createdAtstring (date-time)Creation timestamp
configs[].updatedAtstring (date-time)Last update timestamp
statusCodeintegerHTTP 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&currencyTo=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 0 and 10
  • For currency_pair markup type, both currencyFrom and currencyTo are required
  • For universal markup 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

Interactive API Explorer