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:
Ryan O'Hara-Reid
2022-05-16 10:55:23 +10:00
committed by GitHub
parent ccde38d25a
commit 16a93b49a4
35 changed files with 241 additions and 114 deletions

View File

@@ -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) {

View File

@@ -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