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
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
Content-Type | application/json | Yes | Request body content type |
x-api-key | string | No | Optional API key |
Request Body
{
"markupPerc": 1.5,
"markupType": "currency_pair",
"currencyFrom": "USD",
"currencyTo": "EUR",
"subAccountId": "comp_982341"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
markupPerc | number | Yes | Markup percentage margin to add to wholesale quotes (e.g. 1.5 for 1.50%). Must be between 0 and 10. |
markupType | string | Yes | Rule type: currency_pair (pair-specific) or universal (all trades). |
currencyFrom | string | Required if currency_pair | Source currency code (e.g. USD). |
currencyTo | string | Required if currency_pair | Target currency code (e.g. EUR). |
subAccountId | string | No | Optional sub-account ID to scope this markup margin exclusively to one client. |
Response
Success Response (200 OK)
{
"success": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates 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);