From c7c9e37a573ca8a4e1d89643589326913eb96a24 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Tue, 28 Jan 2025 18:44:06 -0300 Subject: [PATCH] undo --- examples/derivs/__init__.py | 0 examples/{ => derivs}/max_pain.py | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 examples/derivs/__init__.py rename examples/{ => derivs}/max_pain.py (90%) diff --git a/examples/derivs/__init__.py b/examples/derivs/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/examples/max_pain.py b/examples/derivs/max_pain.py similarity index 90% rename from examples/max_pain.py rename to examples/derivs/max_pain.py index 7aef9581..03232397 100644 --- a/examples/max_pain.py +++ b/examples/derivs/max_pain.py @@ -23,7 +23,21 @@ def check_if_complete( async def max_pain_daemon( ) -> None: - expiry_date: str = input('Please enter a valid expiration date (7feb25): ').upper() + oi_by_strikes: dict[str, dict[str, Decimal | None]] + expiry_dates: list[str] + currency: str = 'btc' + kind: str = 'option' + + async with get_client( + ) as client: + expiry_dates: list[str] = await client.get_expiration_dates( + currency=currency, + kind=kind + ) + + print(f'Available expiration dates for {currency}-{kind}:') + print(f'{expiry_dates}') + expiry_date: str = input('Please enter a valid expiration date: ').upper() print('Starting little daemon...') instruments: list[Symbol] = [] oi_by_strikes: dict[str, dict[str, Decimal]]