Skip to content

fix : close command fails to execute on Hyperliquid#13

Open
tae9898 wants to merge 4 commits into
Minara-AI:mainfrom
tae9898:fix/perps-close-order-type
Open

fix : close command fails to execute on Hyperliquid#13
tae9898 wants to merge 4 commits into
Minara-AI:mainfrom
tae9898:fix/perps-close-order-type

Conversation

@tae9898

@tae9898 tae9898 commented Jun 8, 2026

Copy link
Copy Markdown

##Problem

minara perps close returns success but positions remain open on Hyperliquid.

##Cause

Close order uses trigger (take-profit) type which Hyperliquid doesn't execute:
t: { trigger: { triggerPx: String(marketPx), tpsl: 'tp', isMarket: true } }

Fix

Changed to limit IOC (Immediate or Cancel) in src/commands/perps.ts (lines 944, 1055):
t: { limit: { tif: 'Ioc' } }

This fills immediately at market price

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request bumps the package version to 0.4.7 in package-lock.json and updates the order parameters in src/commands/perps.ts for the closeCmd command. Specifically, it replaces the trigger-based order type with a limit order using an Immediate-or-Cancel (IOC) time-in-force option. There are no review comments to address, and I have no further feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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.

1 participant