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.

MethodPathPurpose
GET/accountYour identity and tier limits
GET/account/usageYour 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" }
  }
}
FieldNotes
userIdyour account id — the JWT sub claim
tieryour current subscription tier
scopeswhat 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
apiKeyExpiresAtwhen 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
maxExecutemaximum 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
maxRangeDaysmaximum length, in days, of the time range of a backtest on one of your own datasets
maxSweepCartesianlargest 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
maxImportRangeHoursmaximum 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
maxCexImportRangeHoursmaximum 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
maxConcurrentImportsmaximum 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
maxDatasetsmaximum number of active datasets your tier allows
maxDatasetBytesmaximum 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
maxTotalStorageBytesmaximum 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" }
  }
}
FieldNotes
datasetsUsed / datasetBytesUsedactive datasets and their combined current-version bytes — the same set maxDatasets limits
signalsUsed / signalBytesUsedrecorded strategy-execution signal uploads and their combined bytes
strategiesUsed / strategyBytesUsedregistered strategies and the combined bytes of each one’s source plus its latest compiled bytecode (superseded compilations aren’t counted)
storageBytesUseddatasetBytesUsed + 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.

  • Datasets — the resource that both counts toward, and can be blocked by, maxTotalStorageBytes.
  • Strategies — registered strategies count toward strategyBytesUsed.