perp-cli 0.9.1 → 0.9.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.
@@ -442,8 +442,10 @@ async function fetchPositions(adapter, symbol, exchangeName) {
442
442
  async function fetchExchangeBalances(primaryAdapter, extraAdapters) {
443
443
  const adapters = [[primaryAdapter.name, primaryAdapter]];
444
444
  if (extraAdapters) {
445
- for (const [name, a] of extraAdapters)
446
- adapters.push([name, a]);
445
+ for (const [name, a] of extraAdapters) {
446
+ if (name !== primaryAdapter.name)
447
+ adapters.push([name, a]);
448
+ }
447
449
  }
448
450
  const results = [];
449
451
  await Promise.all(adapters.map(async ([name, a]) => {
@@ -523,8 +525,10 @@ async function fetchSpotPositions(adapter) {
523
525
  async function fetchAllPositions(primaryAdapter, symbol, extraAdapters) {
524
526
  const adapters = [[primaryAdapter.name, primaryAdapter]];
525
527
  if (extraAdapters) {
526
- for (const [name, a] of extraAdapters)
527
- adapters.push([name, a]);
528
+ for (const [name, a] of extraAdapters) {
529
+ if (name !== primaryAdapter.name)
530
+ adapters.push([name, a]);
531
+ }
528
532
  }
529
533
  const all = [];
530
534
  await Promise.all(adapters.map(async ([name, a]) => {
@@ -213,7 +213,7 @@ export function registerBotCommands(program, getAdapter, getAdapterFor, isJson)
213
213
  bot
214
214
  .command("delta-neutral")
215
215
  .description("Spot-long + perp-short delta-neutral funding rate farming")
216
- .option("--exchanges <list>", "Comma-separated perp exchange names", "lighter,aster")
216
+ .option("--exchanges <list>", "Comma-separated perp exchange names", "pacifica,lighter,hyperliquid,aster")
217
217
  .option("--min-rate <pct>", "Min annualized rate to enter (%)", "10")
218
218
  .option("--close-rate <pct>", "Close when avg rate drops below (%)", "2")
219
219
  .option("--size <usd>", "Position size per leg ($)", "50")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perp-cli",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Multi-DEX Perpetual Futures CLI - Pacifica, Hyperliquid, Lighter, Aster",
5
5
  "bin": {
6
6
  "perp": "dist/index.js",