Enums & literal unions
Catalog of real GoCharting TypeScript union types and related literal values. This is not a third-party enum mirror — only types that exist in the SDK.
Full definitions live on TypeScript Types. Usage: Chart API, Trading API, Events.
Chart / widget
| Type | Members / shape | Where used |
|---|---|---|
ChartActionId | chartReset, zoomIn, zoomOut, undo, redo, invertScale, logScale, magnet | activeChart().executeActionById() |
| Chart type strings | Runtime list from supportedChartTypes() (e.g. CANDLESTICK, LINE, …) — not a fixed TS enum yet | setChartType, supportedChartTypes |
VisibilityType | alwaysOn, alwaysOff, visibleOnMouseOver | Navigation / pane button visibility APIs |
ChartTheme | light, dark | theme / setTheme |
ChartFeatureId | topBar, bottomBar, drawingToolbar, leftPanel, rightPanel, symbolSearch, compare | features() / setFeatureEnabled |
MarketStatusInfo | { isOpen?, statusText?, dataStatus?, delaySeconds? } | activeChart().marketStatus() |
TimeFrameInput | string | { from, to } | { type: "period-back", value } | { type: "time-range", from, to } | setTimeFrame |
ChartActionId
type ChartActionId =
| "chartReset"
| "zoomIn"
| "zoomOut"
| "undo"
| "redo"
| "invertScale"
| "logScale"
| "magnet";chart.activeChart().executeActionById("zoomIn");See Chart API — Phase 1E events + actions.
Chart type strings
There is no numeric series-type enum. Use string ids returned by the widget:
console.log(chart.supportedChartTypes()); // e.g. ["CANDLESTICK", "LINE", …]
chart.setChartType("LINE");See Chart API — supportedChartTypes.
VisibilityType
type VisibilityType =
| "alwaysOn"
| "alwaysOff"
| "visibleOnMouseOver";chart.navigationButtonsVisibility().setValue("alwaysOn");
chart.paneButtonsVisibility().setValue("alwaysOff");ChartTheme
type ChartTheme = "light" | "dark";ChartFeatureId
type ChartFeatureId =
| "topBar"
| "bottomBar"
| "drawingToolbar"
| "leftPanel"
| "rightPanel"
| "symbolSearch"
| "compare";MarketStatusInfo
type MarketStatusInfo = {
isOpen?: boolean;
statusText?: string;
dataStatus?: string;
delaySeconds?: number;
};TimeFrameInput
type TimeFrameInput =
| string
| { from: number; to: number }
| { type: "period-back"; value: string }
| { type: "time-range"; from: number; to: number };Trading
| Type | Members | Where used |
|---|---|---|
OrderType | market, limit, stop, stop_limit | Orders / broker payloads |
OrderSide | buy, sell | Orders / positions |
OrderStatus | open, pending, filled, cancelled, rejected, expired | Orders |
TimeInForce | GTC, IOC, FOK, DAY | Orders |
ExecutionDirection | buy, sell | Execution shapes |
OrderType / OrderSide / OrderStatus / TimeInForce
type OrderType = "market" | "limit" | "stop" | "stop_limit";
type OrderSide = "buy" | "sell";
type OrderStatus =
| "open"
| "pending"
| "filled"
| "cancelled"
| "rejected"
| "expired";
type TimeInForce = "GTC" | "IOC" | "FOK" | "DAY";See Trading API and TypeScript Types — Trading.
ExecutionDirection
type ExecutionDirection = "buy" | "sell";Events
| Type | Members | Where used |
|---|---|---|
TradingEventType | CREATE_ORDER, PLACE_ORDER, MODIFY_ORDER, CANCEL_ORDER | Narrow trading subset |
AppCallbackEventType | Full appCallback event name union | appCallback |
TradingEventType
type TradingEventType =
| "CREATE_ORDER"
| "PLACE_ORDER"
| "MODIFY_ORDER"
| "CANCEL_ORDER";AppCallbackEventType
type AppCallbackEventType =
| "CREATE_ORDER"
| "PLACE_ORDER"
| "EDIT_ORDER"
| "PLACE_ORDER_DIRECT"
| "MODIFY_POSITION"
| "MODIFY_ORDER_DIRECT"
| "MODIFY_ORDER"
| "CANCEL_ORDER"
| "CLOSE_POSITION"
| "EXIT_ALL_POSITIONS"
| "CANCEL_ALL_ORDERS"
| "DOWNLOAD_MORE_DATA_BY_DATE"
| "DOWNLOAD_MORE_DATA"
| "OPEN_SETTINGS"
| "OPEN_TRADING_WIDGET"
| "OPEN_CONTEXT_MENU"
| "CHART_SELECTED"
| "CHART_MODE_CHANGED";See Events API.
Out of scope
This catalog does not invent enums for APIs the SDK does not expose (for example broker bottom-bar modes, drawing share modes, or a full UI action id catalog). When new unions ship in index.d.ts, they will be added here.
Related
Last updated on