Epochs
Returns all epoch periods with their status.
GET /epochs
No authentication required.
Response
[
{
"id": 1,
"label": "Epoch 1: 2026.1.1 - 2026.1.15",
"startDate": "2026-01-01",
"endDate": "2026-01-15",
"status": "settled"
},
{
"id": 2,
"label": "Epoch 2: 2026.1.15 - 2026.1.29",
"startDate": "2026-01-15",
"endDate": "2026-01-29",
"status": "active"
}
]
Response Fields
| Field | Type | Description |
|---|---|---|
id | int | Epoch number (epoch_number) |
label | string | Human-readable label with date range |
startDate | string | Start date (YYYY-MM-DD) |
endDate | string | End date (YYYY-MM-DD) |
status | string | Epoch status (see below) |
Epoch Status
| Value | Description |
|---|---|
pending | Not yet started |
active | Currently running |
ended | Finished, pending settlement |
settled | Settled and finalized |
Code Examples
Python
import requests
BASE_URL = "https://api.primit.io/api/v1"
resp = requests.get(f"{BASE_URL}/epochs")
epochs = resp.json()
for e in epochs:
print(f"Epoch {e['id']}: {e['startDate']} → {e['endDate']} [{e['status']}]")