| 414 | } |
| 415 | |
| 416 | func stringToOrderStatus(status string) (order.Status, error) { |
| 417 | switch status { |
| 418 | case "NEW": |
| 419 | return order.New, nil |
| 420 | case "PARTIALLY_FILLED": |
| 421 | return order.PartiallyFilled, nil |
| 422 | case "FILLED": |
| 423 | return order.Filled, nil |
| 424 | case "CANCELED": |
| 425 | return order.Cancelled, nil |
| 426 | case "PENDING_CANCEL": |
| 427 | return order.PendingCancel, nil |
| 428 | case "REJECTED": |
| 429 | return order.Rejected, nil |
| 430 | case "EXPIRED": |
| 431 | return order.Expired, nil |
| 432 | default: |
| 433 | return order.UnknownStatus, errors.New(status + " not recognised as order status") |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | // SeedLocalCache seeds depth data |
| 438 | func (e *Exchange) SeedLocalCache(ctx context.Context, p currency.Pair) error { |