Symbol & data refactoring for Nautilus

This commit is contained in:
2026-04-01 00:59:13 -04:00
parent cd28e18e52
commit 93bc8a3a4f
55 changed files with 537 additions and 600 deletions

View File

@@ -23,7 +23,7 @@ python client.py
## What it does
1. Connects to Flink's client request endpoint (REQ/REP on port 5559)
2. Requests 1-hour OHLC candles for BINANCE:BTC/USDT
2. Requests 1-hour OHLC candles for BTC/USDT.BINANCE
3. Time range: January 1-7, 2026 (168 candles)
4. Waits for Flink to respond (up to 30 seconds)
5. Displays the response status and sample data

View File

@@ -32,7 +32,7 @@ class HistoryClient:
Request historical OHLC data via Relay.
Args:
ticker: Market identifier (e.g., "BINANCE:BTC/USDT")
ticker: Market identifier (e.g., "BTC/USDT.BINANCE")
start_time: Start timestamp in microseconds since epoch
end_time: End timestamp in microseconds since epoch
period_seconds: OHLC period in seconds (e.g., 3600 for 1h)
@@ -161,7 +161,7 @@ def main():
# Connect to Relay
client.connect()
# Request BINANCE:BTC/USDT 1h candles for first 7 days of January 2026
# Request BTC/USDT.BINANCE 1h candles for first 7 days of January 2026
# January 1, 2026 00:00:00 UTC = 1735689600 seconds = 1735689600000000 microseconds
# January 7, 2026 23:59:59 UTC = 1736294399 seconds = 1736294399000000 microseconds
@@ -169,7 +169,7 @@ def main():
end_time_us = 1736294399 * 1_000_000 # Jan 7, 2026 23:59:59 UTC
response = client.request_historical_ohlc(
ticker='BINANCE:BTC/USDT',
ticker='BTC/USDT.BINANCE',
start_time=start_time_us,
end_time=end_time_us,
period_seconds=3600, # 1 hour

View File

@@ -56,7 +56,7 @@ class AsyncHistoryClient:
3. Query Iceberg with the table information (or notification includes data)
Args:
ticker: Market identifier (e.g., "BINANCE:BTC/USDT")
ticker: Market identifier (e.g., "BTC/USDT.BINANCE")
start_time: Start timestamp in microseconds since epoch
end_time: End timestamp in microseconds since epoch
period_seconds: OHLC period in seconds (e.g., 3600 for 1h)
@@ -263,12 +263,12 @@ def main():
# Connect
client.connect()
# Request BINANCE:BTC/USDT 1h candles for first 7 days of January 2026
# Request BTC/USDT.BINANCE 1h candles for first 7 days of January 2026
start_time_us = 1735689600 * 1_000_000 # Jan 1, 2026 00:00:00 UTC
end_time_us = 1736294399 * 1_000_000 # Jan 7, 2026 23:59:59 UTC
notification = client.request_historical_ohlc(
ticker='BINANCE:BTC/USDT',
ticker='BTC/USDT.BINANCE',
start_time=start_time_us,
end_time=end_time_us,
period_seconds=3600, # 1 hour

View File

@@ -39,7 +39,7 @@ async def main():
print("✅ Client started\n")
# Request parameters
ticker = "BINANCE:BTC/USDT"
ticker = "BTC/USDT.BINANCE"
period_seconds = 3600 # 1-hour candles
# Request 7 days of data (Jan 1-7, 2026)