Skip to main content

Simulate Points

Pre-calculates the points a trade would earn without writing any data.

POST /points/simulate
Authorization: Bearer <token>

Query Parameters

ParameterTypeRequiredDescription
epochintegerNoEpoch number; defaults to current

Request Body

{
"trade_amount": 5000.00,
"order_type": "maker",
"tier": 2
}
FieldTypeRequiredDescription
trade_amountdecimalYesNotional trade value (USD)
order_typestringYesmaker or taker
tierintegerNoOverride tier (1 / 2 / 3); defaults to user's current tier

Response

{
"tp_estimate": "7.50",
"tp_effective": "6.00",
"hp_estimate": "0.00",
"total_estimate": "6.00",
"tier": "T2",
"role_rate": "1.5",
"daily_cap_status": {
"used": "4320.00",
"cap": 5000,
"remaining": "680.00"
},
"weekly_cap_status": {
"used": "18500.00",
"cap": 25000,
"remaining": "6500.00"
}
}

hp_estimate is always "0.00" (placeholder for a future phase).

Response Fields

FieldTypeDescription
tp_estimateDecimalRaw TP before cap limits
tp_effectiveDecimalTP after applying daily/weekly caps
hp_estimateDecimalHP estimate (currently always "0.00")
total_estimateDecimalTotal effective points from this trade
tierstringTier used in calculation
role_ratestringMaker/taker rate applied
daily_cap_status.usedDecimalTP used today
daily_cap_status.capintDaily TP cap (5,000)
daily_cap_status.remainingDecimalRemaining daily capacity
weekly_cap_status.usedDecimalTP used this week
weekly_cap_status.capintWeekly TP cap (25,000)
weekly_cap_status.remainingDecimalRemaining weekly capacity

TP Calculation

TP_raw      = (trade_amount / 1000) × tier_rate
TP_effective = min(TP_raw, daily_remaining, weekly_remaining)
TradeRoleTierTP
$1,000MakerT11.2
$5,000MakerT27.5
$10,000TakerT313.0

Code Examples

Python

import requests

BASE_URL = "https://api.primit.io/api/v1"
JWT_TOKEN = "your_jwt_token"

resp = requests.post(
f"{BASE_URL}/points/simulate",
headers={"Authorization": f"Bearer {JWT_TOKEN}"},
json={"trade_amount": 5000.00, "order_type": "maker"},
)
data = resp.json()

print(f"Estimated TP: {data['tp_estimate']} → effective: {data['tp_effective']}")
print(f"Daily cap remaining: {data['daily_cap_status']['remaining']}")