From ae1c1377ce768bf934264845a3cacac674144e27 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 18 May 2023 15:33:29 +0800 Subject: [PATCH] bitget: define OrderStatus --- .../bitget/bitgetapi/get_order_detail_request.go | 2 +- pkg/exchange/bitget/bitgetapi/types.go | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/exchange/bitget/bitgetapi/get_order_detail_request.go b/pkg/exchange/bitget/bitgetapi/get_order_detail_request.go index 717bed4a6..f6081f0da 100644 --- a/pkg/exchange/bitget/bitgetapi/get_order_detail_request.go +++ b/pkg/exchange/bitget/bitgetapi/get_order_detail_request.go @@ -19,7 +19,7 @@ type OrderDetail struct { Quantity fixedpoint.Value `json:"quantity"` OrderType OrderType `json:"orderType"` Side OrderSide `json:"side"` - Status string `json:"status"` + Status OrderStatus `json:"status"` FillPrice fixedpoint.Value `json:"fillPrice"` FillQuantity fixedpoint.Value `json:"fillQuantity"` FillTotalAmount fixedpoint.Value `json:"fillTotalAmount"` diff --git a/pkg/exchange/bitget/bitgetapi/types.go b/pkg/exchange/bitget/bitgetapi/types.go index d7eefdc00..1aa6280f7 100644 --- a/pkg/exchange/bitget/bitgetapi/types.go +++ b/pkg/exchange/bitget/bitgetapi/types.go @@ -29,3 +29,13 @@ const ( OrderForceFOK OrderForce = "fok" OrderForceIOC OrderForce = "ioc" ) + +type OrderStatus string + +const ( + OrderStatusInit OrderStatus = "init" + OrderStatusNew OrderStatus = "new" + OrderStatusPartialFill OrderStatus = "partial_fill" + OrderStatusFullFill OrderStatus = "full_fill" + OrderStatusCancelled OrderStatus = "cancelled" +)