feat: add pending orders (SL/TP) display on chart

- Add GetOpenOrders method to Trader interface
- Implement for Binance (legacy + Algo), Bybit, Hyperliquid
- Add stub implementations for OKX, Bitget, Aster, Lighter
- Add /api/open-orders endpoint
- Display price lines for SL (red) and TP (green) orders
- Refresh open orders every 60 seconds (separate from 5s kline refresh)
This commit is contained in:
tinkle-community
2026-01-07 00:50:29 +08:00
parent 5e65ae7077
commit b36ab27b65
11 changed files with 349 additions and 0 deletions

View File

@@ -1096,3 +1096,9 @@ func genBitgetClientOid() string {
rand := time.Now().Nanosecond() % 100000
return fmt.Sprintf("nofx%d%05d", timestamp, rand)
}
// GetOpenOrders gets all open/pending orders for a symbol
func (t *BitgetTrader) GetOpenOrders(symbol string) ([]OpenOrder, error) {
// TODO: Implement Bitget open orders
return []OpenOrder{}, nil
}