mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2025-12-06 13:54:41 +08:00
fix(bybit): complete Bybit integration by adding API layer support (#1149)
This commit is contained in:
committed by
GitHub
parent
7c43c8833c
commit
adf2d54b85
@@ -562,6 +562,11 @@ func (s *Server) handleCreateTrader(c *gin.Context) {
|
||||
exchangeCfg.AsterSigner,
|
||||
exchangeCfg.AsterPrivateKey,
|
||||
)
|
||||
case "bybit":
|
||||
tempTrader = trader.NewBybitTrader(
|
||||
exchangeCfg.APIKey,
|
||||
exchangeCfg.SecretKey,
|
||||
)
|
||||
default:
|
||||
log.Printf("⚠️ 不支持的交易所类型: %s,使用用户输入的初始资金", req.ExchangeID)
|
||||
}
|
||||
@@ -938,6 +943,11 @@ func (s *Server) handleSyncBalance(c *gin.Context) {
|
||||
exchangeCfg.AsterSigner,
|
||||
exchangeCfg.AsterPrivateKey,
|
||||
)
|
||||
case "bybit":
|
||||
tempTrader = trader.NewBybitTrader(
|
||||
exchangeCfg.APIKey,
|
||||
exchangeCfg.SecretKey,
|
||||
)
|
||||
default:
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "不支持的交易所类型"})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user