Order order = new Order(params);
OrderEstimate orderEstimate = order.calculateOrderEstimate(marketDataService);
// Determine account level compliance
if (orderEstimate.getCompliance() == null) {
OrderCompliance compliance = (order.getSide() == OrderSide.Buy) ?
calculateBuyOrderCompliance(order, orderEstimate, marketDataService) :
calculateSellOrderCompliance(order);
orderEstimate.setCompliance(compliance);
}