def _margin_of(self, quantity, price):
    env = Environment.get_instance()
    instrument = env.data_proxy.instruments(self.order_book_id)
    return (((quantity * instrument.contract_multiplier) * price) * self.margin_rate)
def _margin_of(self, quantity, price):
    env = Environment.get_instance()
    instrument = env.data_proxy.instruments(self.order_book_id)
    return (((quantity * instrument.contract_multiplier) * price) * self.margin_rate)