public static Trade adaptTrade ( CexIOTrade trade , CurrencyPair currencyPair ) { BigDecimal amount = trade . getAmount ( ) ; BigDecimal price = trade . getPrice ( ) ; Date date = DateUtils . fromMillisUtc ( trade . getDate ( ) * 1000L ) ; OrderType type = trade . getType ( ) . equals ( ORDER_TYPE_BUY ) ? OrderType . BID : OrderType . ASK ; return new Trade ( type , amount , currencyPair , price , date , String . valueOf ( trade . getTid ( ) ) ) ; }
Adapts a CexIOTrade to a Trade Object