From a4aa9c2edaa273964826d32cbb2bace63dd5db98 Mon Sep 17 00:00:00 2001 From: "Alan.sung" Date: Tue, 22 Aug 2023 15:14:18 +0800 Subject: [PATCH] remove mmp and mmp_post_only --- pkg/exchange/okex/convert.go | 4 ++-- pkg/exchange/okex/okexapi/client.go | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkg/exchange/okex/convert.go b/pkg/exchange/okex/convert.go index 272152783..622171e43 100644 --- a/pkg/exchange/okex/convert.go +++ b/pkg/exchange/okex/convert.go @@ -214,10 +214,10 @@ func toGlobalOrderType(orderType okexapi.OrderType) (types.OrderType, error) { case okexapi.OrderTypeMarket: return types.OrderTypeMarket, nil - case okexapi.OrderTypeLimit, okexapi.OrderTypeFOK, okexapi.OrderTypeIOC, okexapi.OrderTypeMarketMakerProtection: + case okexapi.OrderTypeLimit, okexapi.OrderTypeFOK, okexapi.OrderTypeIOC: return types.OrderTypeLimit, nil - case okexapi.OrderTypePostOnly, okexapi.OrderTypeMarketMakerProtectionPostOnly: + case okexapi.OrderTypePostOnly: return types.OrderTypeLimitMaker, nil } diff --git a/pkg/exchange/okex/okexapi/client.go b/pkg/exchange/okex/okexapi/client.go index 3730b3252..ccb81f70a 100644 --- a/pkg/exchange/okex/okexapi/client.go +++ b/pkg/exchange/okex/okexapi/client.go @@ -33,13 +33,11 @@ const ( type OrderType string const ( - OrderTypeMarket OrderType = "market" - OrderTypeLimit OrderType = "limit" - OrderTypePostOnly OrderType = "post_only" - OrderTypeFOK OrderType = "fok" - OrderTypeIOC OrderType = "ioc" - OrderTypeMarketMakerProtection OrderType = "mmp" - OrderTypeMarketMakerProtectionPostOnly OrderType = "mmp_and_post_only" + OrderTypeMarket OrderType = "market" + OrderTypeLimit OrderType = "limit" + OrderTypePostOnly OrderType = "post_only" + OrderTypeFOK OrderType = "fok" + OrderTypeIOC OrderType = "ioc" ) type InstrumentType string