Account
Check your tier's limits and your live storage usage against them.
All account routes require a bearer JWT obtained from authentication. Split into two endpoints on purpose: your tier and its limits never change mid-session and cost nothing to fetch, while usage is a live figure that changes on every dataset upload or strategy execution.
| Method | Path | Purpose |
|---|---|---|
GET | /account | Your identity and tier limits |
GET | /account/usage | Your live storage usage against those limits |
Getting your tier and limits
GET /account — no database call behind it, safe to call on every page load.
curl https://api.qtsurfer.net/v1/account
-H "Authorization: Bearer $TOKEN" {
"userId": "00000000-0000-0000-0000-000000000000",
"tier": "free",
"scopes": { "backtests": ["read", "write", "execute"], "exchanges": ["read"] },
"apiKeyExpiresAt": "2026-12-05T10:05:00Z",
"maxExecute": 10,
"maxRangeDays": 7,
"maxSweepCartesian": 100,
"maxImportRangeHours": 6,
"maxCexImportRangeHours": 24,
"maxConcurrentImports": 1,
"maxDatasets": 3,
"maxDatasetBytes": 52428800,
"maxTotalStorageBytes": 104857600,
"_links": {
"self": { "href": "/v1/account" },
"usage": { "href": "/v1/account/usage" }
}
} | Field | Notes |
|---|---|
userId | your account id — the JWT sub claim |
tier | your current subscription tier |
scopes | what your API key may do: a map from a resource to its actions, in lower case; {} for a key with none. The same map as the scopes of the token answer, without asking for a new token. See Authentication and scopes |
apiKeyExpiresAt | when your API key stops working, ISO-8601 in UTC; always in the answer, and null when no key expiry applies (a key that never expires, a token issued before the field existed, or a credential that is not an API key). The same moment as the key_exp of the token answer. Create a new key in the web app before it. See When your key expires |
maxExecute | maximum number of strategy executions (and sweeps) you can have running at the same time through the API. Starting one past this number is answered with 429, whose message carries the same number. The value already includes any API allowance your plan has |
maxRangeDays | maximum length, in days, of the time range of a backtest on one of your own datasets |
maxSweepCartesian | largest full grid, in parameter combinations, a sweep may run with the grid sampler. A larger grid is refused with 400; the random and lhs samplers are not held to it |
maxImportRangeHours | maximum length, in hours, of the time range of one dataset import of a decentralized exchange’s pool (type: dex). See Importing a dataset instead of uploading one |
maxCexImportRangeHours | maximum length, in hours, of the time range of one dataset import of a centralized exchange’s history (type: cex), counted apart from maxImportRangeHours. See Importing an exchange’s history |
maxConcurrentImports | maximum number of dataset imports your account may have in flight at once, queued or running, whether of an exchange’s history or of a pool. A new import over it is refused with 429 until one has finished |
maxDatasets | maximum number of active datasets your tier allows |
maxDatasetBytes | maximum size, in bytes, of a single dataset version as stored (the bytes of its ready version: for a CSV upload, the converted file, not the file you upload). See Size limits |
maxTotalStorageBytes | maximum combined storage, in bytes, across every dataset, strategy-execution signal, and registered strategy on your account — see below |
Getting your live usage
GET /account/usage — how much of maxTotalStorageBytes you’re currently using. One shared
pool, not one cap per resource type: datasets, strategy-execution signals, and registered strategies all count against the same total, since they compete for the same
underlying storage. Not guaranteed real-time — a just-completed upload or strategy execution may
take a short moment to be reflected here.
curl https://api.qtsurfer.net/v1/account/usage
-H "Authorization: Bearer $TOKEN" {
"datasetsUsed": 2,
"datasetBytesUsed": 15728640,
"signalsUsed": 1,
"signalBytesUsed": 524288,
"strategiesUsed": 4,
"strategyBytesUsed": 40960,
"storageBytesUsed": 16293888,
"_links": {
"self": { "href": "/v1/account/usage" },
"account": { "href": "/v1/account" }
}
} | Field | Notes |
|---|---|
datasetsUsed / datasetBytesUsed | active datasets and their combined current-version bytes — the same set maxDatasets limits |
signalsUsed / signalBytesUsed | recorded strategy-execution signal uploads and their combined bytes |
strategiesUsed / strategyBytesUsed | registered strategies and the combined bytes of each one’s source plus its latest compiled bytecode (superseded compilations aren’t counted) |
storageBytesUsed | datasetBytesUsed + signalBytesUsed + strategyBytesUsed — the number checked against GET /account’s maxTotalStorageBytes |
Where the limit is enforced
maxTotalStorageBytes is checked when you add new dataset bytes — POST /datasets/{datasetId}/uploads/{uploadId}/finalize and POST /datasets/imports both return 429 if your account is already at or over the limit (see Datasets for the exact wording). Strategy-execution signals and registered
strategies are reported in storageBytesUsed but do not themselves trigger a 429 today — delete
a dataset to free space if you’re at your limit.
Related guides
- Datasets — the resource that both counts toward, and can be blocked by,
maxTotalStorageBytes. - Strategies — registered strategies count toward
strategyBytesUsed.