---
title: "Get per-code performance for a referrer"
method: GET
path: "/api/v1/referrals/code-performance"
tags: ["Referrals"]
---

# Get per-code performance for a referrer

`GET /api/v1/referrals/code-performance`

## Request

- Base URL: `https://api.mainnet.aptoslabs.com/decibel`
- URL: `https://api.mainnet.aptoslabs.com/decibel/api/v1/referrals/code-performance`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/decibel/apis/decibel-trading-api/docs/api/v1/referrals/code-performance/get.ts> (a function with typed inputs; its response is checked against the schema)

Redemptions and traded volume per referral code. Not paginated: an affiliate is capped
at a handful of codes, so the whole set fits one response.

## Query parameters

- `referrer_account` string, required
- `days` integer

## Response `200`

Per-code redemption and volume stats

- CodePerformance[]
  - `earnings_usd` number, double, required: Everything this code brought in: the L1 commission of the people who used it, plus the L2 override their own referrals generated. Credited to the code the sub-affiliate arrived through, so the codes sum to the affiliate's whole commission with nothing stranded outside every row.
  - `maker_volume_usd` number, double, required
  - `referral_code` string, required
  - `taker_volume_usd` number, double, required
  - `unique_users` integer, required: Distinct wallets that redeemed this code, all-time
  - `users_who_traded` integer, required: How many of those traded inside the window

## Other responses

- `400`: Invalid address
- `500`: Database error

## Changes

- **2026-11-03** `bb095628df0a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/decibel/apis/decibel-trading-api/changes/api/v1/referrals/code-performance/get.md)

---

[API](https://skmtc.dev/decibel/apis/decibel-trading-api.md) - [All operations](https://skmtc.dev/decibel/apis/decibel-trading-api/llms.txt) - [OpenAPI document](https://skmtc.dev/decibel/apis/decibel-trading-api/revisions/ee1bcb5822bd?raw)
