gitee.com/quant1x/engine@v1.8.4/services/task_sell_orders_test.go (about) 1 package services 2 3 import ( 4 "fmt" 5 "gitee.com/quant1x/engine/trader" 6 "gitee.com/quant1x/exchange" 7 "testing" 8 ) 9 10 func TestTaskSell_getEarlierDate(t *testing.T) { 11 v := getEarlierDate(1) 12 fmt.Println(v) 13 } 14 15 func Test_checkoutCanSellStockList(t *testing.T) { 16 positions, err := trader.QueryHolding() 17 if err != nil { 18 return 19 } 20 var holdings []string 21 for _, position := range positions { 22 if position.CanUseVolume < 1 { 23 continue 24 } 25 stockCode := position.StockCode 26 securityCode := exchange.CorrectSecurityCode(stockCode) 27 holdings = append(holdings, securityCode) 28 } 29 v := CheckoutCanSellStockList(117, holdings) 30 fmt.Println(v) 31 } 32 33 func Test_getHoldingDates(t *testing.T) { 34 v := getHoldingDates(1) 35 fmt.Println(v) 36 }