perp-cli 0.7.21 → 0.7.23

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.
@@ -371,13 +371,16 @@ export class FundingArbStrategy {
371
371
  }
372
372
  opportunities.sort((a, b) => b.spread - a.spread);
373
373
  if (opportunities.length > 0) {
374
- const top = opportunities.slice(0, 3);
375
- for (const opp of top) {
376
- if (opp.mode === "spot-perp") {
377
- ctx.log(` [ARB] ${opp.symbol}: ${opp.spread.toFixed(1)}% spread [spot-perp] (short ${opp.shortExchange} ${(opp.shortRate * 100).toFixed(4)}%)`);
378
- }
379
- else {
380
- ctx.log(` [ARB] ${opp.symbol}: ${opp.spread.toFixed(1)}% spread (long ${opp.longExchange} ${(opp.longRate * 100).toFixed(4)}% / short ${opp.shortExchange} ${(opp.shortRate * 100).toFixed(4)}%)`);
374
+ // Only log opportunities when there's room for new positions
375
+ if (arbPositions < params.max_positions) {
376
+ const top = opportunities.slice(0, 3);
377
+ for (const opp of top) {
378
+ if (opp.mode === "spot-perp") {
379
+ ctx.log(` [ARB] ${opp.symbol}: ${opp.spread.toFixed(1)}% spread [spot-perp] (short ${opp.shortExchange} ${(opp.shortRate * 100).toFixed(4)}%)`);
380
+ }
381
+ else {
382
+ ctx.log(` [ARB] ${opp.symbol}: ${opp.spread.toFixed(1)}% spread (long ${opp.longExchange} ${(opp.longRate * 100).toFixed(4)}% / short ${opp.shortExchange} ${(opp.shortRate * 100).toFixed(4)}%)`);
383
+ }
381
384
  }
382
385
  }
383
386
  // Auto-execute: try each opportunity until one succeeds
@@ -18,7 +18,7 @@ const EXCHANGE_FUNDING_HOURS = {
18
18
  hyperliquid: 1,
19
19
  pacifica: 1,
20
20
  lighter: 8,
21
- aster: 8,
21
+ aster: 1,
22
22
  };
23
23
  /**
24
24
  * Get funding period in hours for an exchange.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perp-cli",
3
- "version": "0.7.21",
3
+ "version": "0.7.23",
4
4
  "description": "Multi-DEX Perpetual Futures CLI - Pacifica, Hyperliquid, Lighter, Aster",
5
5
  "bin": {
6
6
  "perp": "dist/index.js",