[Python] How to create a midnight object?

Discussão em 'Python' iniciado por Stack, Fevereiro 20, 2025.

  1. Stack

    Stack Membro Participativo

    Wanting to create a midnight object so I can compare the current daily change on cryptocurrencies.

    def markets(self):
    try:
    symbols = ["BTC/USDC:USDC", "ETH/USDC:USDC", "SOL/USDC:USDC", "XRP/USDC:USDC"]

    for symbol in symbols:
    price = self.exchange.fetchTicker(symbol)

    return f"{symbol} {price['bid']}"

    except Exception as e:
    print(f"Error fetching markets: {e}")

    def daily_change(self):
    pass


    I tried to create a midnight object by: midnight = datetime.time(24, 0, 0) but doesnt seme correct at all

    Continue reading...

Compartilhe esta Página