Get Commissions
curl --request GET \
--url https://api.rolla.xyz/api/v1/external/broker/commissions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rolla.xyz/api/v1/external/broker/commissions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rolla.xyz/api/v1/external/broker/commissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rolla.xyz/api/v1/external/broker/commissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rolla.xyz/api/v1/external/broker/commissions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rolla.xyz/api/v1/external/broker/commissions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/broker/commissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Commissions fetched successfully",
"success": true,
"data": {
"commissions": [
{
"id": "e5f6a7b8-c9d0-4234-8fab-567890123456",
"commission_amount": 1550,
"commission_currency": "USD",
"commission_margin": "0.01000000",
"currency_pair": "USD/NGN",
"rate_margin": "5.00000000",
"rate_margin_type": "flat",
"referred_business_id": "d4e5f6a7-b8c9-4123-9def-456789012345",
"transaction_id": "8f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"created_at": "2024-01-20T14:00:00.000Z",
"business_name": "Acme Corp Ltd",
"exchange_rate": 1480,
"base_rate": 1475,
"source_currency": "USD",
"source_amount": 100000,
"destination_currency": "NGN",
"destination_amount": 148000000,
"swap_transaction": {
"id": "3b9d5a7c-2e18-4f60-9a7d-1c0b5e8f4d22",
"transaction_type": "swap",
"status": "completed",
"description": "Swap USD to NGN",
"external_reference": "SWP-20240120-0001",
"source_currency": "USD",
"source_amount": 100000,
"destination_currency": "NGN",
"destination_amount": 148000000,
"created_at": "2024-01-20T13:59:58.000Z"
}
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 45,
"totalPages": 3
}
}
}{
"status": 400,
"message": "Validation failed",
"errors": [
{
"path": [
"currency"
],
"message": "Invalid"
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 403,
"message": "Business is not activated as a broker"
}Get Commissions
Retrieves a paginated list of the commissions you have earned from referred businesses, newest first. Every money field is an integer in the smallest unit of the currency named beside it.
GET
/
broker
/
commissions
Get Commissions
curl --request GET \
--url https://api.rolla.xyz/api/v1/external/broker/commissions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rolla.xyz/api/v1/external/broker/commissions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rolla.xyz/api/v1/external/broker/commissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rolla.xyz/api/v1/external/broker/commissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rolla.xyz/api/v1/external/broker/commissions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rolla.xyz/api/v1/external/broker/commissions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/broker/commissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Commissions fetched successfully",
"success": true,
"data": {
"commissions": [
{
"id": "e5f6a7b8-c9d0-4234-8fab-567890123456",
"commission_amount": 1550,
"commission_currency": "USD",
"commission_margin": "0.01000000",
"currency_pair": "USD/NGN",
"rate_margin": "5.00000000",
"rate_margin_type": "flat",
"referred_business_id": "d4e5f6a7-b8c9-4123-9def-456789012345",
"transaction_id": "8f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"created_at": "2024-01-20T14:00:00.000Z",
"business_name": "Acme Corp Ltd",
"exchange_rate": 1480,
"base_rate": 1475,
"source_currency": "USD",
"source_amount": 100000,
"destination_currency": "NGN",
"destination_amount": 148000000,
"swap_transaction": {
"id": "3b9d5a7c-2e18-4f60-9a7d-1c0b5e8f4d22",
"transaction_type": "swap",
"status": "completed",
"description": "Swap USD to NGN",
"external_reference": "SWP-20240120-0001",
"source_currency": "USD",
"source_amount": 100000,
"destination_currency": "NGN",
"destination_amount": 148000000,
"created_at": "2024-01-20T13:59:58.000Z"
}
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 45,
"totalPages": 3
}
}
}{
"status": 400,
"message": "Validation failed",
"errors": [
{
"path": [
"currency"
],
"message": "Invalid"
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 403,
"message": "Business is not activated as a broker"
}Retrieve a paginated list of commissions earned from your referrals. Filter by date range or currency.
Commissions are returned newest first. Every amount is an integer in the currency’s smallest unit:
In the row above the broker earned USD 15.50 on a USD 1,000 swap into NGN at a rate of 1,480 against a base rate of 1,475.
Broker activation is required. Broker accounts are activated by the Rolla admin team — you cannot activate a broker account yourself through the API. Once your business has been activated as a broker by Rolla, all broker endpoints become available. Until then, all requests will return a
403 Forbidden error. Contact support@rolla.xyz to request broker activation.Example Request
curl -X GET "https://api.rolla.xyz/api/v1/external/broker/commissions?page=1&pageSize=20¤cy=USD&startDate=2024-01-01&endDate=2024-01-31" \
-H "X-API-Key: your_api_key_here"
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
pageSize | integer | Results per page (default: 20, max: 100) |
startDate | string | Start date filter (YYYY-MM-DD) |
endDate | string | End date filter (YYYY-MM-DD) |
currency | string | Filter by currency code (uppercase, 3 or 4 letters, e.g. USD) |
referredBusinessId | string | Only commissions earned from this referred business (UUID) |
commission_amount is in the smallest unit of commission_currency, source_amount of source_currency, and destination_amount of destination_currency.
Example Response
{
"status": 200,
"message": "Commissions fetched successfully",
"success": true,
"data": {
"commissions": [
{
"id": "e5f6a7b8-c9d0-4234-8fab-567890123456",
"commission_amount": 1550,
"commission_currency": "USD",
"commission_margin": "0.01000000",
"currency_pair": "USD/NGN",
"rate_margin": "5.00000000",
"rate_margin_type": "flat",
"referred_business_id": "d4e5f6a7-b8c9-4123-9def-456789012345",
"transaction_id": "8f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"created_at": "2024-01-20T14:00:00.000Z",
"business_name": "Acme Corp Ltd",
"exchange_rate": 1480,
"base_rate": 1475,
"source_currency": "USD",
"source_amount": 100000,
"destination_currency": "NGN",
"destination_amount": 148000000,
"swap_transaction": {
"id": "3b9d5a7c-2e18-4f60-9a7d-1c0b5e8f4d22",
"transaction_type": "swap",
"status": "completed",
"description": "Swap USD to NGN",
"external_reference": "SWP-20240120-0001",
"source_currency": "USD",
"source_amount": 100000,
"destination_currency": "NGN",
"destination_amount": 148000000,
"created_at": "2024-01-20T13:59:58.000Z"
}
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 45,
"totalPages": 3
}
}
}
swap_transaction is null for a commission with no underlying swap on record, and exchange_rate, base_rate, source_amount and destination_amount are null when the pricing detail was not captured. Rows also carry meta, transaction and referredBusiness objects holding internal pricing detail; treat them as informational and do not depend on their contents.Use the
startDate and endDate filters to generate commission reports for specific periods. Both accept a date (2024-01-01) or a full ISO 8601 timestamp, and are matched against created_at.Authorizations
Your Rolla API key
Query Parameters
Page number
Required range:
x >= 1Example:
1
Results per page
Required range:
1 <= x <= 100Example:
20
Only commissions earned on or after this date (date or ISO 8601 timestamp)
Example:
"2024-01-01"
Only commissions earned on or before this date (date or ISO 8601 timestamp)
Example:
"2024-01-31"
Filter by commission currency, uppercase, 3 or 4 letters
Required string length:
3 - 4Pattern:
^[A-Z]+$Example:
"USD"
Only commissions earned from this referred business
Example:
"d4e5f6a7-b8c9-4123-9def-456789012345"