(CLI) Fix getorders command currency pair filtering (#400)

* add currency pair filtering to getorders

* long live the Queen

* fixed wording on tests
This commit is contained in:
Andrew
2019-12-18 09:12:58 +11:00
committed by Adrian Gallagher
parent 75ac5ee791
commit 40122b3094
3 changed files with 10 additions and 5 deletions

View File

@@ -621,7 +621,12 @@ func (s *RPCServer) GetOrders(ctx context.Context, r *gctrpc.GetOrdersRequest) (
return nil, errors.New("exchange is not loaded/doesn't exist")
}
resp, err := exch.GetActiveOrders(&order.GetOrdersRequest{})
resp, err := exch.GetActiveOrders(&order.GetOrdersRequest{
Currencies: []currency.Pair{
currency.NewPairWithDelimiter(r.Pair.Base,
r.Pair.Quote, r.Pair.Delimiter),
},
})
if err != nil {
return nil, err
}

View File

@@ -501,9 +501,9 @@ var stringsToOrderStatus = []struct {
{"filled", Filled, nil},
{"FILLED", Filled, nil},
{"fIlLeD", Filled, nil},
{"canceled", Cancelled, nil},
{"CANCELED", Cancelled, nil},
{"cAnCelEd", Cancelled, nil},
{"cancelled", Cancelled, nil},
{"CANCELlED", Cancelled, nil},
{"cAnCellEd", Cancelled, nil},
{"pending_cancel", PendingCancel, nil},
{"PENDING_CANCEL", PendingCancel, nil},
{"pENdInG_cAnCeL", PendingCancel, nil},

View File

@@ -170,7 +170,7 @@ const (
PartiallyCancelled Status = "PARTIALLY_CANCELLED"
PartiallyFilled Status = "PARTIALLY_FILLED"
Filled Status = "FILLED"
Cancelled Status = "CANCELED"
Cancelled Status = "CANCELLED"
PendingCancel Status = "PENDING_CANCEL"
Rejected Status = "REJECTED"
Expired Status = "EXPIRED"