Create a key
Affiliate keys are available to active affiliates.- Open the Affiliates page and select the API tab.
- In the API Access card, select Create API Key.
- Optionally name the key, then select Email Me a Code.
- Enter the six-digit code from the email and select Create API Key.
- Copy the key and store it somewhere safe. The full key is shown only once.
What an affiliate key can read
Send the key as a Bearer token tohttps://developers.myfundedperpetuals.com,
the same live host as the trading API. Affiliate keys are
live keys: they do not work on the sandbox host.
Every other endpoint that needs a key answers an affiliate key with
403 and
the code insufficient_scope. In the same way, trading keys, test keys, and
CLI or MCP sign-ins cannot read /v1/affiliate endpoints. The full request
and response schemas are in the REST Reference.
If your affiliate account is suspended, every /v1/affiliate request returns
404 with the code affiliate_not_found until the account is active again.
Your keys are kept and start working again when access returns.
Units and formats
- All amounts are US dollars as decimal numbers, such as
125.5. - Times are Unix timestamps in milliseconds.
- Periods and dates use UTC days, like the Analytics tab.
- Response fields use
snake_case, and errors use the API’s standard error format.
Summary
GET /v1/affiliate returns the headline figures from the Affiliates page:
code,secondary_code, andcodes(your recent codes and their status);commission_pct, the rate you earn on new sales;tier,next_tier, andgross_lifetime_sales, which decides your reward tier;referral_countandrevenue(lifetimeandlast_30_days);earningsby status:pending,confirmed,requested,paid, andvoid;payable(what you can request now),on_hold(confirmed commission still in the refund hold), andmin_payout;sub_affiliates, the commission your sub-affiliates’ sales earned you, with a row per sub-affiliate.
earnings and payable already include sub-affiliate commission, exactly as
the Affiliates page does. sub_affiliates shows where that part came from; do
not add it to earnings again.Stats by period
GET /v1/affiliate/stats returns one bucket per day, week, or month:
Each bucket has
clicks, visitors, signups, purchasers (distinct
customers), orders, revenue, and commission (pending and approved
commission, after reversals). Traffic figures are null for periods before
click tracking began, and traffic_updated_at says how recent they are.
The range starts no earlier than the day you joined and ends no later than
today. Day and week grouping cover at most 400 days; a longer range returns
400 with the code range_too_large, so use grouping=month or a shorter
range. A range with more than 5,000 sales returns 400 with the code
too_many_sales.
Orders
GET /v1/affiliate/orders lists the same orders as Commission History.
Each order has an id, the order_number printed on the customer’s invoice,
the product, placed_at, the order amount, and its commission_amount,
commission_pct, and commission_status (pending, earned, refunded,
ineligible, no_code, or chargeback).
Orders never include who bought or which discount code they used.
Payouts
GET /v1/affiliate/payouts lists your payout requests with their id,
amount, status (pending, paid, or rejected), method (rise or
store_credit), requested_at, and paid_at. Payout destinations, such as
the email address a payout was sent to, are never returned.
Giveaway codes
GET /v1/affiliate/giveaway-codes lists the same codes as the Giveaways
tab: codes from your reward tiers, codes the team issued you, and codes you
bought. Each code has:
idandcode, the text to share;status:availableuntil someone redeems it, thenredeemed. Each code can be redeemed once. A code the team cancelled before anyone redeemed it isrevokedand can no longer be redeemed;source:tier_reward,team, orpurchased;reward: either{ "kind": "account", ... }with the account’schallenge_tier_key,model,plan,size,starting_balance, andprofit_split_pct, or{ "kind": "case", "case_type": ... }for a reward case;first_time_redeemers_onlyandaccount_requirement(without_account,with_account, ornullfor anyone), which limit who can redeem it;issued_at,redeemed_at, andredeemed_by_email, a partly hidden email such asfo•••@e•••.com, the same as on the Giveaways tab.
status is available. The API does
not know which codes you have already sent to someone, so a bot that gives
codes away should record each code it sends and skip those codes next time.
A code you sent stays available until its recipient redeems it.
Paging, limits, and errors
Orders, payouts, and giveaway codes use the API’s standard cursor pagination: setlimit from 1 to 100 (default 50) and
send next_cursor back as cursor while has_more is true.
Affiliate requests share the same request limits as every other API request;
see Errors and rate limits. A 503 with the code
affiliate_data_preparing means figures are briefly being rebuilt; retry
after the Retry-After delay.
Command line
Thefperp CLI includes get-affiliate-summary,
get-affiliate-stats, list-affiliate-orders, list-affiliate-campaigns,
list-affiliate-payouts, and list-affiliate-giveaway-codes. Pass your affiliate key in the
FPERP_API_KEY environment variable:
fperp login checks a key by reading your trading accounts, which an
affiliate key cannot do, so it does not save an affiliate key unless you add
--no-verify. The MCP server does not offer affiliate tools.