PineChartRuntimeApi
Integration guide · Reference index
Public contract reference. This declaration describes types and callback shapes; availability is constrained by the linked integration guide and the runtime capability. Legacy product-specific fields are not a promise of implementation.
chartEpoch
chartEpoch(): number;Use the type signature above and the integration guide for the owning capability.
compile
compile(
source: string,
options?: { signal?: AbortSignal },
): Promise<PineScriptCompileResult>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
source | string | Yes |
options | { signal?: AbortSignal } | No |
run
run(input: {
source: string;
sourceHash: string;
studyId?: string | null;
}): Promise<{
chartEpoch: number;
compile: PineScriptCompileResult;
sourceHash: string;
strategyReportBaseline: {
revision: number;
studyId: string | null;
};
studyId: string;
}>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
input | { source: string; sourceHash: string; studyId?: string | null; } | Yes |
remove
remove(studyId: string): Promise<void>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
getExecutionProgress
getExecutionProgress(studyId: string): PineExecutionProgress | null;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
getStrategyReport
getStrategyReport(studyId: string): PineStrategyReport | null;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
getStrategySnapshot
getStrategySnapshot(studyId: string): {
report: PineStrategyReport;
revision: number;
} | null;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
getLogSnapshot
getLogSnapshot(studyId: string): { logs: PineLogPage; revision: number } | null;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
subscribeLogs
subscribeLogs(studyId: string, listener: (change: { revision: number; logs: PineLogPage | null }) => void): () => void;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
listener | (change: { revision: number; logs: PineLogPage | null }) => void | Yes |
readLogPage
readLogPage(studyId: string, cursor: PineLogCursor, options?: { signal?: AbortSignal }): Promise<PineLogPage>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
cursor | PineLogCursor | Yes |
options | { signal?: AbortSignal } | No |
focusLogBar
focusLogBar(studyId: string, barOpenTimeMs: number): Promise<void>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
barOpenTimeMs | number | Yes |
subscribeExecutionProgress
subscribeExecutionProgress(
studyId: string,
listener: (progress: PineExecutionProgress) => void,
): () => void;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
listener | (progress: PineExecutionProgress) => void | Yes |
subscribeStrategyReport
subscribeStrategyReport(
studyId: string,
listener: (change: {
revision: number;
report: PineStrategyReport;
}) => void,
): () => void;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
listener | (change: { revision: number; report: PineStrategyReport; }) => void | Yes |
focusStrategyTrade
focusStrategyTrade(studyId: string, tradeId: string): Promise<void>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
studyId | string | Yes |
tradeId | string | Yes |