Lint and resolve a script without saving or running it
/scripts/validate- Base URL
https://api.chartnaut.com/v1- Auth
- Bearer key
- Operation ID
validateScript
Returns diagnostics, the derived settings and outputs, and the dependency versions it would pin. Free (no compute units).
Request bodyapplication/json#
Show item fields
pathstringRequiredcodestringRequiredentrybooleanExactly one file is the entry. Indicators have one file, always the entry.
Responses#
200OKapplication/json
Validation result. ok:false is still a 200; the request itself succeeded.
okbooleandiagnosticsarray of object · DiagnosticShow item fields
severitystringRequiredcodestringmessagestringRequiredpathstringlineintegersettingstringThe setting a finding is about, if any.
interfaceobject · ScriptInterfaceWhat a caller needs to run the script and read its results. Derived from the code.
Show fields
settingsmap of object · SettingDefShow value fields
typestringAn indicator's settings take their type, bounds and options from its settings dialog.
defaultanyminnumbermaxnumberstepnumberoptionsarray of anyChoices for a select. From an indicator's settings dialog each is {label, value}.
outputsarray of object · OutputDefIndicator only.
Show item fields
idstringnamestringkindstringThe output's declared kind (line, area, baseline, histogram, fill, markers, labels, hline, range, …).
panestringeventsarray of object · EventDefDefinition only. The events it can emit.
Show item fields
idstringintentstringpayload_keysarray of stringresultsarray of objectStudy only. The result blocks it produces.
Show item fields
timeframesarray of string · TimeframeExtra timeframes the script reads besides the run's own.
warmup_barsintegerdependenciesarray of object · PinnedDependencyThe versions a save would pin now.
Show item fields
refstring · ScriptRefslug or slug@N for your own scripts; author/slug or
author/slug@N for library scripts; chartnaut/slug for built-ins
(which always run their latest version).
asstringThe alias the script uses.
versionintegerErrorAny other statusapplication/json
Error.
errorobjectRequiredShow fields
codestringRequiredStable. Branch on this, never on message.
messagestringRequireddetailsobjectdocs_urlstring (uri)request_idstring