---
title: "GET /api/v1/affiliates/codes/{account}"
method: GET
path: "/api/v1/affiliates/codes/{account}"
tags: ["Affiliates"]
---

# GET /api/v1/affiliates/codes/{account}

`GET /api/v1/affiliates/codes/{account}`

Returns referral codes owned by an account with per-code usage stats.
Affiliate codes (is_affiliate = true) are always returned.
Non-affiliate codes are only returned if the account has >= $1,000
all-time trade volume. Maps to the Affiliates dashboard.

## Path parameters

- `account` string, required

## Response `200`

Affiliate codes with usage stats

- AffiliateCodesResponseDto — Response wrapper for the affiliate codes endpoint
  - `codes` AffiliateCodeDto[], required — List of affiliate codes with usage stats
    - `created_at_ms` integer, required — When this code was created (milliseconds since epoch)
    - `is_active` boolean, required — Whether the code is still active (usage_count < max_usage)
    - `is_affiliate` boolean, required — Whether this is an affiliate code (high-usage codes for affiliates)
    - `max_usage` integer, required — Maximum number of times this code can be used
    - `owner_account` string, required — The wallet address that owns this code (not a subaccount address)
    - `referral_code` string, required — The referral code string
    - `source` 'admin' | 'auto' | 'reusable' | 'unknown', required — How a referral code was created
    - `usage_count` integer, required — Current number of times this code has been used
  - `owner_account` string, required — The owner's wallet address
  - `volume_threshold_met` boolean, required — Whether the account meets the minimum trade volume threshold to see non-affiliate (auto-generated) codes

## Other responses

- `400` — Invalid account address
- `500` — Internal server error

---

[API](https://skmtc.net/decibel/apis/decibel-trading-api.md) · [All operations](https://skmtc.net/decibel/apis/decibel-trading-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/decibel/decibel-trading-api/revisions/37a02083ff59/schema)
