minara 0.4.1 → 0.4.2

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.
@@ -466,6 +466,7 @@ const orderCmd = new Command('order')
466
466
  .option('-z, --size <size>', 'Position size in contracts')
467
467
  .option('-r, --reduce-only', 'Reduce-only order')
468
468
  .option('-g, --grouping <grouping>', 'TP/SL grouping: na, normalTpsl, positionTpsl', 'na')
469
+ .option('--tpsl <type>', 'Trigger type for market orders: tp (take profit) or sl (stop loss)', 'tp')
469
470
  .action(wrapAction(async (opts) => {
470
471
  const creds = requireAuth();
471
472
  const resolved = await resolveWallet(creds.accessToken, opts.wallet, 'Place order on which wallet?');
@@ -680,7 +681,7 @@ const orderCmd = new Command('order')
680
681
  r: reduceOnly,
681
682
  t: orderType === 'limit'
682
683
  ? { limit: { tif: 'Gtc' } }
683
- : { trigger: { triggerPx: String(marketPx ?? limitPx), tpsl: 'tp', isMarket: true } },
684
+ : { trigger: { triggerPx: String(marketPx ?? limitPx), tpsl: opts.tpsl ?? 'tp', isMarket: true } },
684
685
  };
685
686
  const priceLabel = orderType === 'market' ? `Market (~$${marketPx ?? limitPx})` : `$${limitPx}`;
686
687
  const levLabel = currentLev ? `${currentLev.value}x (${currentLev.type})` : '—';
@@ -689,7 +690,7 @@ const orderCmd = new Command('order')
689
690
  console.log(` Asset : ${chalk.bold(order.a)}`);
690
691
  console.log(` Side : ${formatOrderSide(order.b ? 'buy' : 'sell')}`);
691
692
  console.log(` Leverage : ${chalk.cyan(levLabel)}`);
692
- console.log(` Type : ${orderType === 'market' ? 'Market' : 'Limit (GTC)'}`);
693
+ console.log(` Type : ${orderType === 'market' ? `Market (${opts.tpsl === 'sl' ? 'Stop Loss' : 'Take Profit'})` : 'Limit (GTC)'}`);
693
694
  console.log(` Price : ${chalk.yellow(priceLabel)}`);
694
695
  console.log(` Size : ${chalk.bold(order.s)}`);
695
696
  console.log(` Reduce Only : ${order.r ? chalk.yellow('Yes') : 'No'}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minara",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "CLI client for Minara.ai — login, trade, deposit/withdraw, chat and more from your terminal.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",