Skip to content

Commit 6a5961f

Browse files
committed
fix order status not update correctly sometimes
1 parent 7139f7c commit 6a5961f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

biz/odmgr_live.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1583,8 +1583,9 @@ func (o *LiveOrderMgr) updateOdByExgRes(od *ormo.InOutOrder, isEnter bool, res *
15831583
subOd.Fee = res.Fee.Cost
15841584
subOd.FeeType = res.Fee.Currency
15851585
}
1586+
subOd.Status = ormo.OdStatusPartOK
15861587
}
1587-
if res.Status == "expired" || res.Status == "rejected" || res.Status == "closed" || res.Status == "canceled" {
1588+
if banexg.IsOrderDone(res.Status) {
15881589
subOd.Status = ormo.OdStatusClosed
15891590
if subOd.Filled > 0 && subOd.Average > 0 {
15901591
subOd.Price = subOd.Average

core/data.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ var (
4343
MemProfile bool
4444

4545
ConcurNum = 2 // The maximum number of K-line tasks to be downloaded at the same time. If it is too high, a 429 current limit will occur. 最大同时下载K线任务数,过大会出现429限流
46-
Version = "v0.2.11-beta.2"
47-
UIVersion = "v0.2.11-beta.2"
46+
Version = "v0.2.11"
47+
UIVersion = "v0.2.11"
4848
LogFile string
4949
DevDbPath string
5050
)

0 commit comments

Comments
 (0)