public static Trade adaptTrade ( WexTrade bTCETrade , CurrencyPair currencyPair ) { OrderType orderType = bTCETrade . getTradeType ( ) . equalsIgnoreCase ( "bid" ) ? OrderType . BID : OrderType . ASK ; BigDecimal amount = bTCETrade . getAmount ( ) ; BigDecimal price = bTCETrade . getPrice ( ) ; Date date = DateUtils . fromMillisUtc ( bTCETrade . getDate ( ) * 1000L ) ; final String tradeId = String . valueOf ( bTCETrade . getTid ( ) ) ; return new Trade ( orderType , amount , currencyPair , price , date , tradeId ) ; }
Adapts a BTCETradeV3 to a Trade Object