public static Trade adaptTrade ( ANXTrade anxTrade ) { OrderType orderType = adaptSide ( anxTrade . getTradeType ( ) ) ; BigDecimal amount = anxTrade . getAmount ( ) ; BigDecimal price = anxTrade . getPrice ( ) ; CurrencyPair currencyPair = adaptCurrencyPair ( anxTrade . getItem ( ) , anxTrade . getPriceCurrency ( ) ) ; Date dateTime = DateUtils . fromMillisUtc ( anxTrade . getTid ( ) ) ; final String tradeId = String . valueOf ( anxTrade . getTid ( ) ) ; return new Trade ( orderType , amount , currencyPair , price , dateTime , tradeId ) ; }
Adapts a ANXTrade to a Trade Object