From 4ccda643b83d39af6717209cf10b5813dda65f58 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Fri, 29 Nov 2024 10:39:48 -0300 Subject: [PATCH] Update api.py covers cases when option_type comes as PUT or P, same with calls CALL or C --- piker/brokers/deribit/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index 420fd101..e3c52f28 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -153,9 +153,9 @@ def piker_sym_to_cb_sym(name: str) -> Symbol: new_expiry_date = get_timestamp_int(expiry_date) quote: str = base - if option_type == 'P': + if option_type == 'P' or option_type == 'PUT': option_type = PUT - elif option_type == 'C': + elif option_type == 'C' or option_type == 'CALL': option_type = CALL else: raise Exception("Couldn\'t parse option type")