diff options
Diffstat (limited to 'python/markit_red.py')
| -rw-r--r-- | python/markit_red.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/markit_red.py b/python/markit_red.py index 831ba90b..0cc3d5b2 100644 --- a/python/markit_red.py +++ b/python/markit_red.py @@ -24,7 +24,12 @@ def request_payload(payload): return res def download_report(report): - version = 11 if 'Entity' in report else 10 + if "Entity" in report: + version = 11 + elif "RED" in report: + version= 9 + else: + version = 10 payload = {'user': 'GuillaumeHorel', 'password': 'password', 'version': version, @@ -66,7 +71,7 @@ def update_redindices(fname): headers = ['referenceentity', 'redentitycode', 'role', 'redpaircode', 'jurisdiction', 'tier', 'pairiscurrent', 'pairvalidto', 'pairvalidfrom', 'ticker', 'ispreferred', 'isdatransactiontype', 'docclause', 'recorddate', - 'publiccomments', 'weight'] + 'publiccomments', 'weight', 'holdco', 'subordinationtype'] for c in root.findall('index'): names = [c.find(tag).text for tag in ['indexsubfamily', 'series', 'version']] with open( basedir / "RED_indices" / "{0}.{1}.V{2}.csv".format(*names), "w") as fh2: |
