Summarise events
/scripts/{slug}/events/summaryReturns a definition's event totals, one row per instrument and timeframe, and any runs over history still going or failed. Call it to see what a definition has covered, and to wait for a run over history to finish.
Scope | Heavy call | Long poll | CLI |
|---|---|---|---|
| No | No |
|
Guidance
After Run a definition over history, poll this every few seconds until
collectingis empty, then read List events. It has nowait; the CLI polls every 3 seconds.A row in
failedmeans part of a run over history did not finish.failure_kindsays why; run it again for that window once the cause is fixed.Use
datasetsto pick a window a study can read in full: each row'sfromandtois the span that instrument and timeframe covers.versioncounts only what one version found. Without it, totals cover every version.The path is your own definition's bare slug. A study that shares the slug is ignored here.
Path parameters
Name | Type | Description |
|---|---|---|
| string | Your definition's slug |
Query parameters
Name | Type | Required | Default | Description |
|---|---|---|---|---|
| integer | No | All | Counts only events found by this version |
Response
200 with:
Field | Type | Description |
|---|---|---|
| string | The definition's slug |
| integer | Events stored in total |
| integer | Days the events span |
| number | Average events a day |
| number or null | The average time from an event's start to its end |
| array of object | One row per instrument and timeframe. Fields below |
| array of object | Runs over history still queued or running. Poll until it is empty. Fields below |
| array of object | Runs over history that failed. Fields below |
datasets object
Field | Type | Description |
|---|---|---|
| string | Canonical symbol |
| string | Timeframe |
| integer | Events stored for this pair |
| integer | Days they span |
| number | Average events a day |
| string or null | The first event's time |
| string or null | The last event's time |
| number or null | The average event length |
collecting and failed objects
Field | Type | Description |
|---|---|---|
| string | Canonical symbol, or |
| string | Timeframe |
| string | Start of the window being run |
| string | End of the window being run |
| string |
|
| string | In |
Status codes
Status | Code | Meaning |
|---|---|---|
| - | The definition's totals |
|
| The slug is not valid |
|
| You have no definition with that slug, or it has no such |
