def get_prices(self, date: str, currency: str) -> List[PriceModel]:
from .repositories import PriceRepository<EOL>session = self.session<EOL>repo = PriceRepository(session)<EOL>query = repo.query<EOL>if date:<EOL><INDENT>query = query.filter(dal.Price.date == date)<EOL><DEDENT>if currency:<EOL><INDENT>query = query.filter(dal.Price.currency == currency)<EOL><DEDENT>query = query.order_by(dal.Price.namespace, dal.Price.symbol)<EOL>price_entities = query.all()<EOL>mapper = mappers.PriceMapper()<EOL>result = []<EOL>for entity in price_entities:<EOL><INDENT>model = mapper.map_entity(entity)<EOL>result.append(model)<EOL><DEDENT>return result<EOL>
Fetches all the prices for the given arguments