ChartnautDocs

Search the scripts the caller can use. No source

GET/library
Base URL
https://api.chartnaut.com/v1
Auth
Bearer key
Operation ID
searchLibrary

Searches the caller's own scripts, Chartnaut's built-ins, other people's public scripts and other people's public or unlisted scripts the caller added to their library. Studies have no community layer: only the caller's own and built-in studies appear. Archived and deleted scripts never appear, nor do other people's scripts whose owner has no username. Each item's ref is usable as script in POST /runs. Not a heavy call.

Query parameters#

qstring

Search words. Every word (the first 8 filter) must appear, in any letter case, in the name, slug, description, tags, category or author's username. Built-ins match chartnaut as their author.

At most 200 characters
kindstring · ScriptKind

An unknown kind is 400 invalid_request.

One of indicator definition study
scopestring

mine: own scripts, any visibility. published: own public scripts. chartnaut: built-ins. community: other people's public scripts. installed: other people's public or unlisted scripts the caller added to their library. library: mine + chartnaut + installed (what the app's library shows). all: library + community.

One of all library mine published chartnaut community installedDefault all
authorstring

One author, within scope. A username, chartnaut for built-ins, or me.

sortstring

Defaults to relevance when q is set, else updated. relevance: exact slug or name, then prefix, then substring match on the whole query, ties by adoptions then updated. updated/created: newest first. adoptions: most first. name: A to Z.

One of relevance updated created adoptions name
includestring

interface adds each item's interface at its latest version.

Only interface
cursorstring

Opaque cursor from a previous page's next_cursor.

limitinteger
Default 501 to 200

Responses#

200OKapplication/json

A page of library scripts.

object

Includes Page

next_cursorstringNullable
dataarray of object · LibraryScript
Show item fields
refstring · ScriptRefRequired

Bare slug for the caller's own, chartnaut/slug for built-ins, author/slug for others. Usable as script in POST /runs.

Examples vwap-reclaim vwap-reclaim@3 jane/orb-breakout@7 chartnaut/rsi
kindstring · ScriptKindRequired
One of indicator definition study
slugstringRequired
namestringRequired
descriptionstringRequired

Plain text; a rich-text description is converted. "" when empty.

authorstringRequired

The author's username in lowercase, or chartnaut for built-ins.

officialbooleanRequired

True for Chartnaut's built-ins.

ownedbooleanRequired

True when the caller wrote it.

installedbooleanRequired

True when it is someone else's script the caller added to their library.

visibilitystringRequired

Built-ins are public.

One of private unlisted public
latest_versionintegerRequired

0 when no version has been saved.

adoptionsintegerRequiredNullable

Install count. null for studies.

tagsarray of stringRequired
categorystringRequired
created_atstring (date-time)Required
updated_atstring (date-time)Required
app_urlstring (uri)Required
interfaceobject · ScriptInterface

On GET /library only with include=interface.

Show fields
settingsmap of object · SettingDef
Show value fields
typestring

An indicator's settings take their type, bounds and options from its settings dialog.

One of number string boolean color select multi_select timeframe range array
defaultany
minnumber
maxnumber
stepnumber
optionsarray of any

Choices for a select. From an indicator's settings dialog each is {label, value}.

outputsarray of object · OutputDef

Indicator only.

Show item fields
idstring
namestring
kindstring

The output's declared kind (line, area, baseline, histogram, fill, markers, labels, hline, range, …).

panestring
One of price own
eventsarray of object · EventDef

Definition only. The events it can emit.

Show item fields
idstring
Example reclaim_long
intentstring
payload_keysarray of string
resultsarray of object

Study only. The result blocks it produces.

Show item fields
keystring
kindstring · StudyResultKind
One of metric series distribution boxplot heatmap scatter bar table vega annotation prose popover_layout
titlestring
timeframesarray of string · Timeframe

Extra timeframes the script reads besides the run's own.

warmup_barsinteger
400Bad requestapplication/json

invalid_request: bad scope, kind or sort, or q over 200 characters.

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