TT Account Risk Limits¶
Overview¶
Daily snapshots of TT (Trading Technologies) risk limits for all traders, covering both SIM and LIVE accounts. This data shows the maximum position limits assigned to each trader for each product.
Load Schedule: Daily at 22:00 UTC (10 PM) Data Volume: ~4,000 rows per day Data Retention: If the daily load fails, that day's snapshot is lost (no automatic backfilling). We retry 3 times in case of a failure
Database Schema¶
Table: tt_accounts_risk_limits
| Column | Type | Nullable | Description |
|---|---|---|---|
id |
integer | NOT NULL | Primary key |
trader_id |
integer | NOT NULL | FK → traders.id |
trader_account_id |
integer | NOT NULL | TT account ID (e.g. 11524874) |
trader_account_name |
text | NOT NULL | TT account name (e.g., "BPC_DDUQUESNEY") |
product_id |
integer | NULL | FK → products.id (NULL if product not in our DB) |
product_tt_id |
text | NOT NULL | TT product ID (unique identifier from TT. e.g. 4154676015578947646) |
product_symbol |
text | NOT NULL | Product symbol (e.g., "ES", "NQ") |
exchange |
text | NULL | Exchange name (e.g., "CME", "EUREX") |
date |
date | NOT NULL | Snapshot date (UTC) |
max_pos_limit |
integer | NOT NULL | Maximum position limit |
is_sim_account |
boolean | NOT NULL | true = SIM, false = LIVE |
created_at |
timestamp | NOT NULL | First insert timestamp |
updated_at |
timestamp | NULL | Last update timestamp |
Unique Constraint: (trader_id, trader_account_id, product_tt_id, date)
How Data is Loaded¶
- System connects to TT REST API at 22:00 UTC daily
- Fetches account limits for both SIM and LIVE environments
- Matches TT accounts to traders in our database
- Matches TT products to products in our database:
- Primary match: By TT product ID (
products.tt_product_id) - Fallback match: By product symbol if TT ID not found
- No match: Stores with
product_id = NULLif product not in our database - Stores daily snapshot with latest values
Note: The system reads the highest of maxPos, maxLongPos, or maxShortPos from the TT API as the position limit.
Related Tables¶
Join with these tables for analysis:
traders: Get trader names and detailsproducts: Get full product information (name, currency, contract size)trader_platforms: Links traders to their TT accountsfills/trades: Compare actual positions vs assigned limits