GET /api/v1/affiliates/earnings/{account}
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}', 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.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"affiliate_account": "<string>",
"earnings": {
"l1_amps": 123,
"l1_count": 1,
"l2_amps": 123,
"l2_count": 1,
"total_amps": 123
},
"is_affiliate": true,
"users": {
"items": [
{
"account": "<string>",
"active": true,
"affiliate_amps_earned": 123,
"level": "L1",
"total_amps": 123,
"total_volume": 123,
"referred_by": "<string>"
}
],
"total_count": 1
}
}Affiliates
GET /api/v1/affiliates/earnings/{account}
Returns affiliate earnings breakdown for an account, including per-user referral amps earned at L1 (10%/15%) and L2 (5%) rates.
GET
/
api
/
v1
/
affiliates
/
earnings
/
{account}
GET /api/v1/affiliates/earnings/{account}
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}', 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.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/affiliates/earnings/{account}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"affiliate_account": "<string>",
"earnings": {
"l1_amps": 123,
"l1_count": 1,
"l2_amps": 123,
"l2_count": 1,
"total_amps": 123
},
"is_affiliate": true,
"users": {
"items": [
{
"account": "<string>",
"active": true,
"affiliate_amps_earned": 123,
"level": "L1",
"total_amps": 123,
"total_volume": 123,
"referred_by": "<string>"
}
],
"total_count": 1
}
}Authorizations
Bearer token from Geomi. See Authentication for setup instructions.
Path Parameters
The affiliate's wallet address
Query Parameters
Page size
Required range:
0 <= x <= 1000Page offset
Required range:
0 <= x <= 10000Response
Affiliate earnings breakdown
Response for GET /api/v1/affiliates/earnings/{account}.
The affiliate's wallet address.
Aggregated earnings breakdown.
Show child attributes
Show child attributes
Whether this account is a managed affiliate (15% L1 rate) or normal referrer (10%).
Per-user referral details (paginated).
Show child attributes
Show child attributes

