Skip to Content
API ReferenceEnums & literal unions

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

TypeMembers / shapeWhere used
ChartActionIdchartReset, zoomIn, zoomOut, undo, redo, invertScale, logScale, magnetactiveChart().executeActionById()
Chart type stringsRuntime list from supportedChartTypes() (e.g. CANDLESTICK, LINE, …) — not a fixed TS enum yetsetChartType, supportedChartTypes
VisibilityTypealwaysOn, alwaysOff, visibleOnMouseOverNavigation / pane button visibility APIs
ChartThemelight, darktheme / setTheme
ChartFeatureIdtopBar, bottomBar, drawingToolbar, leftPanel, rightPanel, symbolSearch, comparefeatures() / setFeatureEnabled
MarketStatusInfo{ isOpen?, statusText?, dataStatus?, delaySeconds? }activeChart().marketStatus()
TimeFrameInputstring | { 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

TypeMembersWhere used
OrderTypemarket, limit, stop, stop_limitOrders / broker payloads
OrderSidebuy, sellOrders / positions
OrderStatusopen, pending, filled, cancelled, rejected, expiredOrders
TimeInForceGTC, IOC, FOK, DAYOrders
ExecutionDirectionbuy, sellExecution 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

TypeMembersWhere used
TradingEventTypeCREATE_ORDER, PLACE_ORDER, MODIFY_ORDER, CANCEL_ORDERNarrow trading subset
AppCallbackEventTypeFull appCallback event name unionappCallback

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.

Last updated on