Skip to content

charton API


charton API / @chart-on/core / index / IndicatorFetchRequest

Interface: IndicatorFetchRequest<I> ​

Defined in: packages/core/src/indicators/types.ts:309

One fetch call: the rows for bars in [from, to).

Extends ​

Type Parameters ​

I ​

I extends Record<string, InputValue> = Record<string, InputValue>

Properties ​

barCount ​

barCount: number

Defined in: packages/core/src/indicators/types.ts:319

Main bars in the range: about how many rows are expected. A size, not a cap (rows may be missing or extra), hence not limit as in BarsRequest.


from ​

from: number

Defined in: packages/core/src/indicators/types.ts:312

Time of the oldest bar wanted (inclusive), unix seconds.


inputs ​

inputs: I

Defined in: packages/core/src/indicators/types.ts:305

Inherited from ​

IndicatorContext.inputs


interval ​

interval: Interval

Defined in: packages/core/src/indicators/types.ts:304

Inherited from ​

IndicatorContext.interval


signal ​

signal: AbortSignal

Defined in: packages/core/src/indicators/types.ts:321

Aborted when the answer is no longer needed (symbol or interval switch, removal).


symbol ​

symbol: SymbolInfo

Defined in: packages/core/src/indicators/types.ts:303

Inherited from ​

IndicatorContext.symbol


to ​

to: number

Defined in: packages/core/src/indicators/types.ts:314

End of the range (exclusive), unix seconds.

Methods ​

barsOf() ​

barsOf(symbol): Promise<Bar[]>

Defined in: packages/core/src/indicators/types.ts:327

Another symbol's bars for the same interval and range, loaded through the chart's data source. Rejects when the chart has no data source. Named for what it returns, without a get prefix, like the chart's other readers.

Parameters ​

symbol ​

string

Returns ​

Promise<Bar[]>