curl --request GET \
--url https://developers.myfundedperpetuals.com/v1/affiliate \
--header 'Authorization: Bearer <token>'import requests
url = "https://developers.myfundedperpetuals.com/v1/affiliate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://developers.myfundedperpetuals.com/v1/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://developers.myfundedperpetuals.com/v1/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://developers.myfundedperpetuals.com/v1/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://developers.myfundedperpetuals.com/v1/affiliate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developers.myfundedperpetuals.com/v1/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{
"data": {
"status": "active",
"code": "<string>",
"secondary_code": "<string>",
"codes": [
{
"code": "<string>",
"status": "primary"
}
],
"commission_pct": 123,
"gross_lifetime_sales": 123,
"tier": {
"id": "<string>",
"name": "<string>"
},
"next_tier": {
"id": "<string>",
"name": "<string>",
"gross_sales_threshold": 123
},
"referral_count": 123,
"revenue": {
"lifetime": 123,
"last_30_days": 123
},
"earnings": {
"pending": 123,
"confirmed": 123,
"requested": 123,
"paid": 123,
"void": 123
},
"payable": 123,
"on_hold": 123,
"min_payout": 123,
"sub_affiliates": {
"total_earned": 123,
"affiliates": [
{
"code": "<string>",
"override_pct": 123,
"assigned_at": 123,
"clicks": 123,
"purchases": 123,
"revenue": 123,
"earned": 123
}
]
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}Get your affiliate summary
Requires an affiliate API key, created on the Affiliates page. Returns the same headline figures as the affiliate dashboard. Amounts are USD. earnings and payable already include commission earned from your sub-affiliates; sub_affiliates breaks that commission out and must not be added to them.
curl --request GET \
--url https://developers.myfundedperpetuals.com/v1/affiliate \
--header 'Authorization: Bearer <token>'import requests
url = "https://developers.myfundedperpetuals.com/v1/affiliate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://developers.myfundedperpetuals.com/v1/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://developers.myfundedperpetuals.com/v1/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://developers.myfundedperpetuals.com/v1/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://developers.myfundedperpetuals.com/v1/affiliate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developers.myfundedperpetuals.com/v1/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{
"data": {
"status": "active",
"code": "<string>",
"secondary_code": "<string>",
"codes": [
{
"code": "<string>",
"status": "primary"
}
],
"commission_pct": 123,
"gross_lifetime_sales": 123,
"tier": {
"id": "<string>",
"name": "<string>"
},
"next_tier": {
"id": "<string>",
"name": "<string>",
"gross_sales_threshold": 123
},
"referral_count": 123,
"revenue": {
"lifetime": 123,
"last_30_days": 123
},
"earnings": {
"pending": 123,
"confirmed": 123,
"requested": 123,
"paid": 123,
"void": 123
},
"payable": 123,
"on_hold": 123,
"min_payout": 123,
"sub_affiliates": {
"total_earned": 123,
"affiliates": [
{
"code": "<string>",
"override_pct": 123,
"assigned_at": 123,
"clicks": 123,
"purchases": 123,
"revenue": 123,
"earned": 123
}
]
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}
}Authorizations
API key beginning with fp_live_ (live keys, served at developers.myfundedperpetuals.com) or fp_test_ (test keys, served at sandbox.myfundedperpetuals.com). A key presented on the other host is rejected with 401 and a message naming the correct host. Affiliate API keys are fp_live_ keys created on the Affiliates page: they read only the /v1/affiliate endpoints and get 403 with code insufficient_scope on every other authenticated endpoint. Every other key gets the same 403 on /v1/affiliate.