aboutsummaryrefslogtreecommitdiffstats
path: root/python/api_quotes/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/api_quotes/__main__.py')
-rw-r--r--python/api_quotes/__main__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/api_quotes/__main__.py b/python/api_quotes/__main__.py
index d75f7ca9..e50bfdf6 100644
--- a/python/api_quotes/__main__.py
+++ b/python/api_quotes/__main__.py
@@ -20,7 +20,7 @@ def process_asset_class(asset_class, start_from, end):
try:
if data := MarkitAPI.get_data(asset_class, start_from):
for (quoteid, receiveddatetime), quotes in data:
- if end and (receiveddatetime < end):
+ if end and (receiveddatetime > end):
return
quotes = list(quotes)
# Don't try to insert into DB if already uploaded
@@ -74,15 +74,15 @@ if __name__ == "__main__":
args = parser.parse_args()
with concurrent.futures.ThreadPoolExecutor() as executor:
start = (
- int((args.start_from + datetime.timedelta(days=1)).strftime("%s")) * 1000
+ int((args.start_from - datetime.timedelta(days=1)).strftime("%s")) * 1000
)
- end = int((args.start_from - bus_day * 1).strftime("%s")) * 1000
+ end = int((args.start_from + bus_day * 1).strftime("%s")) * 1000
futures = [
executor.submit(
process_asset_class,
asset_class,
- start,
- end if not args.backfill else None,
+ start if not args.backfill else None,
+ end,
)
for asset_class in ["ABS", "CD", "TRS"]
]