@tradejs/types 3.1.29-beta.288 → 3.1.29-beta.290

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/dist/index.d.mts CHANGED
@@ -624,6 +624,8 @@ interface InstrumentDescriptor {
624
624
  venueMetadata?: Record<string, unknown>;
625
625
  }
626
626
  interface ConnectorCapabilities {
627
+ /** placeOrder awaits Order.beforeSubmit before any order side effect. */
628
+ orderSubmissionValidation?: boolean;
627
629
  supportedUniverses: readonly MarketUniverse[];
628
630
  defaultUniverse: MarketUniverse;
629
631
  }
@@ -1054,6 +1056,12 @@ type Order = {
1054
1056
  leverage?: number;
1055
1057
  orderId?: string;
1056
1058
  signal?: Signal;
1059
+ /** Await after preparation/quantity normalization, immediately before submission. */
1060
+ beforeSubmit?: (context: {
1061
+ qty: number;
1062
+ /** Simulation connectors may supply their actual modeled execution price. */
1063
+ executionPrice?: number;
1064
+ }) => Promise<void>;
1057
1065
  };
1058
1066
  type Position = {
1059
1067
  symbol: string;
@@ -1462,12 +1470,13 @@ interface RuntimeAllocatorDecision {
1462
1470
  }
1463
1471
  interface RuntimeRiskDecision {
1464
1472
  stage: 'order_plan';
1465
- status: 'approved' | 'rejected' | 'unavailable';
1473
+ status: 'approved' | 'rejected' | 'warning' | 'unavailable';
1466
1474
  reason: string;
1467
1475
  plannedLossValue: number | null;
1468
1476
  maxLossValue: number | null;
1469
1477
  limitUtilization: number | null;
1470
- enforced: false;
1478
+ /** True after the final submission check has enforced the configured budget. */
1479
+ enforced: boolean;
1471
1480
  }
1472
1481
  interface SignalAnalysis {
1473
1482
  direction: Direction | null;
package/dist/index.d.ts CHANGED
@@ -624,6 +624,8 @@ interface InstrumentDescriptor {
624
624
  venueMetadata?: Record<string, unknown>;
625
625
  }
626
626
  interface ConnectorCapabilities {
627
+ /** placeOrder awaits Order.beforeSubmit before any order side effect. */
628
+ orderSubmissionValidation?: boolean;
627
629
  supportedUniverses: readonly MarketUniverse[];
628
630
  defaultUniverse: MarketUniverse;
629
631
  }
@@ -1054,6 +1056,12 @@ type Order = {
1054
1056
  leverage?: number;
1055
1057
  orderId?: string;
1056
1058
  signal?: Signal;
1059
+ /** Await after preparation/quantity normalization, immediately before submission. */
1060
+ beforeSubmit?: (context: {
1061
+ qty: number;
1062
+ /** Simulation connectors may supply their actual modeled execution price. */
1063
+ executionPrice?: number;
1064
+ }) => Promise<void>;
1057
1065
  };
1058
1066
  type Position = {
1059
1067
  symbol: string;
@@ -1462,12 +1470,13 @@ interface RuntimeAllocatorDecision {
1462
1470
  }
1463
1471
  interface RuntimeRiskDecision {
1464
1472
  stage: 'order_plan';
1465
- status: 'approved' | 'rejected' | 'unavailable';
1473
+ status: 'approved' | 'rejected' | 'warning' | 'unavailable';
1466
1474
  reason: string;
1467
1475
  plannedLossValue: number | null;
1468
1476
  maxLossValue: number | null;
1469
1477
  limitUtilization: number | null;
1470
- enforced: false;
1478
+ /** True after the final submission check has enforced the configured budget. */
1479
+ enforced: boolean;
1471
1480
  }
1472
1481
  interface SignalAnalysis {
1473
1482
  direction: Direction | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/types",
3
- "version": "3.1.29-beta.288",
3
+ "version": "3.1.29-beta.290",
4
4
  "description": "MIT-licensed shared TypeScript contracts for the TradeJS framework.",
5
5
  "keywords": [
6
6
  "tradejs",