aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/book_bbg.py10
-rw-r--r--sql/dawn.sql2
2 files changed, 10 insertions, 2 deletions
diff --git a/python/book_bbg.py b/python/book_bbg.py
index 82177e75..3ba4179b 100644
--- a/python/book_bbg.py
+++ b/python/book_bbg.py
@@ -77,7 +77,7 @@ class Bbg:
@staticmethod
def get_bbg_id(s):
- if m := re.match("(CDX|BOND)(?:BLOCK)?-[^_]*_([^$]*)", s):
+ if m := re.match("(CDX|BOND|IRS)(?:BLOCK)?-[^_]*_([^$]*)", s):
return m.groups()
if "DEAL" in s:
return "FX", s.split("_")[3]
@@ -112,6 +112,14 @@ class BondTicket(Bbg, ticket_type="BOND"):
return BondDeal if row["Side"] in ("B", "S") else IRSDeal
+class IRSTicket(Bbg, ticket_type="IRS"):
+ _sql_insert = f"INSERT INTO irs_tickets VALUES({','.join(['%s'] * 24)})"
+
+ @staticmethod
+ def trade_class(row):
+ return IRSDeal
+
+
class CDSTicket(Bbg, ticket_type="CDX"):
_sql_insert = f"INSERT INTO cds_tickets VALUES({','.join(['%s'] * 22)})"
diff --git a/sql/dawn.sql b/sql/dawn.sql
index b6b7e71f..e75a1b48 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -4246,5 +4246,5 @@ CREATE TABLE irs_tickets (
cclear_usiuti text NULL,
"cclear_usiuti.1" text NULL,
account text NULL,
- client_fcm float8 NULL
+ client_fcm text NULL
); \ No newline at end of file