mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
(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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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},
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user