Skip to content

feat(perps): add --symbol and --leverage options to leverage command (Vibe Kanban)#5

Merged
MinaraAgent merged 2 commits intomainfrom
vk/a86f-min-7-add-symbol
Mar 31, 2026
Merged

feat(perps): add --symbol and --leverage options to leverage command (Vibe Kanban)#5
MinaraAgent merged 2 commits intomainfrom
vk/a86f-min-7-add-symbol

Conversation

@MinaraAgent
Copy link
Copy Markdown
Member

@MinaraAgent MinaraAgent commented Mar 31, 2026

Summary

  • Add -s, --symbol <TOKEN> option for specifying target token symbol (ETH, SOL, BTC, etc.)
  • Add -l, --leverage <VALUE> option for specifying leverage multiplier (2, 3, 5, 10, etc.)
  • Add validation for symbol (must be supported) and leverage (must be >= 1 and within max for symbol)
  • Default to cross margin mode when both options are provided (non-interactive)
  • Keep interactive mode as fallback when parameters not provided

Implementation Details

  • Added LeverageOpts interface to type the command options
  • Symbol validation checks against fetched Hyperliquid asset metadata
  • Leverage validation ensures value is numeric, >= 1, and within the asset's max leverage
  • In non-interactive mode, cross margin is used as the default
  • Added comprehensive test coverage for all new functionality

CLI Usage

# Set ETH leverage to 2x (non-interactive)
minara perps leverage -s ETH -l 2

# Set SOL leverage to 3x on a specific wallet
minara perps leverage -w trading -s SOL -l 3

# Interactive mode (fallback)
minara perps leverage

Test Cases

  • Non-interactive mode with --symbol and --leverage flags
  • Specific wallet targeting with --wallet flag
  • Rejection of invalid symbols
  • Rejection of leverage exceeding maximum for symbol
  • Rejection of invalid leverage values (non-numeric or below 1)
  • Fallback to interactive mode when flags not provided

This PR was written using Vibe Kanban

claude and others added 2 commits March 31, 2026 11:09
Add non-interactive mode support for setting perps leverage:
- Add -s, --symbol <TOKEN> option for target token (ETH, SOL, BTC)
- Add -l, --leverage <VALUE> option for leverage multiplier (2, 3, 5, 10)
- Validate symbol is supported and leverage is within valid range
- Default to cross margin mode in non-interactive mode
- Keep interactive mode as fallback when parameters not provided

Usage:
- minara perps leverage -s ETH -l 2
- minara perps leverage -w trading -s SOL -l 3
- minara perps leverage (interactive)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…orktree (dependencies were installed). This is not part of the feature change, so I'll leave it uncommitted. The feature implementation has been committed successfully.
@MinaraAgent MinaraAgent changed the title Enhance the minara perps leverage command to support single-command usage with optional (vibe-kanban) feat(perps): add --symbol and --leverage options to leverage command (Vibe Kanban) Mar 31, 2026
@MinaraAgent MinaraAgent merged commit 9c5d121 into main Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants