@gbozee/ultimate 0.0.2-next.80 → 0.0.2-next.81
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.cjs +7 -3
- package/dist/index.js +7 -3
- package/dist/mcp-server.cjs +7 -3
- package/dist/mcp-server.js +7 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -78367,7 +78367,7 @@ async function cancelOrders3(payload) {
|
|
|
78367
78367
|
});
|
|
78368
78368
|
}
|
|
78369
78369
|
async function createLimitPurchaseOrders2(client, payload) {
|
|
78370
|
-
const { positions, symbol_config, current_price, raw_data } = await fetchDBExchangeData(client, payload.symbol);
|
|
78370
|
+
const { positions, symbol_config, current_price, raw_data, stop_losses_by_kind } = await fetchDBExchangeData(client, payload.symbol);
|
|
78371
78371
|
const kind = payload.orders[0].kind || payload.kind;
|
|
78372
78372
|
const params = {
|
|
78373
78373
|
position: {
|
|
@@ -78387,6 +78387,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
78387
78387
|
quantity: state.position.quantity
|
|
78388
78388
|
};
|
|
78389
78389
|
const remaining_orders = state.newTrades;
|
|
78390
|
+
const existingStops = stop_losses_by_kind[kind];
|
|
78391
|
+
const stopPayload = existingStops && existingStops.length > 0 ? { stop_losses: existingStops } : {};
|
|
78390
78392
|
console.log({
|
|
78391
78393
|
length: remaining_orders.length,
|
|
78392
78394
|
position: current_position_state,
|
|
@@ -78397,7 +78399,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
78397
78399
|
symbol: payload.symbol
|
|
78398
78400
|
}, raw_data, {
|
|
78399
78401
|
position: current_position_state,
|
|
78400
|
-
orders: remaining_orders
|
|
78402
|
+
orders: remaining_orders,
|
|
78403
|
+
...stopPayload
|
|
78401
78404
|
});
|
|
78402
78405
|
return await savePaperDetails(client, {
|
|
78403
78406
|
kind,
|
|
@@ -78406,7 +78409,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
78406
78409
|
decimal_places: payload.decimal_places
|
|
78407
78410
|
}, {
|
|
78408
78411
|
position: current_position_state,
|
|
78409
|
-
orders: remaining_orders
|
|
78412
|
+
orders: remaining_orders,
|
|
78413
|
+
...stopPayload
|
|
78410
78414
|
});
|
|
78411
78415
|
}
|
|
78412
78416
|
|
package/dist/index.js
CHANGED
|
@@ -78265,7 +78265,7 @@ async function cancelOrders3(payload) {
|
|
|
78265
78265
|
});
|
|
78266
78266
|
}
|
|
78267
78267
|
async function createLimitPurchaseOrders2(client, payload) {
|
|
78268
|
-
const { positions, symbol_config, current_price, raw_data } = await fetchDBExchangeData(client, payload.symbol);
|
|
78268
|
+
const { positions, symbol_config, current_price, raw_data, stop_losses_by_kind } = await fetchDBExchangeData(client, payload.symbol);
|
|
78269
78269
|
const kind = payload.orders[0].kind || payload.kind;
|
|
78270
78270
|
const params = {
|
|
78271
78271
|
position: {
|
|
@@ -78285,6 +78285,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
78285
78285
|
quantity: state.position.quantity
|
|
78286
78286
|
};
|
|
78287
78287
|
const remaining_orders = state.newTrades;
|
|
78288
|
+
const existingStops = stop_losses_by_kind[kind];
|
|
78289
|
+
const stopPayload = existingStops && existingStops.length > 0 ? { stop_losses: existingStops } : {};
|
|
78288
78290
|
console.log({
|
|
78289
78291
|
length: remaining_orders.length,
|
|
78290
78292
|
position: current_position_state,
|
|
@@ -78295,7 +78297,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
78295
78297
|
symbol: payload.symbol
|
|
78296
78298
|
}, raw_data, {
|
|
78297
78299
|
position: current_position_state,
|
|
78298
|
-
orders: remaining_orders
|
|
78300
|
+
orders: remaining_orders,
|
|
78301
|
+
...stopPayload
|
|
78299
78302
|
});
|
|
78300
78303
|
return await savePaperDetails(client, {
|
|
78301
78304
|
kind,
|
|
@@ -78304,7 +78307,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
78304
78307
|
decimal_places: payload.decimal_places
|
|
78305
78308
|
}, {
|
|
78306
78309
|
position: current_position_state,
|
|
78307
|
-
orders: remaining_orders
|
|
78310
|
+
orders: remaining_orders,
|
|
78311
|
+
...stopPayload
|
|
78308
78312
|
});
|
|
78309
78313
|
}
|
|
78310
78314
|
|
package/dist/mcp-server.cjs
CHANGED
|
@@ -82087,7 +82087,7 @@ async function cancelOrders3(payload) {
|
|
|
82087
82087
|
});
|
|
82088
82088
|
}
|
|
82089
82089
|
async function createLimitPurchaseOrders2(client, payload) {
|
|
82090
|
-
const { positions, symbol_config, current_price, raw_data } = await fetchDBExchangeData(client, payload.symbol);
|
|
82090
|
+
const { positions, symbol_config, current_price, raw_data, stop_losses_by_kind } = await fetchDBExchangeData(client, payload.symbol);
|
|
82091
82091
|
const kind = payload.orders[0].kind || payload.kind;
|
|
82092
82092
|
const params = {
|
|
82093
82093
|
position: {
|
|
@@ -82107,6 +82107,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
82107
82107
|
quantity: state.position.quantity
|
|
82108
82108
|
};
|
|
82109
82109
|
const remaining_orders = state.newTrades;
|
|
82110
|
+
const existingStops = stop_losses_by_kind[kind];
|
|
82111
|
+
const stopPayload = existingStops && existingStops.length > 0 ? { stop_losses: existingStops } : {};
|
|
82110
82112
|
console.log({
|
|
82111
82113
|
length: remaining_orders.length,
|
|
82112
82114
|
position: current_position_state,
|
|
@@ -82117,7 +82119,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
82117
82119
|
symbol: payload.symbol
|
|
82118
82120
|
}, raw_data, {
|
|
82119
82121
|
position: current_position_state,
|
|
82120
|
-
orders: remaining_orders
|
|
82122
|
+
orders: remaining_orders,
|
|
82123
|
+
...stopPayload
|
|
82121
82124
|
});
|
|
82122
82125
|
return await savePaperDetails(client, {
|
|
82123
82126
|
kind,
|
|
@@ -82126,7 +82129,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
82126
82129
|
decimal_places: payload.decimal_places
|
|
82127
82130
|
}, {
|
|
82128
82131
|
position: current_position_state,
|
|
82129
|
-
orders: remaining_orders
|
|
82132
|
+
orders: remaining_orders,
|
|
82133
|
+
...stopPayload
|
|
82130
82134
|
});
|
|
82131
82135
|
}
|
|
82132
82136
|
|
package/dist/mcp-server.js
CHANGED
|
@@ -82046,7 +82046,7 @@ async function cancelOrders3(payload) {
|
|
|
82046
82046
|
});
|
|
82047
82047
|
}
|
|
82048
82048
|
async function createLimitPurchaseOrders2(client, payload) {
|
|
82049
|
-
const { positions, symbol_config, current_price, raw_data } = await fetchDBExchangeData(client, payload.symbol);
|
|
82049
|
+
const { positions, symbol_config, current_price, raw_data, stop_losses_by_kind } = await fetchDBExchangeData(client, payload.symbol);
|
|
82050
82050
|
const kind = payload.orders[0].kind || payload.kind;
|
|
82051
82051
|
const params = {
|
|
82052
82052
|
position: {
|
|
@@ -82066,6 +82066,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
82066
82066
|
quantity: state.position.quantity
|
|
82067
82067
|
};
|
|
82068
82068
|
const remaining_orders = state.newTrades;
|
|
82069
|
+
const existingStops = stop_losses_by_kind[kind];
|
|
82070
|
+
const stopPayload = existingStops && existingStops.length > 0 ? { stop_losses: existingStops } : {};
|
|
82069
82071
|
console.log({
|
|
82070
82072
|
length: remaining_orders.length,
|
|
82071
82073
|
position: current_position_state,
|
|
@@ -82076,7 +82078,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
82076
82078
|
symbol: payload.symbol
|
|
82077
82079
|
}, raw_data, {
|
|
82078
82080
|
position: current_position_state,
|
|
82079
|
-
orders: remaining_orders
|
|
82081
|
+
orders: remaining_orders,
|
|
82082
|
+
...stopPayload
|
|
82080
82083
|
});
|
|
82081
82084
|
return await savePaperDetails(client, {
|
|
82082
82085
|
kind,
|
|
@@ -82085,7 +82088,8 @@ async function createLimitPurchaseOrders2(client, payload) {
|
|
|
82085
82088
|
decimal_places: payload.decimal_places
|
|
82086
82089
|
}, {
|
|
82087
82090
|
position: current_position_state,
|
|
82088
|
-
orders: remaining_orders
|
|
82091
|
+
orders: remaining_orders,
|
|
82092
|
+
...stopPayload
|
|
82089
82093
|
});
|
|
82090
82094
|
}
|
|
82091
82095
|
|