ChartnautDocs

What adding a script to your library would add, and anything that stops it

GET/library/{author}/{slug}/requirements
Base URL
https://api.chartnaut.com/v1
Auth
Bearer key
Operation ID
getLibraryRequirements

The app's "Add to library" dialog as data. Changes nothing. confirm is exactly what to send to addToLibrary once the person agrees. A study's root.status is not_installable. @N in the path is refused (400).

Path parameters#

authorstringRequired

The author's username (or me / chartnaut where allowed), in any letter case.

Example bob
slugstringRequired

The script's slug. No @N; a library entry is the live script.

Example vwap-bands

Query parameters#

kindstring · ScriptKind

When the author has more than one script with that slug.

One of indicator definition study

Responses#

200OKapplication/json

The requirements.

rootobject · LibraryItemRequired
Show fields
refstringRequired
Example bob/session-vwap
kindstring · ScriptKindRequired
One of indicator definition study
namestringRequired
authorstring

Lowercase username, or chartnaut. Omitted on a requirements root.

statusstring · LibraryItemStatusRequired

installable: adding the root adds it. installed: already in your library. owned: yours. builtin: Chartnaut's. unavailable: not shared with you. not_installable: a study root.

One of installable installed owned builtin unavailable not_installable
needsarray of object · LibraryItemRequired

Every dependency the caller can have, at its status. Only installable ones are added.

Show item fields
refstringRequired
Example bob/session-vwap
kindstring · ScriptKindRequired
One of indicator definition study
namestringRequired
authorstring

Lowercase username, or chartnaut. Omitted on a requirements root.

statusstring · LibraryItemStatusRequired

installable: adding the root adds it. installed: already in your library. owned: yours. builtin: Chartnaut's. unavailable: not shared with you. not_installable: a study root.

One of installable installed owned builtin unavailable not_installable
cannot_addarray of object · LibraryCannotAddRequired

Dependencies not shared with the caller. Any one refuses the add.

Show item fields
kindstringRequired
namestringRequired
truncatedbooleanRequired

The walk stopped at 200 scripts; needs is a prefix.

confirmarray of stringRequired

The refs to send as confirm to addToLibrary.

messagestringRequired

The app's wording for the situation, to show the person.

400Bad requestapplication/json

invalid_request: the path is not /library/{author}/{slug}, has @N, or kind is not valid.

object · Error
errorobjectRequired
Show fields
codestringRequired

Stable. Branch on this, never on message.

One of unauthorized forbidden_scope plan_limit not_found version_conflict script_invalid in_use out_of_coverage unknown_instrument ambiguous_instrument unsupported_timeframe run_not_finished rate_limited busy invalid_request forbidden conflict not_in_library confirmation_required not_shared not_installable not_implemented authorization_pending slow_down access_denied expired_token internal
messagestringRequired
detailsobject
docs_urlstring (uri)
request_idstring
404Not foundapplication/json

not_found: no script by that author and slug the caller can see.

object · Error
errorobjectRequired
Show fields
codestringRequired

Stable. Branch on this, never on message.

One of unauthorized forbidden_scope plan_limit not_found version_conflict script_invalid in_use out_of_coverage unknown_instrument ambiguous_instrument unsupported_timeframe run_not_finished rate_limited busy invalid_request forbidden conflict not_in_library confirmation_required not_shared not_installable not_implemented authorization_pending slow_down access_denied expired_token internal
messagestringRequired
detailsobject
docs_urlstring (uri)
request_idstring
409Conflictapplication/json

conflict: more than one script with that slug. Pass kind.

object · Error
errorobjectRequired
Show fields
codestringRequired

Stable. Branch on this, never on message.

One of unauthorized forbidden_scope plan_limit not_found version_conflict script_invalid in_use out_of_coverage unknown_instrument ambiguous_instrument unsupported_timeframe run_not_finished rate_limited busy invalid_request forbidden conflict not_in_library confirmation_required not_shared not_installable not_implemented authorization_pending slow_down access_denied expired_token internal
messagestringRequired
detailsobject
docs_urlstring (uri)
request_idstring
ErrorAny other statusapplication/json

Error.

object · Error
errorobjectRequired
Show fields
codestringRequired

Stable. Branch on this, never on message.

One of unauthorized forbidden_scope plan_limit not_found version_conflict script_invalid in_use out_of_coverage unknown_instrument ambiguous_instrument unsupported_timeframe run_not_finished rate_limited busy invalid_request forbidden conflict not_in_library confirmation_required not_shared not_installable not_implemented authorization_pending slow_down access_denied expired_token internal
messagestringRequired
detailsobject
docs_urlstring (uri)
request_idstring