Earn Level Quota
Returns the authenticated user's current Earn Level status and estimated season token share.
GET /points/earn-quota
Authorization: Bearer <token>
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
epoch | integer | No | Epoch number; defaults to current |
Response
{
"earn_level": 2,
"earn_level_weight": 12,
"total_points": "15000.00",
"points_to_next_level": "35000.00",
"next_level": 3,
"next_level_weight": 25,
"estimated_share_pct": "0.000045",
"season_pool_tokens": 25000000
}
Response Fields
| Field | Type | Description |
|---|---|---|
earn_level | int | Current Earn Level (0–5) |
earn_level_weight | int | Distribution weight for current level |
total_points | Decimal | Total points accumulated this epoch |
points_to_next_level | Decimal | Points needed to reach the next level |
next_level | int | null | Next Earn Level number; null at L5 |
next_level_weight | int | null | Weight at next level; null at L5 |
estimated_share_pct | Decimal | Estimated share of season token pool |
season_pool_tokens | int | Total user pool tokens for the current season |
Earn Level Weights
| Level | Points Range | Weight |
|---|---|---|
| L0 | 0 – 999 | 4 |
| L1 | 1,000 – 9,999 | 8 |
| L2 | 10,000 – 49,999 | 12 |
| L3 | 50,000 – 199,999 | 25 |
| L4 | 200,000 – 499,999 | 60 |
| L5 | 500,000+ | 120 |
Code Examples
Python
import requests
BASE_URL = "https://api.primit.io/api/v1"
JWT_TOKEN = "your_jwt_token"
resp = requests.get(
f"{BASE_URL}/points/earn-quota",
headers={"Authorization": f"Bearer {JWT_TOKEN}"},
)
data = resp.json()
est_tokens = float(data["estimated_share_pct"]) * data["season_pool_tokens"]
print(f"Earn Level: L{data['earn_level']} (weight={data['earn_level_weight']})")
print(f"Estimated tokens: {est_tokens:,.0f}")