hedgequantx 2.9.135 → 2.9.136

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.9.135",
3
+ "version": "2.9.136",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -191,8 +191,9 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
191
191
  try {
192
192
  const orderSide = direction === 'long' ? 0 : 1;
193
193
  const orderResult = await service.placeOrder({
194
- accountId: account.accountId,
195
- contractId: contractId,
194
+ accountId: account.rithmicAccountId || account.accountId,
195
+ symbol: symbolCode,
196
+ exchange: contract.exchange || 'CME',
196
197
  type: 2,
197
198
  side: orderSide,
198
199
  size: orderSize
@@ -209,12 +210,16 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
209
210
  // Bracket orders
210
211
  if (stopLoss && takeProfit) {
211
212
  await service.placeOrder({
212
- accountId: account.accountId, contractId, type: 4,
213
- side: direction === 'long' ? 1 : 0, size: orderSize, stopPrice: stopLoss
213
+ accountId: account.rithmicAccountId || account.accountId,
214
+ symbol: symbolCode, exchange: contract.exchange || 'CME',
215
+ type: 4, side: direction === 'long' ? 1 : 0,
216
+ size: orderSize, price: stopLoss
214
217
  });
215
218
  await service.placeOrder({
216
- accountId: account.accountId, contractId, type: 1,
217
- side: direction === 'long' ? 1 : 0, size: orderSize, limitPrice: takeProfit
219
+ accountId: account.rithmicAccountId || account.accountId,
220
+ symbol: symbolCode, exchange: contract.exchange || 'CME',
221
+ type: 1, side: direction === 'long' ? 1 : 0,
222
+ size: orderSize, price: takeProfit
218
223
  });
219
224
  ui.addLog('trade', `SL: ${stopLoss.toFixed(2)} | TP: ${takeProfit.toFixed(2)}`);
220
225
  }