/// <summary>Convert a poloniex deposit into a 'Transfer'</summary> private Transfer TransferFrom(global::Bittrex.API.DomainObjects.Transfer xfr, ETransfer type) { var id = xfr.TxId; var coin = Coins.GetOrAdd(xfr.Currency); var amount = xfr.Amount._(coin); var timestamp = xfr.Timestamp; var status = ToTransferStatus(xfr); return(new Transfer(id, type, coin, amount, timestamp, status)); }
/// <summary>Convert boolean in 'xfr' into a transfer status</summary> private Transfer.EStatus ToTransferStatus(global::Bittrex.API.DomainObjects.Transfer xfr) { if (xfr.PendingPayment) { return(Transfer.EStatus.Pending); } if (xfr.Cancelled) { return(Transfer.EStatus.Cancelled); } if (xfr.Authorized) { return(Transfer.EStatus.Complete); } return(Transfer.EStatus.Unknown); }