def get_raw_cost_data(self, instrument_code: str) -> instrumentCosts: """ Get's cost data for an instrument Get cost data Execution slippage [half spread] price units Commission (local currency) per block Commission - percentage of value (0.01 is 1%) Commission (local currency) per block :param instrument_code: instrument to value for :type instrument_code: str :returns: dict of floats """ cost_data_object = self._get_instrument_object_with_cost_data( instrument_code) if cost_data_object is missing_instrument: self.log.warn("Cost data missing for %s will use zero costs" % instrument_code) return instrumentCosts() instrument_costs = instrumentCosts( price_slippage=cost_data_object.meta_data.Slippage, value_of_block_commission=cost_data_object.meta_data.PerBlock, percentage_cost=cost_data_object.meta_data.Percentage, value_of_pertrade_commission=cost_data_object.meta_data.PerTrade, ) return instrument_costs
def get_raw_cost_data(self, instrument_code: str) -> instrumentCosts: """ Get cost data Execution slippage [half spread] price units Commission (local currency) per block Commission - percentage of value (0.01 is 1%) Commission (local currency) per block :param instrument_code: instrument to value for :type instrument_code: str :returns: dict of floats """ self.log.warn("Using base method of simData, using zero costs") return instrumentCosts()