aboutsummaryrefslogtreecommitdiffstats
path: root/python/markit/loans.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/markit/loans.py')
-rw-r--r--python/markit/loans.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/markit/loans.py b/python/markit/loans.py
index 5eae5334..f4fa4a21 100644
--- a/python/markit/loans.py
+++ b/python/markit/loans.py
@@ -20,6 +20,19 @@ def download_facility(workdate, payload):
fh.write(r.content)
+def download_recupdates(workdate, payload):
+ r = requests.post(
+ "https://loans.markit.com/loanx/LoanXRecUpdates.csv", params=payload
+ )
+ facility_rec_update = os.path.join(
+ os.environ["DATA_DIR"],
+ "Facility files",
+ "facility_rec_{0}.csv".format(workdate),
+ )
+ with open(facility_rec_update, "wb") as fh:
+ fh.write(r.content)
+
+
@with_connection("etdb")
def insert_facility(conn, workdate):
facility_filename = os.path.join(