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

Loading
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