1、减仓后减仓
This commit is contained in:
@ -28,7 +28,7 @@ func TestFutureJudge(t *testing.T) {
|
||||
// }
|
||||
|
||||
key := fmt.Sprintf(rediskey.FuturesReduceList, global.EXCHANGE_BINANCE)
|
||||
item := `{"id":4,"apiId":49,"mainId":1,"pid":1,"symbol":"ADAUSDT","price":"0.5417","side":"SELL","num":"13","orderSn":"397659701065547776"}`
|
||||
item := `{"id":50,"apiId":49,"mainId":47,"pid":47,"symbol":"ADAUSDT","price":"0.5936","side":"SELL","num":"12","orderSn":"397913127842217984"}`
|
||||
reduceOrder := ReduceListItem{}
|
||||
futApi := FutRestApi{}
|
||||
setting, err := cacheservice.GetSystemSetting(db)
|
||||
@ -42,7 +42,7 @@ func TestFutureJudge(t *testing.T) {
|
||||
return
|
||||
}
|
||||
// JudgeFuturesReduce(tradeSet)
|
||||
FuturesReduceTrigger(db, reduceOrder, futApi, setting, key, item, false)
|
||||
FuturesReduceTrigger(db, reduceOrder, futApi, setting, key, item, false, 0)
|
||||
}
|
||||
|
||||
// 测试减仓后减仓触发
|
||||
@ -53,9 +53,10 @@ func TestFutureReduceReduce(t *testing.T) {
|
||||
helper.InitDefaultRedis("127.0.0.1:6379", "", 2)
|
||||
helper.InitLockRedisConn("127.0.0.1:6379", "", "2")
|
||||
tradeSet := models.TradeSet{
|
||||
Coin: "ADA",
|
||||
Currency: "USDT",
|
||||
LastPrice: "0.5307",
|
||||
Coin: "ADA",
|
||||
Currency: "USDT",
|
||||
LastPrice: "0.5817",
|
||||
PriceDigit: 4,
|
||||
}
|
||||
|
||||
// JudgeFuturesReduce(tradeSet)
|
||||
|
||||
Reference in New Issue
Block a user