public void add ( long instrument , long orderId , Side side , long price , long size ) { if ( orders . containsKey ( orderId ) ) { return ; } OrderBook book = books . get ( instrument ) ; if ( book == null ) { return ; } Order order = new Order ( book , side , price , size ) ; boolean bbo = book . add ( side , price , size ) ; orders . put ( orderId , order ) ; listener . update ( book , bbo ) ; }
Add an order to an order book .