This commit is contained in:
Oleg Sheynin
2025-07-23 02:56:00 +00:00
parent b7292c11f3
commit e0138907be
4 changed files with 461 additions and 609 deletions
+2 -7
View File
@@ -42,16 +42,11 @@ def load_market_data(datafile: str, config: Dict) -> pd.DataFrame:
'"' + config["instrument_id_pfx"] + instrument + '"'
for instrument in config["instruments"]
]
security_type = config["security_type"]
exchange_id = config["exchange_id"]
query = "select"
if security_type == "CRYPTO":
query += " strftime('%Y-%m-%d %H:%M:%S', tstamp_ns/1000000000, 'unixepoch') as tstamp"
query += ", tstamp as time_ns"
else:
query += " tstamp"
query += ", tstamp_ns as time_ns"
query += " tstamp"
query += ", tstamp_ns as time_ns"
query += f", substr(instrument_id, {len(config['instrument_id_pfx']) + 1}) as symbol"
query += ", open"