@check_is_trading
@export_as_api
@ExecutionContext.enforce_phase(EXECUTION_PHASE.HANDLE_BAR, EXECUTION_PHASE.SCHEDULED)
def order_lots(id_or_ins, amount, style=None):
 order_book_id = assure_order_book_id(id_or_ins)
 round_lot = int(get_data_proxy().instrument(order_book_id).round_lot)
 return order_shares(order_book_id, (amount * round_lot), style)

@ check_is_trading @ export_as_api @ ExecutionContext . enforce_phase ( EXECUTION_PHASE . HANDLE_BAR , EXECUTION_PHASE . SCHEDULED ) def order_lots ( id_or_ins , amount , style = None ) : order_book_id = assure_order_book_id ( id_or_ins ) round_lot = int ( get_data_proxy ( ) . instrument ( order_book_id ) . round_lot ) return order_shares ( order_book_id , ( amount * round_lot ) , style )
place an order by specified number of lots .