.deribit.venues: add todo for an ideal `OptionPair.expiry` fmt/value

fix_deribit_hist_queries
Tyler Goodlet 2024-11-19 21:13:21 -05:00
parent 1616cc0e82
commit b9dde98d1e
1 changed files with 5 additions and 3 deletions

View File

@ -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