Get usage
/usageReturns compute used this calendar month, every plan cap with its current count, and your plan's API limits. Call it to size your program's concurrency and to see how close you are to a cap.
Scope | Heavy call | Long poll | CLI |
|---|---|---|---|
| No | No |
|
Guidance
Read
api_limitsbefore fanning out. Keep heavy calls in flight at or belowconcurrent_heavyand long polls at or belowconcurrent_waits, and you will not see429 busyfrom your own program.caps.concurrent_runs.usedcounts runs executing right now from the app and the API together. If it sits at its limit, the Agent or a study in the app is using your runs at once, and new API runs wait inqueued.Check
caps.definitions,caps.studiesandcaps.eventsbefore Create a script or Run a definition over history, which answer403 plan_limitat a cap.compute_units.includedis alwaysnull: nothing is charged yet.usedcounts API runs started this month.history_startis the earliest time a run can reach. A window that starts earlier is moved forward to it.
Response
200 with:
Field | Type | Description |
|---|---|---|
| string |
|
| object |
|
| object |
|
| object | Each plan cap with its current count. Keys below |
| string | The earliest time your plan's history reaches |
| integer | Your plan's indicator memory in bars |
| object | Your plan's API limits. Fields below |
caps object
Each key is an object {used, limit}. used is an integer; limit is an integer, or null when the cap is unlimited.
Key | Counts |
|---|---|
| Your custom indicators, against your library limits |
| Your definitions |
| Your studies |
| Stored definition events across all your definitions |
| Runs executing for your account right now, from the app and the API, against your runs at once |
api_limits object
Field | Type | Description |
|---|---|---|
| integer | Calls a minute across all your keys |
| integer | Heavy calls in flight at once |
| integer | Long polls holding at once |
Status codes
Status | Code | Meaning |
|---|---|---|
| - | Usage and limits for your account |
|
| Your plan could not be read. Retry |
