Skip to main content

Set FX Markup Configuration (New)

Overview

Configure custom markup margins for foreign exchange transactions. Platforms and money services businesses can apply a profit spread either across all currency pairs (universal) or for specific pairs (currency_pair).

Optionally, markups can be restricted to individual downstream sub-accounts by providing subAccountId.

Resource Access

  • HTTP Method: POST
  • Endpoint: /banking/ibans/v2/fx/markup/config
  • Authentication: Bearer token required (Authorization: Bearer {access_token})

Request Headers

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

Request Body

{
"markupPerc": 1.5,
"markupType": "currency_pair",
"currencyFrom": "USD",
"currencyTo": "EUR",
"subAccountId": "comp_982341"
}

Request Fields

FieldTypeRequiredDescription
markupPercnumberYesMarkup percentage margin to add to wholesale quotes (e.g. 1.5 for 1.50%). Must be between 0 and 10.
markupTypestringYesRule type: currency_pair (pair-specific) or universal (all trades).
currencyFromstringRequired if currency_pairSource currency code (e.g. USD).
currencyTostringRequired if currency_pairTarget currency code (e.g. EUR).
subAccountIdstringNoOptional sub-account ID to scope this markup margin exclusively to one client.

Response

Success Response (200 OK)

{
"success": true
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the markup rule was saved and activated.

Error Responses

  • 400 Bad Request: Invalid markup percentage (must be 0-10) or missing currency codes for pair-specific rules.
  • 401 Unauthorized: Missing or expired access token.
  • 403 Forbidden: Insufficient privileges to set treasury markup.
  • 500 Internal Server Error: Internal platform error.

Code Examples

cURL

curl -X POST "https://api.ahrvo.network/banking/ibans/v2/fx/markup/config" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"markupPerc": 1.5,
"markupType": "currency_pair",
"currencyFrom": "USD",
"currencyTo": "EUR"
}'

Python

import requests

url = "https://api.ahrvo.network/banking/ibans/v2/fx/markup/config"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
}
payload = {
"markupPerc": 1.5,
"markupType": "currency_pair",
"currencyFrom": "USD",
"currencyTo": "EUR"
}

response = requests.post(url, headers=headers, json=payload)
print("Config Saved:", response.json().get("success"))

JavaScript / Node.js

const response = await fetch("https://api.ahrvo.network/banking/ibans/v2/fx/markup/config", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify({
markupPerc: 1.5,
markupType: "currency_pair",
currencyFrom: "USD",
currencyTo: "EUR"
})
});

const result = await response.json();
console.log("Markup status:", result.success);

Interactive API Explorer