mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
max: add withdraw status convert function for v3
This commit is contained in:
parent
00091e1ce1
commit
5d65b817ef
|
@ -341,6 +341,26 @@ func convertWebSocketOrderUpdate(u max.OrderUpdate) (*types.Order, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
func convertWithdrawStatusV3(status max.WithdrawStatus) types.WithdrawStatus {
|
||||
switch status {
|
||||
|
||||
case max.WithdrawStatusPending:
|
||||
return types.WithdrawStatusSent
|
||||
|
||||
case max.WithdrawStatusOK:
|
||||
return types.WithdrawStatusCompleted
|
||||
|
||||
case max.WithdrawStatusFailed:
|
||||
return types.WithdrawStatusFailed
|
||||
|
||||
case max.WithdrawStatusCancelled:
|
||||
return types.WithdrawStatusCancelled
|
||||
|
||||
}
|
||||
|
||||
return types.WithdrawStatus(status)
|
||||
}
|
||||
|
||||
func convertWithdrawStatus(state max.WithdrawState) types.WithdrawStatus {
|
||||
switch state {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user