mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
fix: add ioc trade type to order type
This commit is contained in:
parent
18e4f4863a
commit
f884fcd45c
|
@ -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)
|
||||||
|
|
|
@ -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 != "" {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user