Search the scripts the caller can use. No source
/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#
qstringSearch 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.
kindstring · ScriptKindAn unknown kind is 400 invalid_request.
scopestringmine: 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.
authorstringOne author, within scope. A username, chartnaut for built-ins, or me.
sortstringDefaults 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.
includestringinterface adds each item's interface at its latest version.
cursorstringOpaque cursor from a previous page's next_cursor.
limitintegerResponses#
200OKapplication/json
A page of library scripts.
Includes Page
next_cursorstringNullabledataarray of object · LibraryScriptShow item fields
Bare slug for the caller's own, chartnaut/slug for built-ins, author/slug for others. Usable as script in POST /runs.
slugstringRequirednamestringRequireddescriptionstringRequiredPlain text; a rich-text description is converted. "" when empty.
authorstringRequiredThe author's username in lowercase, or chartnaut for built-ins.
officialbooleanRequiredTrue for Chartnaut's built-ins.
ownedbooleanRequiredTrue when the caller wrote it.
installedbooleanRequiredTrue when it is someone else's script the caller added to their library.
visibilitystringRequiredBuilt-ins are public.
latest_versionintegerRequired0 when no version has been saved.
adoptionsintegerRequiredNullableInstall count. null for studies.
tagsarray of stringRequiredcategorystringRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)Requiredapp_urlstring (uri)Requiredinterfaceobject · ScriptInterfaceOn GET /library only with include=interface.
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_barsinteger400Bad requestapplication/json
invalid_request: bad scope, kind or sort, or q over 200 characters.
errorobjectRequiredShow fields
codestringRequiredStable. Branch on this, never on message.
messagestringRequireddetailsobjectdocs_urlstring (uri)request_idstringErrorAny other statusapplication/json
Error.
errorobjectRequiredShow fields
codestringRequiredStable. Branch on this, never on message.
messagestringRequireddetailsobjectdocs_urlstring (uri)request_idstring