Skip to main content

Points History

Returns the authenticated user's point event history with pagination.

GET /points/history
Authorization: Bearer <token>

Query Parameters

ParameterTypeRequiredDescription
epochintegerNoEpoch number; defaults to current
typestringNoFilter by type: trading / pnl / holding / referral / staking
pageintegerNoPage number, starting from 1 (default: 1)
page_sizeintegerNoResults per page, max 100 (default: 20)

Response

{
"events": [
{
"id": "b2c3d4e5-...",
"point_type": "trading",
"points": "1.20",
"metadata": {
"volume_usd": 1000.00,
"role": "maker",
"tier": "T1"
},
"created_at": "2026-04-15T10:00:00Z"
},
{
"id": "c3d4e5f6-...",
"point_type": "referral",
"points": "10.00",
"metadata": {
"trigger_volume": 1500.00
},
"created_at": "2026-04-14T08:30:00Z"
}
],
"total": 125,
"page": 1,
"page_size": 20
}

The root key is events (not items). Each record contains only {id, point_type, points, metadata, created_at} — associated trade/order/position IDs are not returned by this endpoint.

Response Fields

FieldTypeDescription
eventsarrayList of point events
totalintTotal number of events matching the filter
pageintCurrent page number
page_sizeintResults per page

events[]

FieldTypeDescription
idstringEvent UUID
point_typestringPoint type: trading / pnl / holding / referral / staking
pointsDecimalPoints awarded
metadataobjectEvent-specific context (varies by point_type)
created_atstringEvent timestamp (ISO 8601)

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/history",
headers={"Authorization": f"Bearer {JWT_TOKEN}"},
params={"page": 1, "page_size": 20},
)
data = resp.json()

print(f"Total events: {data['total']}")
for e in data["events"]:
print(f" [{e['point_type']}] +{e['points']} pts at {e['created_at']}")