From b9dde98d1ecdbdcfd6f39f77a0abd1b9fb52fc20 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 19 Nov 2024 21:13:21 -0500 Subject: [PATCH] .deribit.venues: add todo for an ideal `OptionPair.expiry` fmt/value --- piker/brokers/deribit/venues.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/piker/brokers/deribit/venues.py b/piker/brokers/deribit/venues.py index f74c970e..0179c5f0 100644 --- a/piker/brokers/deribit/venues.py +++ b/piker/brokers/deribit/venues.py @@ -26,8 +26,6 @@ from typing import ( ) from decimal import Decimal -from msgspec import field - from piker.types import Struct @@ -115,9 +113,13 @@ class OptionPair(Pair, frozen=True): # NOTE: see `.data._symcache.SymbologyCache.load()` for why ns_path: str = 'piker.brokers.deribit:OptionPair' + # TODO, impl this without the MM:SS part of + # the `'THH:MM:SS..'` etc.. @property def expiry(self) -> str: - iso_date = pendulum.from_timestamp(self.expiration_timestamp / 1000).isoformat() + iso_date = pendulum.from_timestamp( + self.expiration_timestamp / 1000 + ).isoformat() return iso_date @property