cURL
curl --request GET \
--url https://api.dev.ekiden.fi/api/v1/user/affiliate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dev.ekiden.fi/api/v1/user/affiliate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dev.ekiden.fi/api/v1/user/affiliate', 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.dev.ekiden.fi/api/v1/user/affiliate",
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.dev.ekiden.fi/api/v1/user/affiliate"
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.dev.ekiden.fi/api/v1/user/affiliate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.ekiden.fi/api/v1/user/affiliate")
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{
"downline": {
"l1": 1,
"l2": 1,
"l3": 1
},
"pending_usdt": "<string>",
"rates_bps": {
"l1": 123,
"l2": 123,
"l3": 123
},
"status": "<string>",
"weeks": [
{
"amount_usdt": "<string>",
"breakdown": "<unknown>",
"status": "<string>",
"week_start": "<string>",
"paid_at_ms": 123,
"transfer_ref": "<string>"
}
],
"lifetime_paid_usdt_micro": 123,
"volume": {
"l1": "<string>",
"l2": "<string>",
"l3": "<string>"
}
}User
Get apiv1useraffiliate
GET
/
api
/
v1
/
user
/
affiliate
cURL
curl --request GET \
--url https://api.dev.ekiden.fi/api/v1/user/affiliate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dev.ekiden.fi/api/v1/user/affiliate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dev.ekiden.fi/api/v1/user/affiliate', 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.dev.ekiden.fi/api/v1/user/affiliate",
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.dev.ekiden.fi/api/v1/user/affiliate"
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.dev.ekiden.fi/api/v1/user/affiliate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.ekiden.fi/api/v1/user/affiliate")
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{
"downline": {
"l1": 1,
"l2": 1,
"l3": 1
},
"pending_usdt": "<string>",
"rates_bps": {
"l1": 123,
"l2": 123,
"l3": 123
},
"status": "<string>",
"weeks": [
{
"amount_usdt": "<string>",
"breakdown": "<unknown>",
"status": "<string>",
"week_start": "<string>",
"paid_at_ms": 123,
"transfer_ref": "<string>"
}
],
"lifetime_paid_usdt_micro": 123,
"volume": {
"l1": "<string>",
"l2": "<string>",
"l3": "<string>"
}
}Authorizations
Response
Affiliate dashboard
GET /user/affiliate response (spec §7). Returned only for an affiliate; a
non-affiliate wallet gets 404.
Lifetime SETTLED commission — the sum of amount_usdt_micro over this
affiliate's paid weeks, in integer micro-USDT (6dp). Summed at the
database so it is exact regardless of the weeks page size. Integer
micro (not the decimal string the sibling money fields use) so the client
can total/compare it without parsing; 0 for an affiliate never paid.