1、暂存
This commit is contained in:
@ -9,8 +9,8 @@ import (
|
||||
"go-admin/common/const/rediskey"
|
||||
"go-admin/common/global"
|
||||
"go-admin/common/helper"
|
||||
"go-admin/models/positiondto"
|
||||
"go-admin/pkg/utility"
|
||||
"go-admin/services/binanceservice"
|
||||
"time"
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
@ -128,10 +128,10 @@ func removeExpirateChildOrder(childOrders []models.LinePreOrder, db *gorm.DB) {
|
||||
spotAdPositionStr, _ := helper.DefaultRedis.GetAllList(spotAddKey)
|
||||
futReduceStr, _ := helper.DefaultRedis.GetAllList(futReduceKey)
|
||||
spotReduceStr, _ := helper.DefaultRedis.GetAllList(spotReduceKey)
|
||||
futAddPositionCache := binanceservice.AddPositionList{}
|
||||
spotAddPositionCache := binanceservice.AddPositionList{}
|
||||
futReduceCache := binanceservice.ReduceListItem{}
|
||||
spotReduceCache := binanceservice.ReduceListItem{}
|
||||
futAddPositionCache := positiondto.AddPositionList{}
|
||||
spotAddPositionCache := positiondto.AddPositionList{}
|
||||
futReduceCache := positiondto.ReduceListItem{}
|
||||
spotReduceCache := positiondto.ReduceListItem{}
|
||||
futAddPositionMap := map[int]string{}
|
||||
spotAddPositionMap := map[int]string{}
|
||||
futReduceMap := map[int]string{}
|
||||
|
||||
@ -242,7 +242,7 @@ func (t LimitOrderTimeoutDuration) ReSpotOrderPlace(db *gorm.DB, order models.Li
|
||||
} else {
|
||||
var remainingQuantity decimal.Decimal
|
||||
spotOrder, err := spotApi.GetOrderByOrderSnLoop(order.Symbol, order.OrderSn, apiUserinfo, 4)
|
||||
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 0)
|
||||
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 1)
|
||||
|
||||
if err == nil {
|
||||
origQty := utility.StrToDecimal(spotOrder.OrigQty)
|
||||
@ -360,7 +360,7 @@ func (t LimitOrderTimeoutDuration) ReFutOrderPlace(db *gorm.DB, order models.Lin
|
||||
} else {
|
||||
var remainingQuantity decimal.Decimal
|
||||
spotOrder, err := futApi.GetOrderByOrderSnLoop(order.Symbol, order.OrderSn, apiUserinfo, 4)
|
||||
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 1)
|
||||
tradeSet, _ := cacheservice.GetTradeSet(global.EXCHANGE_BINANCE, order.Symbol, 2)
|
||||
|
||||
if err == nil {
|
||||
origQty := utility.StrToDecimal(spotOrder.OrigQty)
|
||||
|
||||
Reference in New Issue
Block a user