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