Compile and run JavaScript indicator source against real bars (nothing is saved)

post/v1/indicators/js/preview

Request

  • Base URL: https://app.texttoquant.com/api
  • URL: https://app.texttoquant.com/api/v1/indicators/js/preview
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

js_codestring required
symbolstring
timeframestring
barsinteger
paramsobject

Response

Answers {success, ok, diagnostics, warnings, contract, series, ...} at the top level (no data wrapper)

successtrue required
okboolean required

False when the source failed to compile or run; see diagnostics.

diagnosticsobject[] required
warningsobject[]
contractobject

The declared inputs, plots and visuals.

seriesobject nullable

One array of {t, v} per plot, the same shape POST /v1/indicators/compute answers; null when ok is false.

colorSeriesobject nullable
candlesobject[] nullable
statsobject
costobject nullable
windowobject

The bars the preview compiled against: requested, loaded, used, first and last bar time.

Changes

No recorded changes to this operation across all 1 revision of this API.