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",
  "maxExecute": 10,
  "maxRangeDays": 7,
  "maxSweepCartesian": 100,
  "maxImportRangeHours": 6,
  "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
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 from an exchange. See Importing a dataset instead of uploading one
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.