mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 23:16:53 +00:00
btcm: add modify order functionality, change return to pointer (#940)
* btcm: add modify order functionality, change return to pointer * glorious: nits * glorious: nits * btcm: Adjust function name * thrasher: nits * thrasher: nits cont...
This commit is contained in:
@@ -812,6 +812,9 @@ var stringsToOrderStatus = []struct {
|
||||
{"cLosEd", Closed, nil},
|
||||
{"cancellinG", Cancelling, nil},
|
||||
{"woahMan", UnknownStatus, errUnrecognisedOrderStatus},
|
||||
{"PLAcED", New, nil},
|
||||
{"ACCePTED", New, nil},
|
||||
{"FAILeD", Rejected, nil},
|
||||
}
|
||||
|
||||
func TestStringToOrderStatus(t *testing.T) {
|
||||
|
||||
@@ -919,7 +919,7 @@ func StringToOrderStatus(status string) (Status, error) {
|
||||
switch status {
|
||||
case AnyStatus.String():
|
||||
return AnyStatus, nil
|
||||
case New.String(), "PLACED":
|
||||
case New.String(), "PLACED", "ACCEPTED":
|
||||
return New, nil
|
||||
case Active.String(), "STATUS_ACTIVE":
|
||||
return Active, nil
|
||||
@@ -937,7 +937,7 @@ func StringToOrderStatus(status string) (Status, error) {
|
||||
return Cancelled, nil
|
||||
case PendingCancel.String(), "PENDING CANCEL", "PENDING CANCELLATION":
|
||||
return PendingCancel, nil
|
||||
case Rejected.String():
|
||||
case Rejected.String(), "FAILED":
|
||||
return Rejected, nil
|
||||
case Expired.String():
|
||||
return Expired, nil
|
||||
|
||||
Reference in New Issue
Block a user