fix: add ioc trade type to order type

This commit is contained in:
David Chang 2021-04-11 20:07:05 +08:00
parent 18e4f4863a
commit f884fcd45c
2 changed files with 4 additions and 1 deletions

View File

@ -150,6 +150,9 @@ func toLocalOrderType(orderType types.OrderType) (max.OrderType, error) {
case types.OrderTypeMarket: case types.OrderTypeMarket:
return max.OrderTypeMarket, nil return max.OrderTypeMarket, nil
case types.OrderTypeIOCLimit:
return max.OrderTypeIOCLimit, nil
} }
return "", fmt.Errorf("order type %s not supported", orderType) return "", fmt.Errorf("order type %s not supported", orderType)

View File

@ -334,7 +334,7 @@ func toMaxSubmitOrder(o types.SubmitOrder) (*maxapi.Order, error) {
} }
switch o.Type { switch o.Type {
case types.OrderTypeStopLimit, types.OrderTypeLimit, types.OrderTypeLimitMaker: case types.OrderTypeStopLimit, types.OrderTypeLimit, types.OrderTypeLimitMaker, types.OrderTypeIOCLimit:
priceInString := o.PriceString priceInString := o.PriceString
if len(priceInString) == 0 { if len(priceInString) == 0 {
if o.Market.Symbol != "" { if o.Market.Symbol != "" {