diff options
Diffstat (limited to 'python/book_bbg.py')
| -rw-r--r-- | python/book_bbg.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/book_bbg.py b/python/book_bbg.py index fae9dd97..831592a9 100644 --- a/python/book_bbg.py +++ b/python/book_bbg.py @@ -1,5 +1,5 @@ from serenitas.utils.remote import SftpClient -from trade_dataclasses import Deal, DealType, BbgDeal +from trade_dataclasses import Deal, DealType, BbgDeal, FxswapDeal from stat import S_ISREG import re import time @@ -17,6 +17,9 @@ def run(): with sftp.client.open(f.filename) as fh: Deal[DealType(deal_type)].process(fh, bbg_id) BbgDeal._cache[bbg_id] = None + elif 'DEAL' in f.filename: + with sftp.client.open(f.filename) as fh: + FxswapDeal.process(fh, f.filename.split('_')[3]) except OSError: sftp.client.close() sftp = SftpClient.from_creds("bbg") |
