@lumencharts/trading-platform 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/LICENSE +55 -0
- package/README.md +53 -2
- package/dist/asset-entry.d.ts +3 -0
- package/dist/asset.d.ts +3 -0
- package/dist/asset.js +21689 -0
- package/dist/chart/bracket-links.d.ts +8 -0
- package/dist/chart/context-actions.d.ts +7 -0
- package/dist/chart/edit-presentation.d.ts +32 -0
- package/dist/chart/edit-preview.d.ts +26 -0
- package/dist/chart/exit-profit.d.ts +32 -0
- package/dist/chart/frame-batch.d.ts +15 -0
- package/dist/chart/overlay-coordinator.d.ts +18 -0
- package/dist/chart/overlay-events.d.ts +3 -0
- package/dist/chart/overlay-gesture.d.ts +40 -0
- package/dist/chart/overlay-index.d.ts +30 -0
- package/dist/chart/overlay-projection.d.ts +51 -0
- package/dist/chart/overlay-types.d.ts +42 -0
- package/dist/chart/parent-links.d.ts +33 -0
- package/dist/chart/position-profit.d.ts +15 -0
- package/dist/chart/review-lock.d.ts +14 -0
- package/dist/chart/ticket-projection.d.ts +36 -0
- package/dist/compat/default-formatters.d.ts +6 -0
- package/dist/compat/delegate.d.ts +11 -0
- package/dist/compat/factory.d.ts +5 -0
- package/dist/compat/formatters.d.ts +26 -0
- package/dist/compat/host-dialogs.d.ts +5 -0
- package/dist/compat/host-preferences.d.ts +8 -0
- package/dist/compat/host.d.ts +39 -0
- package/dist/compat/watched-value.d.ts +25 -0
- package/dist/conformance/index.d.ts +78 -0
- package/dist/conformance/index.js +6859 -0
- package/dist/conformance/replay.d.ts +35 -0
- package/dist/contracts/broker.d.ts +1122 -0
- package/dist/contracts/broker.js +168 -0
- package/dist/contracts/index.d.ts +3 -0
- package/dist/contracts/index.js +168 -0
- package/dist/contracts/market-data.d.ts +289 -0
- package/dist/contracts/market-data.js +11 -0
- package/dist/contracts/ports.d.ts +469 -0
- package/dist/contracts/ports.js +5 -0
- package/dist/core/account-datasets.d.ts +29 -0
- package/dist/core/account-lifecycle.d.ts +70 -0
- package/dist/core/account-types.d.ts +6 -0
- package/dist/core/bounded-map.d.ts +12 -0
- package/dist/core/bracket-input.d.ts +32 -0
- package/dist/core/bracket-modification.d.ts +6 -0
- package/dist/core/bracket-parent.d.ts +11 -0
- package/dist/core/broker-debug.d.ts +10 -0
- package/dist/core/capabilities.d.ts +34 -0
- package/dist/core/capability-metadata.d.ts +60 -0
- package/dist/core/capability-policy.d.ts +32 -0
- package/dist/core/chart-exit-level.d.ts +11 -0
- package/dist/core/chart-order-edit.d.ts +50 -0
- package/dist/core/clock.d.ts +2 -0
- package/dist/core/close-commands.d.ts +24 -0
- package/dist/core/close-flow.d.ts +14 -0
- package/dist/core/command-context.d.ts +16 -0
- package/dist/core/command-coordinator.d.ts +71 -0
- package/dist/core/command-follow.d.ts +32 -0
- package/dist/core/command-keys.d.ts +11 -0
- package/dist/core/context-orders.d.ts +19 -0
- package/dist/core/deferred.d.ts +5 -0
- package/dist/core/dialog-coordinator.d.ts +73 -0
- package/dist/core/display-preferences.d.ts +10 -0
- package/dist/core/disposal.d.ts +8 -0
- package/dist/core/entity-store.d.ts +56 -0
- package/dist/core/entity-validation.d.ts +9 -0
- package/dist/core/errors.d.ts +24 -0
- package/dist/core/execution-demand.d.ts +11 -0
- package/dist/core/execution-sound.d.ts +10 -0
- package/dist/core/exit-level-draft.d.ts +9 -0
- package/dist/core/exit-level-summary.d.ts +3 -0
- package/dist/core/exit-level-template.d.ts +16 -0
- package/dist/core/features.d.ts +39 -0
- package/dist/core/financial-rules.d.ts +70 -0
- package/dist/core/history-limit.d.ts +11 -0
- package/dist/core/identity.d.ts +14 -0
- package/dist/core/immutable.d.ts +8 -0
- package/dist/core/keyed-ref-count.d.ts +18 -0
- package/dist/core/leverage-commands.d.ts +42 -0
- package/dist/core/modification-context.d.ts +22 -0
- package/dist/core/modification-routing.d.ts +43 -0
- package/dist/core/notification-log.d.ts +33 -0
- package/dist/core/number-precision.d.ts +4 -0
- package/dist/core/order-commands.d.ts +50 -0
- package/dist/core/order-duration.d.ts +14 -0
- package/dist/core/order-labels.d.ts +7 -0
- package/dist/core/order-matching.d.ts +16 -0
- package/dist/core/order-modification.d.ts +20 -0
- package/dist/core/order-notifications.d.ts +30 -0
- package/dist/core/order-protection.d.ts +4 -0
- package/dist/core/parent-protection.d.ts +10 -0
- package/dist/core/position-commands.d.ts +45 -0
- package/dist/core/position-custom-fields.d.ts +5 -0
- package/dist/core/position-estimates.d.ts +22 -0
- package/dist/core/position-protection-permissions.d.ts +4 -0
- package/dist/core/preferences-key.d.ts +2 -0
- package/dist/core/preview-leases.d.ts +12 -0
- package/dist/core/protection-legs.d.ts +23 -0
- package/dist/core/protection-notifications.d.ts +9 -0
- package/dist/core/protection-rules.d.ts +21 -0
- package/dist/core/quantity-input.d.ts +53 -0
- package/dist/core/read-coordinator.d.ts +15 -0
- package/dist/core/readers.d.ts +6 -0
- package/dist/core/relative-price.d.ts +4 -0
- package/dist/core/review-policy.d.ts +17 -0
- package/dist/core/session-types.d.ts +1 -0
- package/dist/core/session.d.ts +114 -0
- package/dist/core/snapshot-dataset.d.ts +47 -0
- package/dist/core/symbol-catalog.d.ts +37 -0
- package/dist/core/tradability.d.ts +26 -0
- package/dist/core/trading-commands.d.ts +104 -0
- package/dist/core/trading-rules.d.ts +14 -0
- package/dist/core/trading-settings.d.ts +39 -0
- package/dist/core/trading-state.d.ts +52 -0
- package/dist/core/value-store.d.ts +11 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +6593 -0
- package/dist/market-data/depth-book.d.ts +18 -0
- package/dist/market-data/index.d.ts +3 -0
- package/dist/market-data/index.js +735 -0
- package/dist/market-data/session-demand.d.ts +15 -0
- package/dist/market-data/subscriptions.d.ts +13 -0
- package/dist/mock/broker.d.ts +75 -0
- package/dist/mock/clock.d.ts +12 -0
- package/dist/mock/feeds.d.ts +18 -0
- package/dist/mock/index.d.ts +5 -0
- package/dist/mock/index.js +1956 -0
- package/dist/mock/protection-cancellation.d.ts +7 -0
- package/dist/mock/scenarios.d.ts +5 -0
- package/dist/paper/broker.d.ts +41 -0
- package/dist/paper/index.d.ts +6 -0
- package/dist/paper/index.js +469 -0
- package/dist/paper/market.d.ts +57 -0
- package/dist/paper/rules.d.ts +40 -0
- package/dist/ui/account-manager/account-pages.d.ts +18 -0
- package/dist/ui/account-manager/column-presentation.d.ts +5 -0
- package/dist/ui/account-manager/context-menu.d.ts +13 -0
- package/dist/ui/account-manager/csv-downloads.d.ts +5 -0
- package/dist/ui/account-manager/custom-page.d.ts +16 -0
- package/dist/ui/account-manager/custom-table.d.ts +18 -0
- package/dist/ui/account-manager/format-account-value.d.ts +12 -0
- package/dist/ui/account-manager/position-reader.d.ts +19 -0
- package/dist/ui/account-manager/row-action-tracker.d.ts +12 -0
- package/dist/ui/account-manager/row-actions.d.ts +37 -0
- package/dist/ui/account-manager/status-counts.d.ts +6 -0
- package/dist/ui/account-manager/table-controls.d.ts +13 -0
- package/dist/ui/account-manager/table-export.d.ts +30 -0
- package/dist/ui/account-manager/table-model.d.ts +11 -0
- package/dist/ui/account-manager/table-toolbar.d.ts +25 -0
- package/dist/ui/account-manager/table.d.ts +24 -0
- package/dist/ui/account-manager/view.d.ts +19 -0
- package/dist/ui/account-manager/workspace.d.ts +15 -0
- package/dist/ui/chart-actions.d.ts +11 -0
- package/dist/ui/chart-controls/eligibility.d.ts +6 -0
- package/dist/ui/chart-controls/quote-buttons.d.ts +15 -0
- package/dist/ui/chart-controls/quote-controls.d.ts +12 -0
- package/dist/ui/chart-controls/quote-widths.d.ts +8 -0
- package/dist/ui/dialogs/close-amount-form.d.ts +8 -0
- package/dist/ui/dialogs/close-preview-dialog.d.ts +5 -0
- package/dist/ui/dialogs/confirm-dialog.d.ts +7 -0
- package/dist/ui/dialogs/dialog-body.d.ts +11 -0
- package/dist/ui/dialogs/leverage-form.d.ts +10 -0
- package/dist/ui/dialogs/message-dialog.d.ts +6 -0
- package/dist/ui/dialogs/position-protection.d.ts +14 -0
- package/dist/ui/dialogs/properties-dialog.d.ts +9 -0
- package/dist/ui/dialogs/sanitize-html.d.ts +2 -0
- package/dist/ui/dialogs/types.d.ts +5 -0
- package/dist/ui/dialogs/view.d.ts +5 -0
- package/dist/ui/dock-sizes.d.ts +20 -0
- package/dist/ui/dom/controller.d.ts +34 -0
- package/dist/ui/dom/ladder.d.ts +23 -0
- package/dist/ui/dom/view.d.ts +8 -0
- package/dist/ui/dom/workspace.d.ts +17 -0
- package/dist/ui/effective-mode.d.ts +11 -0
- package/dist/ui/financial-lease.d.ts +3 -0
- package/dist/ui/icons.d.ts +4 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +15918 -0
- package/dist/ui/layout.d.ts +5 -0
- package/dist/ui/mount.d.ts +11 -0
- package/dist/ui/notifications/log.d.ts +6 -0
- package/dist/ui/notifications/toasts.d.ts +5 -0
- package/dist/ui/number-input.d.ts +2 -0
- package/dist/ui/order-ticket/chart-draft-controls.d.ts +8 -0
- package/dist/ui/order-ticket/chart-projection.d.ts +9 -0
- package/dist/ui/order-ticket/controller.d.ts +41 -0
- package/dist/ui/order-ticket/custom-field.d.ts +9 -0
- package/dist/ui/order-ticket/duration-input.d.ts +9 -0
- package/dist/ui/order-ticket/exit-input.d.ts +34 -0
- package/dist/ui/order-ticket/financial-controls.d.ts +10 -0
- package/dist/ui/order-ticket/layout-context.d.ts +7 -0
- package/dist/ui/order-ticket/market.d.ts +12 -0
- package/dist/ui/order-ticket/menu.d.ts +6 -0
- package/dist/ui/order-ticket/mode-rules.d.ts +4 -0
- package/dist/ui/order-ticket/modification-fields.d.ts +23 -0
- package/dist/ui/order-ticket/move-handle.d.ts +4 -0
- package/dist/ui/order-ticket/order-sent.d.ts +4 -0
- package/dist/ui/order-ticket/placement.d.ts +27 -0
- package/dist/ui/order-ticket/preview-message.d.ts +4 -0
- package/dist/ui/order-ticket/price-input.d.ts +14 -0
- package/dist/ui/order-ticket/quantity-input.d.ts +26 -0
- package/dist/ui/order-ticket/review-panel.d.ts +10 -0
- package/dist/ui/order-ticket/rules.d.ts +16 -0
- package/dist/ui/order-ticket/stop-input.d.ts +17 -0
- package/dist/ui/order-ticket/submit-bar.d.ts +13 -0
- package/dist/ui/order-ticket/symbol-search-controller.d.ts +50 -0
- package/dist/ui/order-ticket/symbol-search.d.ts +12 -0
- package/dist/ui/order-ticket/untradable-notice.d.ts +8 -0
- package/dist/ui/order-ticket/view.d.ts +16 -0
- package/dist/ui/panel-visibility.d.ts +6 -0
- package/dist/ui/pointer-drag.d.ts +20 -0
- package/dist/ui/popup-mount.d.ts +4 -0
- package/dist/ui/primitives.d.ts +29 -0
- package/dist/ui/protection/editor.d.ts +18 -0
- package/dist/ui/protection/fields.d.ts +30 -0
- package/dist/ui/protection/level.d.ts +14 -0
- package/dist/ui/protection/protected-size.d.ts +5 -0
- package/dist/ui/protection/ticket-workspace.d.ts +7 -0
- package/dist/ui/resize-handle.css +34 -0
- package/dist/ui/resize-handle.d.ts +20 -0
- package/dist/ui/resize-handle.js +185 -0
- package/dist/ui/select.d.ts +26 -0
- package/dist/ui/surface-theme.d.ts +3 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/symbol-logo.d.ts +7 -0
- package/dist/ui/tabs.d.ts +19 -0
- package/dist/ui/ticket-dock.d.ts +18 -0
- package/dist/ui/ticket-shell.d.ts +15 -0
- package/dist/ui/trading.css +1808 -0
- package/dist/ui/trap-tab.d.ts +11 -0
- package/dist/vendor/solid-ui/index.d.ts +3 -0
- package/dist/vendor/solid-ui/paged-list-window.d.ts +27 -0
- package/dist/vendor/solid-ui/virtual-list.d.ts +21 -0
- package/package.json +104 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Exclusive width thresholds; trading.css media queries are checked against these values. */
|
|
2
|
+
export declare const COMPACT_WIDTH = 900;
|
|
3
|
+
export declare const NARROW_WIDTH = 600;
|
|
4
|
+
/** Wrapped account controls still leave room for rows on narrow hosts. Host geometry remains authoritative. */
|
|
5
|
+
export declare function accountDockHeight(preferred: number, width: number, maximum: number): number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TradingCollectionPort, TradingPresentationPort } from "../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../core/session.js";
|
|
3
|
+
export interface TradingMountOptions {
|
|
4
|
+
readonly session: TradingSession;
|
|
5
|
+
readonly collection: TradingCollectionPort;
|
|
6
|
+
readonly presentation: TradingPresentationPort;
|
|
7
|
+
}
|
|
8
|
+
/** Owns mounted presentation only. The supplied session belongs to the consumer. */
|
|
9
|
+
export declare function mountTradingPlatform(options: TradingMountOptions): {
|
|
10
|
+
destroy: () => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TradingEnvironment } from "../../contracts/ports.js";
|
|
2
|
+
import type { TradingNotification } from "../../core/notification-log.js";
|
|
3
|
+
export declare function TradingNotificationLog(props: {
|
|
4
|
+
entries: readonly TradingNotification[];
|
|
5
|
+
environment: TradingEnvironment;
|
|
6
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TradingSession } from "../../core/session.js";
|
|
2
|
+
import type { TradingChartPort } from "../../contracts/ports.js";
|
|
3
|
+
import type { TicketController } from "./controller.js";
|
|
4
|
+
export declare function ChartDraftControls(props: {
|
|
5
|
+
session: TradingSession;
|
|
6
|
+
chart: TradingChartPort;
|
|
7
|
+
ticket: TicketController;
|
|
8
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TradingCollectionPort } from "../../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
import type { TicketController } from "./controller.js";
|
|
4
|
+
type Controller = TicketController;
|
|
5
|
+
/** The ticket is the canonical unsent order; chart lines are transient views, never broker rows. */
|
|
6
|
+
export declare function createTicketProjection(session: TradingSession, collection: TradingCollectionPort, ticket: Controller, focusQuantity?: () => void): {
|
|
7
|
+
destroy: () => void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { OrderType } from "../../contracts/broker.js";
|
|
2
|
+
import type { InstrumentInfo, Order, OrderDialogOptions, OrderPreviewResult, PreOrder } from "../../contracts/broker.js";
|
|
3
|
+
import type { TradingChartBinding } from "../../contracts/ports.js";
|
|
4
|
+
import type { TradingSession } from "../../core/session.js";
|
|
5
|
+
import type { TradingCommandContext } from "../../core/trading-commands.js";
|
|
6
|
+
export interface TicketState {
|
|
7
|
+
readonly binding?: TradingChartBinding;
|
|
8
|
+
readonly context?: TradingCommandContext;
|
|
9
|
+
readonly order: PreOrder | Order;
|
|
10
|
+
readonly revision: number;
|
|
11
|
+
readonly phase: "closed" | "loading" | "editing" | "previewing" | "confirming" | "sending" | "confirmed" | "unconfirmed" | "error";
|
|
12
|
+
readonly refreshing?: boolean;
|
|
13
|
+
/** While sending: the broker acknowledged the request but has not confirmed its result yet. */
|
|
14
|
+
readonly accepted?: boolean;
|
|
15
|
+
/** While unconfirmed: true as long as the session is still checking with the broker; false once unresolved. */
|
|
16
|
+
readonly checking?: boolean;
|
|
17
|
+
readonly instrument?: InstrumentInfo;
|
|
18
|
+
readonly options?: OrderDialogOptions;
|
|
19
|
+
readonly preview?: OrderPreviewResult;
|
|
20
|
+
readonly previewToken?: string;
|
|
21
|
+
readonly error?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Form state is independent of mounting/docking. Every edit invalidates the exact preview identity. */
|
|
24
|
+
export declare function createTicketController(session: TradingSession): {
|
|
25
|
+
refreshInstrument: () => Promise<void>;
|
|
26
|
+
rememberedStopLoss: () => number | undefined;
|
|
27
|
+
patchProtection: (changes: Partial<PreOrder>) => void;
|
|
28
|
+
setStopLoss: (stopLoss: number | undefined) => void;
|
|
29
|
+
state: import("../../contracts/ports.js").ReadonlyValue<Readonly<TicketState>>;
|
|
30
|
+
open: (binding: TradingChartBinding, template?: Partial<PreOrder> | Order) => Promise<void>;
|
|
31
|
+
patch: (changes: Partial<PreOrder>) => void;
|
|
32
|
+
changeType: (type: OrderType) => void;
|
|
33
|
+
patchSizedQuantity: (qty: number) => void;
|
|
34
|
+
onManualQuantityChange(listener: () => void): () => void;
|
|
35
|
+
review: () => Promise<void>;
|
|
36
|
+
send: () => Promise<void>;
|
|
37
|
+
startNext: () => void;
|
|
38
|
+
close: () => void;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
};
|
|
41
|
+
export type TicketController = ReturnType<typeof createTicketController>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TradingDialogCustomField } from "../../contracts/broker.js";
|
|
2
|
+
export declare function CustomField(props: {
|
|
3
|
+
field: TradingDialogCustomField;
|
|
4
|
+
value: unknown;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
/** Modifying an existing order: checkboxes stay editable only with `supportModify`. */
|
|
7
|
+
modifying: boolean;
|
|
8
|
+
update(value: unknown): void;
|
|
9
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OrderDuration, OrderDurationMetaInfo } from "../../contracts/broker.js";
|
|
2
|
+
export declare function DurationInput(props: {
|
|
3
|
+
options: readonly OrderDurationMetaInfo[];
|
|
4
|
+
value?: OrderDuration;
|
|
5
|
+
timezone: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
now(): number;
|
|
8
|
+
update(value: OrderDuration): void;
|
|
9
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import type { InstrumentInfo, Side } from "../../contracts/broker.js";
|
|
3
|
+
import type { BracketInputUnit } from "../../core/bracket-input.js";
|
|
4
|
+
import type { TradingSession } from "../../core/session.js";
|
|
5
|
+
export declare function ExitInput(props: {
|
|
6
|
+
active: boolean;
|
|
7
|
+
session: TradingSession;
|
|
8
|
+
quantity: number;
|
|
9
|
+
symbol: string;
|
|
10
|
+
label: string;
|
|
11
|
+
value?: number;
|
|
12
|
+
entry?: number;
|
|
13
|
+
/** Price the exit must sit around; defaults to `entry`. Positions measure from the current price. */
|
|
14
|
+
directionReference?: {
|
|
15
|
+
readonly price: number | undefined;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
};
|
|
18
|
+
side: Side;
|
|
19
|
+
profit: boolean;
|
|
20
|
+
instrument: InstrumentInfo;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
toggleDisabled?: boolean;
|
|
23
|
+
allowDistance: boolean;
|
|
24
|
+
allowMoney: boolean;
|
|
25
|
+
inInstrumentCurrency: boolean;
|
|
26
|
+
/** Replaces the label text in the heading, e.g. a stop type menu; unit names then drop the label prefix. */
|
|
27
|
+
labelControl?: JSX.Element;
|
|
28
|
+
/** Unit shown first; trailing stops start in distance. */
|
|
29
|
+
defaultUnit?: BracketInputUnit;
|
|
30
|
+
/** False for fields stored as a distance, so converted prices keep fractional pips. */
|
|
31
|
+
snapPrices?: boolean;
|
|
32
|
+
price(value: number | undefined): string;
|
|
33
|
+
update(value: number | undefined): void;
|
|
34
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TradingQuoteSnapshot } from "../../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
import type { TicketController } from "./controller.js";
|
|
4
|
+
export declare function TicketFinancialControls(props: {
|
|
5
|
+
active: boolean;
|
|
6
|
+
session: TradingSession;
|
|
7
|
+
controller: TicketController;
|
|
8
|
+
locale?: string;
|
|
9
|
+
quote(): TradingQuoteSnapshot;
|
|
10
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TicketPlacement, TicketPlacementState } from "./placement.js";
|
|
2
|
+
export interface TicketLayoutControls {
|
|
3
|
+
readonly placement: TicketPlacement;
|
|
4
|
+
readonly canMove: () => boolean;
|
|
5
|
+
readonly state: () => Readonly<TicketPlacementState>;
|
|
6
|
+
}
|
|
7
|
+
export declare const TicketLayoutContext: import("solid-js").Context<TicketLayoutControls | undefined>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TradingQuoteSnapshot } from "../../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
import { type FrameScheduler } from "../../chart/frame-batch.js";
|
|
4
|
+
/** One ticket quote lease serves its side buttons, financial inputs and summary. */
|
|
5
|
+
export declare function useTicketMarket(session: TradingSession, symbol: () => string, active?: () => boolean,
|
|
6
|
+
/** Quote display updates wait for this frame; the latest quote of a burst is shown once. Immediate by default. */
|
|
7
|
+
frames?: FrameScheduler): {
|
|
8
|
+
quote: import("solid-js").Accessor<TradingQuoteSnapshot>;
|
|
9
|
+
ready: () => Readonly<import("../../contracts/broker.js").TradingQuotes> | undefined;
|
|
10
|
+
price: (value: number | undefined) => string;
|
|
11
|
+
spread: () => string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TradingSession } from "../../core/session.js";
|
|
2
|
+
/** Ticket display controls stay in the header menu; chart preferences have their own dialog. */
|
|
3
|
+
export declare function OrderTicketMenu(props: {
|
|
4
|
+
session: TradingSession;
|
|
5
|
+
previewAvailable: boolean;
|
|
6
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type QuantityInputMode } from "../../core/quantity-input.js";
|
|
2
|
+
import type { BracketInputUnit } from "../../core/bracket-input.js";
|
|
3
|
+
export declare function effectiveQuantityMode(mode: QuantityInputMode, riskAllowed: boolean, stop: number | undefined): QuantityInputMode;
|
|
4
|
+
export declare function effectiveExitMode(mode: BracketInputUnit, allowMoney: boolean): BracketInputUnit;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Order } from "../../contracts/broker.js";
|
|
2
|
+
import type { OrderEditability } from "../../core/order-modification.js";
|
|
3
|
+
/** Read-only identity of the order being modified; editable fields render separately. */
|
|
4
|
+
export declare function ModificationSummary(props: {
|
|
5
|
+
order: Readonly<Order>;
|
|
6
|
+
editability: OrderEditability;
|
|
7
|
+
typeName: string;
|
|
8
|
+
price: (value: number | undefined) => string;
|
|
9
|
+
}): import("solid-js").JSX.Element;
|
|
10
|
+
/** A protection child's allocated quantity; risk-based sizing belongs to the parent ticket. */
|
|
11
|
+
export declare function ChildQuantityField(props: {
|
|
12
|
+
qty: number;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
update: (qty: number | undefined) => void;
|
|
15
|
+
}): import("solid-js").JSX.Element;
|
|
16
|
+
/** A trailing child is edited by its distance; its price is broker-owned and shown read-only. */
|
|
17
|
+
export declare function TrailingDistanceField(props: {
|
|
18
|
+
distance?: number;
|
|
19
|
+
reportedPrice?: number;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
price: (value: number | undefined) => string;
|
|
22
|
+
update: (distance: number | undefined) => void;
|
|
23
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TradingEnvironment, TradingFloatingBounds, TradingPresentationPort } from "../../contracts/ports.js";
|
|
2
|
+
interface Preferences {
|
|
3
|
+
get(name: string): string | undefined;
|
|
4
|
+
set(name: string, value: string): void;
|
|
5
|
+
}
|
|
6
|
+
export interface TicketPlacementState {
|
|
7
|
+
readonly supported: boolean;
|
|
8
|
+
readonly canFloat: boolean;
|
|
9
|
+
readonly desiredFloating: boolean;
|
|
10
|
+
readonly floating: boolean;
|
|
11
|
+
readonly bounds: TradingFloatingBounds;
|
|
12
|
+
}
|
|
13
|
+
export declare function fitTicketBounds(bounds: TradingFloatingBounds, environment: Pick<TradingEnvironment, "width" | "height">): TradingFloatingBounds;
|
|
14
|
+
/** Requested geometry and completed user choices persist; viewport clamps and drag previews do not. */
|
|
15
|
+
export declare function createTicketPlacement(presentation: Pick<TradingPresentationPort, "environment" | "setTicketPlacement">, preferences: Preferences, report: (cause: unknown) => void): {
|
|
16
|
+
state: import("../../contracts/ports.js").ReadonlyValue<Readonly<TicketPlacementState>>;
|
|
17
|
+
toggle(): boolean;
|
|
18
|
+
previewPosition: (x: number, y: number) => boolean;
|
|
19
|
+
captureBounds(): TradingFloatingBounds;
|
|
20
|
+
previewBounds(bounds: TradingFloatingBounds): boolean;
|
|
21
|
+
restoreBounds(bounds: TradingFloatingBounds): boolean;
|
|
22
|
+
center(): void;
|
|
23
|
+
save: () => void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
};
|
|
26
|
+
export type TicketPlacement = ReturnType<typeof createTicketPlacement>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InstrumentInfo, Side, TradingQuotes } from "../../contracts/broker.js";
|
|
2
|
+
export declare function TicketPriceInput(props: {
|
|
3
|
+
relative: boolean;
|
|
4
|
+
toggleRelative(): void;
|
|
5
|
+
kind: "limit" | "stop";
|
|
6
|
+
label: string;
|
|
7
|
+
value?: number;
|
|
8
|
+
instrument: InstrumentInfo;
|
|
9
|
+
side: Side;
|
|
10
|
+
quotes?: Readonly<TradingQuotes>;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
price(value: number | undefined): string;
|
|
13
|
+
update(value: number | undefined): void;
|
|
14
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { InstrumentInfo, Side } from "../../contracts/broker.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
import type { QuantityInputMode } from "../../core/quantity-input.js";
|
|
4
|
+
export declare function TicketQuantityInput(props: {
|
|
5
|
+
active: boolean;
|
|
6
|
+
session: TradingSession;
|
|
7
|
+
symbol: string;
|
|
8
|
+
side: Side;
|
|
9
|
+
stop?: number;
|
|
10
|
+
suggestedStop?: number;
|
|
11
|
+
enableStop?(price: number): void;
|
|
12
|
+
riskAllowed: boolean;
|
|
13
|
+
multipleExits?: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
qty: number;
|
|
16
|
+
instrument: InstrumentInfo;
|
|
17
|
+
entry?: number;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
locale?: string;
|
|
20
|
+
update(value: number): void;
|
|
21
|
+
updateSizing(value: number): void;
|
|
22
|
+
onManualQuantityChange(listener: () => void): () => void;
|
|
23
|
+
mode: QuantityInputMode;
|
|
24
|
+
fallbackMode?: QuantityInputMode;
|
|
25
|
+
onModeChange(mode: QuantityInputMode): void;
|
|
26
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OrderPreviewResult, PreOrder } from "../../contracts/broker.js";
|
|
2
|
+
export declare function ReviewPanel(props: {
|
|
3
|
+
order: Readonly<PreOrder>;
|
|
4
|
+
displaySymbol: string;
|
|
5
|
+
preview?: OrderPreviewResult;
|
|
6
|
+
unavailable: boolean;
|
|
7
|
+
titleRef(element: HTMLHeadingElement): void;
|
|
8
|
+
edit(): void;
|
|
9
|
+
send(): Promise<void>;
|
|
10
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { orderTypeName } from "../../core/order-labels.js";
|
|
2
|
+
import type { InstrumentInfo, PreOrder } from "../../contracts/broker.js";
|
|
3
|
+
import { type CapabilityPolicy } from "../../core/capabilities.js";
|
|
4
|
+
import type { OrderEditability } from "../../core/order-modification.js";
|
|
5
|
+
import type { TicketState } from "./controller.js";
|
|
6
|
+
export type LockedField = "price" | "qty" | "type" | "duration" | "brackets";
|
|
7
|
+
export declare function locked(modifying: boolean, editability: OrderEditability | undefined, field: LockedField): boolean;
|
|
8
|
+
export declare function bracketsAllowed(policy: CapabilityPolicy, order: Readonly<PreOrder>, instrumentType?: string): boolean;
|
|
9
|
+
export declare function riskAllowed(policy: CapabilityPolicy, order: Readonly<PreOrder>, instrument: InstrumentInfo | undefined, orderInformation: boolean): boolean;
|
|
10
|
+
export declare function phaseText(phase: TicketState["phase"], modifying: boolean, checking?: boolean, accepted?: boolean): string;
|
|
11
|
+
/** `previewShown`: the broker previews this order (see `ticketShowsPreview`), not just the user preference. */
|
|
12
|
+
export declare function submitAction(previewShown: boolean, confirmationRequired: boolean, modifying: boolean): string;
|
|
13
|
+
export declare function priceSuffix(order: Readonly<PreOrder>, format: (value: number) => string): string;
|
|
14
|
+
export declare const typeName: typeof orderTypeName;
|
|
15
|
+
/** Ticket phases where the user can still change the draft (on the ticket or its chart lines). */
|
|
16
|
+
export declare function ticketEditable(phase: string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from "solid-js";
|
|
2
|
+
import { StopType } from "../../contracts/broker.js";
|
|
3
|
+
import type { Brackets } from "../../contracts/broker.js";
|
|
4
|
+
import type { CapabilityPolicy } from "../../core/capabilities.js";
|
|
5
|
+
import { ExitInput } from "./exit-input.js";
|
|
6
|
+
type PriceInputProps = Omit<ComponentProps<typeof ExitInput>, "value" | "label" | "profit" | "update">;
|
|
7
|
+
/** Stop styles are exclusive broker fields. Quotes never advance the reported trailing price. */
|
|
8
|
+
export declare function StopProtectionInput(props: PriceInputProps & {
|
|
9
|
+
order: Readonly<Brackets>;
|
|
10
|
+
policy: CapabilityPolicy;
|
|
11
|
+
modifying: boolean;
|
|
12
|
+
reportedTrailingPrice?: number;
|
|
13
|
+
updateProtection(value: Brackets & {
|
|
14
|
+
stopType: StopType;
|
|
15
|
+
}): void;
|
|
16
|
+
}): import("solid-js").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Side } from "../../contracts/broker.js";
|
|
2
|
+
export declare function SubmitBar(props: {
|
|
3
|
+
modifying: boolean;
|
|
4
|
+
hidden: boolean;
|
|
5
|
+
busy: boolean;
|
|
6
|
+
unavailable: boolean;
|
|
7
|
+
untradable: boolean;
|
|
8
|
+
hasBrokerOrder: boolean;
|
|
9
|
+
side: Side;
|
|
10
|
+
action: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
discard(): void;
|
|
13
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { TradingClock, TradingPresentationPort, TradingSymbolSearchResult } from "../../contracts/ports.js";
|
|
2
|
+
import { ValueStore } from "../../core/value-store.js";
|
|
3
|
+
/** The paged result window the view renders (a `PagedListWindow` in the mounted UI). */
|
|
4
|
+
export interface SymbolResultWindow {
|
|
5
|
+
readonly count: number;
|
|
6
|
+
at(index: number): TradingSymbolSearchResult | undefined;
|
|
7
|
+
reset(items: readonly TradingSymbolSearchResult[]): void;
|
|
8
|
+
append(items: readonly TradingSymbolSearchResult[], sourceStart: number): void;
|
|
9
|
+
ensure(indices: readonly number[]): Promise<void>;
|
|
10
|
+
cancel(): void;
|
|
11
|
+
}
|
|
12
|
+
export interface SymbolSearchState {
|
|
13
|
+
readonly query: string;
|
|
14
|
+
readonly loading: boolean;
|
|
15
|
+
readonly failed: boolean;
|
|
16
|
+
readonly more: boolean;
|
|
17
|
+
readonly selected: number;
|
|
18
|
+
/** Arrow keys moved the selection, so the list follows it. */
|
|
19
|
+
readonly keyboard: boolean;
|
|
20
|
+
/** Bumped whenever rows change. */
|
|
21
|
+
readonly rows: number;
|
|
22
|
+
}
|
|
23
|
+
export interface SymbolSearchOptions {
|
|
24
|
+
readonly clock: TradingClock;
|
|
25
|
+
search(query: string): Promise<readonly TradingSymbolSearchResult[]>;
|
|
26
|
+
readonly searchPage?: TradingPresentationPort["searchSymbolsPage"];
|
|
27
|
+
choose(symbol: string): void;
|
|
28
|
+
createWindow(load: (start: number) => Promise<readonly TradingSymbolSearchResult[]>, changed: () => void): SymbolResultWindow;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Ticket symbol search without the view: debounced requests where only the newest may publish, pagination with
|
|
32
|
+
* a catalog revision that restarts the search when the host's catalog changes, retry of a failed page range,
|
|
33
|
+
* and keyboard selection.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createSymbolSearchController(options: SymbolSearchOptions): {
|
|
36
|
+
state: ValueStore<SymbolSearchState>;
|
|
37
|
+
results: SymbolResultWindow;
|
|
38
|
+
/** Text changed: stale results are dropped at once and the search runs after a short pause. */
|
|
39
|
+
input(value: string): void;
|
|
40
|
+
/** Moves the keyboard selection; returns false when there is nothing to move through. */
|
|
41
|
+
move(direction: 1 | -1): boolean;
|
|
42
|
+
/** Enter: choose the selected result, or search now and choose the first. */
|
|
43
|
+
submit(): Promise<void>;
|
|
44
|
+
retry(): void;
|
|
45
|
+
choose: (symbol: string) => void;
|
|
46
|
+
loadMore: () => void;
|
|
47
|
+
ensureRange: (indices: readonly number[]) => Promise<void>;
|
|
48
|
+
destroy(): void;
|
|
49
|
+
};
|
|
50
|
+
export type SymbolSearchController = ReturnType<typeof createSymbolSearchController>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TradingClock, TradingPresentationPort, TradingSymbolSearchResult } from "../../contracts/ports.js";
|
|
2
|
+
/**
|
|
3
|
+
* `supportSymbolSearch`: find another symbol for this ticket through the host's datafeed search.
|
|
4
|
+
* Results are a list of buttons; choosing one reopens the ticket for that symbol.
|
|
5
|
+
*/
|
|
6
|
+
export declare function TicketSymbolSearch(props: {
|
|
7
|
+
clock: TradingClock;
|
|
8
|
+
search(query: string): Promise<readonly TradingSymbolSearchResult[]>;
|
|
9
|
+
searchPage?: TradingPresentationPort["searchSymbolsPage"];
|
|
10
|
+
choose(symbol: string): void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TradingSymbolSearchResult } from "../../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
import type { TicketController } from "./controller.js";
|
|
4
|
+
export declare function OrderTicketView(props: {
|
|
5
|
+
active?: boolean;
|
|
6
|
+
session: TradingSession;
|
|
7
|
+
controller: TicketController;
|
|
8
|
+
locale?: string;
|
|
9
|
+
timezone?: string;
|
|
10
|
+
/** Show another symbol on the ticket's chart (a broker "change symbol" solution). */
|
|
11
|
+
requestSymbol?: (symbol: string) => void;
|
|
12
|
+
/** `supportSymbolSearch`: datafeed search and reopening this ticket for the chosen symbol. */
|
|
13
|
+
searchSymbolsPage?: import("../../contracts/ports.js").TradingPresentationPort["searchSymbolsPage"];
|
|
14
|
+
searchSymbols?: (query: string) => Promise<readonly TradingSymbolSearchResult[]>;
|
|
15
|
+
changeSymbol?: (symbol: string) => void;
|
|
16
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TradingChartBinding, TradingCollectionPort } from "../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../core/session.js";
|
|
3
|
+
import type { TicketController } from "./order-ticket/controller.js";
|
|
4
|
+
import type { createDomWorkspace } from "./dom/workspace.js";
|
|
5
|
+
/** Broker panel requests settle back to the mounted state if the surface cannot open. */
|
|
6
|
+
export declare function bindPanelVisibility(session: TradingSession, collection: TradingCollectionPort, ticket: TicketController, dom: Pick<ReturnType<typeof createDomWorkspace>, "isVisible" | "hide" | "open">, open: (binding: TradingChartBinding) => Promise<void>, isDisposed: () => boolean): () => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface PointerDelta {
|
|
2
|
+
readonly x: number;
|
|
3
|
+
readonly y: number;
|
|
4
|
+
}
|
|
5
|
+
interface PointerDragOptions<T> {
|
|
6
|
+
disabled(): boolean;
|
|
7
|
+
capture(): T;
|
|
8
|
+
preview(origin: T, delta: PointerDelta): void | boolean;
|
|
9
|
+
commit(origin: T): void;
|
|
10
|
+
cancel(origin: T): void;
|
|
11
|
+
activeChanged?(active: boolean): void;
|
|
12
|
+
}
|
|
13
|
+
/** One scoped pointer owner covers release, cancellation, missed release and removal without layout reads. */
|
|
14
|
+
export declare function createPointerDrag<T>(options: PointerDragOptions<T>): {
|
|
15
|
+
active: () => boolean;
|
|
16
|
+
begin(event: PointerEvent, element: HTMLElement): boolean;
|
|
17
|
+
cancel: () => void;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Popups escape dock clipping through a presentation-owned surface, isolated per mounted UI. */
|
|
2
|
+
export declare const TradingPopupMount: import("solid-js").Context<HTMLElement | undefined>;
|
|
3
|
+
/** Inside a modal dialog, popups must render within the dialog or the modal blocks their pointer events. */
|
|
4
|
+
export declare const TradingDialogPopupMount: import("solid-js").Context<(() => HTMLElement | undefined) | undefined>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IWatchedValueReadonly } from "../contracts/broker.js";
|
|
2
|
+
import type { EntityReader } from "../core/entity-store.js";
|
|
3
|
+
import type { TradingSession } from "../core/session.js";
|
|
4
|
+
import { type JSX } from "solid-js";
|
|
5
|
+
import type { ReadonlyValue } from "../contracts/ports.js";
|
|
6
|
+
export declare function useTradingValue<T>(reader: ReadonlyValue<T>, beforeChange?: (previous: T, next: T) => void): () => T;
|
|
7
|
+
/** Bridge broker watched values into Solid; release only this consumer's listener. */
|
|
8
|
+
export declare function useWatchedValue<T>(reader: IWatchedValueReadonly<T>): () => T;
|
|
9
|
+
/** Track only the selected entity's changes, not the full collection. */
|
|
10
|
+
/** The selected account's metadata, following account changes. */
|
|
11
|
+
export declare function useCurrentAccount(session: TradingSession): import("solid-js").Accessor<import("../contracts/broker.js").AccountMetainfo | undefined>;
|
|
12
|
+
/** The selected account's currency; the one lookup every money display uses. */
|
|
13
|
+
export declare function useAccountCurrency(session: TradingSession): import("solid-js").Accessor<string | undefined>;
|
|
14
|
+
export declare function useTradingEntity<T extends {
|
|
15
|
+
id: string;
|
|
16
|
+
}>(reader: EntityReader<T>, key: () => string): import("solid-js").Accessor<Readonly<T> | undefined>;
|
|
17
|
+
export declare function TradingButton(props: JSX.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
18
|
+
tone?: "buy" | "sell" | "primary";
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
export declare function NumberField(props: {
|
|
21
|
+
label: string;
|
|
22
|
+
value?: number;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
step?: number;
|
|
25
|
+
min?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
onChange(value: number | undefined): void;
|
|
28
|
+
help?: string;
|
|
29
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StopType } from "../../contracts/broker.js";
|
|
2
|
+
import type { Brackets, ExitLevel } from "../../contracts/broker.js";
|
|
3
|
+
import type { ProtectionFieldsProps } from "./fields.js";
|
|
4
|
+
type Fields = Omit<ProtectionFieldsProps, "brackets" | "quantity" | "paired" | "update">;
|
|
5
|
+
export type ProtectionEditorProps = Fields & {
|
|
6
|
+
brackets: Readonly<Brackets>;
|
|
7
|
+
quantity: number;
|
|
8
|
+
target: "order" | "position";
|
|
9
|
+
maximum?: number;
|
|
10
|
+
update(value: Brackets & {
|
|
11
|
+
stopType?: StopType;
|
|
12
|
+
}): void;
|
|
13
|
+
/** Summary mode opens a staged ticket workspace instead of changing the parent draft. */
|
|
14
|
+
editLevels?(levels: ExitLevel[]): void;
|
|
15
|
+
workspace?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function ProtectionEditor(props: ProtectionEditorProps): import("solid-js").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Brackets, InstrumentInfo, Side, StopType } from "../../contracts/broker.js";
|
|
2
|
+
import type { CapabilityPolicy } from "../../core/capabilities.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
export interface ProtectionFieldsProps {
|
|
5
|
+
active: boolean;
|
|
6
|
+
session: TradingSession;
|
|
7
|
+
policy: CapabilityPolicy;
|
|
8
|
+
symbol: string;
|
|
9
|
+
side: Side;
|
|
10
|
+
quantity: number;
|
|
11
|
+
brackets: Readonly<Brackets>;
|
|
12
|
+
instrument: InstrumentInfo;
|
|
13
|
+
entry?: number;
|
|
14
|
+
/** Price TP/SL must sit around when it is not the entry (positions use the current price). */
|
|
15
|
+
directionReference?: {
|
|
16
|
+
readonly price: number | undefined;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
};
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
modifying: boolean;
|
|
21
|
+
stopMoneyAllowed: boolean;
|
|
22
|
+
paired?: boolean;
|
|
23
|
+
reportedTrailingPrice?: number;
|
|
24
|
+
price(value: number | undefined): string;
|
|
25
|
+
update(value: Brackets & {
|
|
26
|
+
stopType?: StopType;
|
|
27
|
+
}): void;
|
|
28
|
+
}
|
|
29
|
+
/** Ticket and position editors share canonical price, currency and stop-style controls. */
|
|
30
|
+
export declare function ProtectionFields(props: ProtectionFieldsProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExitLevel } from "../../contracts/broker.js";
|
|
2
|
+
import { type ProtectionFieldsProps } from "./fields.js";
|
|
3
|
+
type Fields = Omit<ProtectionFieldsProps, "quantity" | "brackets" | "update">;
|
|
4
|
+
export declare function ExitLevelEditor(props: Fields & {
|
|
5
|
+
level: Readonly<ExitLevel>;
|
|
6
|
+
index: number;
|
|
7
|
+
parentQuantity: number;
|
|
8
|
+
workspace: boolean;
|
|
9
|
+
expanded: boolean;
|
|
10
|
+
toggle(): void;
|
|
11
|
+
remove(): void;
|
|
12
|
+
update(value: Partial<ExitLevel>): void;
|
|
13
|
+
}): import("solid-js").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ProtectionEditorProps } from "./editor.js";
|
|
2
|
+
/** Exit allocation is a separate transaction: only Confirm changes the order draft. */
|
|
3
|
+
export declare function TicketProtectionWorkspace(props: ProtectionEditorProps & {
|
|
4
|
+
onEditingChange(editing: boolean): void;
|
|
5
|
+
closeTicket?(): void;
|
|
6
|
+
orderDescription?: string;
|
|
7
|
+
}): import("solid-js").JSX.Element;
|