Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
726 B
3
Indexable
Never
def start_dashboard(self):
        dataframe = self.blackboard.copy()

        exchanges_name = list(self.data.keys())

        base_currencies = [market.split('/')[0] for exchange_name in exchanges_name for market in self.data[exchange_name]]
        quote_currencies = [f"{exchange_name} ({market.split('/')[1]})" for exchange_name in exchanges_name for market in self.data[exchange_name]]

        base_currencies = sorted(set(base_currencies))
        quote_currencies = sorted(set(quote_currencies))

        for base_currency in base_currencies:
            for quote_currency in quote_currencies:
                dataframe.loc[base_currency, quote_currency] = None

        self.set_blackboard(dataframe)
Leave a Comment