@tradejs/cli 3.1.29-beta.288 → 3.1.29-beta.289
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/cli.js +11 -3
- package/dist/scripts/replay.js +11 -3
- package/dist/scripts/replayRunner.js +11 -3
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -16439,7 +16439,10 @@ var init_portfolioReplayConnector = __esm({
|
|
|
16439
16439
|
return {
|
|
16440
16440
|
__tradejsReplayConnector: true,
|
|
16441
16441
|
__tradejsTestConnector: true,
|
|
16442
|
-
capabilities:
|
|
16442
|
+
capabilities: {
|
|
16443
|
+
...connector.capabilities,
|
|
16444
|
+
orderSubmissionValidation: true
|
|
16445
|
+
},
|
|
16443
16446
|
universe: connector.universe,
|
|
16444
16447
|
accountId: connector.accountId,
|
|
16445
16448
|
deploymentId: connector.deploymentId,
|
|
@@ -16471,6 +16474,7 @@ var init_portfolioReplayConnector = __esm({
|
|
|
16471
16474
|
})
|
|
16472
16475
|
),
|
|
16473
16476
|
placeOrder: async (order) => {
|
|
16477
|
+
const { beforeSubmit, ...submittedOrder } = order;
|
|
16474
16478
|
if (positionsBySymbol.has(order.symbol)) {
|
|
16475
16479
|
return false;
|
|
16476
16480
|
}
|
|
@@ -16487,8 +16491,12 @@ var init_portfolioReplayConnector = __esm({
|
|
|
16487
16491
|
stage: "entry",
|
|
16488
16492
|
signal: order.signal
|
|
16489
16493
|
});
|
|
16494
|
+
await beforeSubmit?.({
|
|
16495
|
+
qty: order.qty,
|
|
16496
|
+
executionPrice: entryPrice
|
|
16497
|
+
});
|
|
16490
16498
|
const nextPosition = {
|
|
16491
|
-
...
|
|
16499
|
+
...submittedOrder,
|
|
16492
16500
|
timestamp: executionTimestamp ?? order.timestamp,
|
|
16493
16501
|
price: entryPrice,
|
|
16494
16502
|
signal: compactReplaySignal(order.signal),
|
|
@@ -16513,7 +16521,7 @@ var init_portfolioReplayConnector = __esm({
|
|
|
16513
16521
|
logOrder({
|
|
16514
16522
|
positionState,
|
|
16515
16523
|
data: {
|
|
16516
|
-
...
|
|
16524
|
+
...submittedOrder,
|
|
16517
16525
|
timestamp: executionTimestamp ?? order.timestamp,
|
|
16518
16526
|
price: entryPrice,
|
|
16519
16527
|
profit,
|
package/dist/scripts/replay.js
CHANGED
|
@@ -5386,7 +5386,10 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5386
5386
|
return {
|
|
5387
5387
|
__tradejsReplayConnector: true,
|
|
5388
5388
|
__tradejsTestConnector: true,
|
|
5389
|
-
capabilities:
|
|
5389
|
+
capabilities: {
|
|
5390
|
+
...connector.capabilities,
|
|
5391
|
+
orderSubmissionValidation: true
|
|
5392
|
+
},
|
|
5390
5393
|
universe: connector.universe,
|
|
5391
5394
|
accountId: connector.accountId,
|
|
5392
5395
|
deploymentId: connector.deploymentId,
|
|
@@ -5418,6 +5421,7 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5418
5421
|
})
|
|
5419
5422
|
),
|
|
5420
5423
|
placeOrder: async (order) => {
|
|
5424
|
+
const { beforeSubmit, ...submittedOrder } = order;
|
|
5421
5425
|
if (positionsBySymbol.has(order.symbol)) {
|
|
5422
5426
|
return false;
|
|
5423
5427
|
}
|
|
@@ -5434,8 +5438,12 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5434
5438
|
stage: "entry",
|
|
5435
5439
|
signal: order.signal
|
|
5436
5440
|
});
|
|
5441
|
+
await beforeSubmit?.({
|
|
5442
|
+
qty: order.qty,
|
|
5443
|
+
executionPrice: entryPrice
|
|
5444
|
+
});
|
|
5437
5445
|
const nextPosition = {
|
|
5438
|
-
...
|
|
5446
|
+
...submittedOrder,
|
|
5439
5447
|
timestamp: executionTimestamp ?? order.timestamp,
|
|
5440
5448
|
price: entryPrice,
|
|
5441
5449
|
signal: compactReplaySignal(order.signal),
|
|
@@ -5460,7 +5468,7 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5460
5468
|
logOrder({
|
|
5461
5469
|
positionState,
|
|
5462
5470
|
data: {
|
|
5463
|
-
...
|
|
5471
|
+
...submittedOrder,
|
|
5464
5472
|
timestamp: executionTimestamp ?? order.timestamp,
|
|
5465
5473
|
price: entryPrice,
|
|
5466
5474
|
profit,
|
|
@@ -5391,7 +5391,10 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5391
5391
|
return {
|
|
5392
5392
|
__tradejsReplayConnector: true,
|
|
5393
5393
|
__tradejsTestConnector: true,
|
|
5394
|
-
capabilities:
|
|
5394
|
+
capabilities: {
|
|
5395
|
+
...connector.capabilities,
|
|
5396
|
+
orderSubmissionValidation: true
|
|
5397
|
+
},
|
|
5395
5398
|
universe: connector.universe,
|
|
5396
5399
|
accountId: connector.accountId,
|
|
5397
5400
|
deploymentId: connector.deploymentId,
|
|
@@ -5423,6 +5426,7 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5423
5426
|
})
|
|
5424
5427
|
),
|
|
5425
5428
|
placeOrder: async (order) => {
|
|
5429
|
+
const { beforeSubmit, ...submittedOrder } = order;
|
|
5426
5430
|
if (positionsBySymbol.has(order.symbol)) {
|
|
5427
5431
|
return false;
|
|
5428
5432
|
}
|
|
@@ -5439,8 +5443,12 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5439
5443
|
stage: "entry",
|
|
5440
5444
|
signal: order.signal
|
|
5441
5445
|
});
|
|
5446
|
+
await beforeSubmit?.({
|
|
5447
|
+
qty: order.qty,
|
|
5448
|
+
executionPrice: entryPrice
|
|
5449
|
+
});
|
|
5442
5450
|
const nextPosition = {
|
|
5443
|
-
...
|
|
5451
|
+
...submittedOrder,
|
|
5444
5452
|
timestamp: executionTimestamp ?? order.timestamp,
|
|
5445
5453
|
price: entryPrice,
|
|
5446
5454
|
signal: compactReplaySignal(order.signal),
|
|
@@ -5465,7 +5473,7 @@ var createPortfolioReplayConnector = (connector) => {
|
|
|
5465
5473
|
logOrder({
|
|
5466
5474
|
positionState,
|
|
5467
5475
|
data: {
|
|
5468
|
-
...
|
|
5476
|
+
...submittedOrder,
|
|
5469
5477
|
timestamp: executionTimestamp ?? order.timestamp,
|
|
5470
5478
|
price: entryPrice,
|
|
5471
5479
|
profit,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradejs/cli",
|
|
3
|
-
"version": "3.1.29-beta.
|
|
3
|
+
"version": "3.1.29-beta.289",
|
|
4
4
|
"description": "Official CLI for the TradeJS TypeScript framework: infra setup, backtests, signals, bots, and ML workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tradejs",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"tradejs": "dist/cli.js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@tradejs/connectors": "^3.1.29-beta.
|
|
41
|
-
"@tradejs/core": "^3.1.29-beta.
|
|
42
|
-
"@tradejs/indicators": "^3.1.29-beta.
|
|
43
|
-
"@tradejs/infra": "^3.1.29-beta.
|
|
44
|
-
"@tradejs/node": "^3.1.29-beta.
|
|
40
|
+
"@tradejs/connectors": "^3.1.29-beta.289",
|
|
41
|
+
"@tradejs/core": "^3.1.29-beta.289",
|
|
42
|
+
"@tradejs/indicators": "^3.1.29-beta.289",
|
|
43
|
+
"@tradejs/infra": "^3.1.29-beta.289",
|
|
44
|
+
"@tradejs/node": "^3.1.29-beta.289",
|
|
45
45
|
"@tradejs/strategy-kit": "3.0.6",
|
|
46
|
-
"@tradejs/types": "^3.1.29-beta.
|
|
46
|
+
"@tradejs/types": "^3.1.29-beta.289",
|
|
47
47
|
"args": "^5.0.3",
|
|
48
48
|
"bcryptjs": "^2.4.3",
|
|
49
49
|
"chalk": "4.1.2",
|