1、交易对黑名单 交易所下架的交易对直接删除

This commit is contained in:
2025-03-06 18:16:35 +08:00
parent 981d2c0108
commit 126193df36
14 changed files with 731 additions and 543 deletions

View File

@ -159,3 +159,14 @@ func GetSymbolTriggerCount(db *gorm.DB, symbol string, apiId, symbolType int) (i
// func GetOpenedOrders(db *gorm.DB, apiId int, exchange, symbol, symbolType, side string) ([]models.LinePreOrder, error) {
// }
// 获取子订单止盈止损数量
func GetChildTpOrder(db *gorm.DB, pid int) (int, error) {
var count int64
if err := db.Model(&models.LinePreOrder{}).Where("pid =? AND order_type>0 and order_type <3 and status =0", pid).Count(&count).Error; err != nil {
return 0, err
}
return int(count), nil
}