-
Notifications
You must be signed in to change notification settings - Fork 511
Open
Description
Hey team,
I'm building a trading bot using the Hyperliquid Python SDK (v0.22.0) and need to set TP/SL for orders programmatically.
Current situation:
- I can place orders successfully via
exchange.order() - I can modify orders via
exchange.modify_order() - BUT: Neither method has parameters for
tp_pxorstop_px
What I've tried:
- ✗ SDK
order()method - no TP/SL parameters available - ✗ SDK
modify_order()method - no TP/SL parameters available - ✗ Raw API POST to /exchange with
tpPx/slPxfields - got HTTP 422 "Failed to deserialize" - ✗ Raw API with
takeProfit/stopLossobjects - also 422 error
Questions:
- Does the Hyperliquid API support setting TP/SL programmatically?
- If yes, what's the correct endpoint/parameters/SDK method?
- If no, is this coming soon?
Current workaround: Setting TP/SL manually on the UI works fine. Just want to automate if possible.
Thanks!
Code references:
- Hyperliquid Python SDK: https://github.com/hyperliquid-dex/hyperliquid-python-sdk
- SDK version: 0.22.0
- API: https://api.hyperliquid.xyz
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels