Symbol & data refactoring for Nautilus
This commit is contained in:
@@ -77,7 +77,7 @@ The relay acts as a well-known bind point for all components:
|
||||
```
|
||||
1. Client subscribes to ticker
|
||||
Socket: SUB → XPUB (5558)
|
||||
Topic: "BINANCE:BTC/USDT|tick"
|
||||
Topic: "BTC/USDT.BINANCE|tick"
|
||||
|
||||
2. Relay forwards subscription
|
||||
Socket: XSUB → Flink PUB (5557)
|
||||
|
||||
@@ -205,13 +205,13 @@ impl Relay {
|
||||
info!("Handling request submission: request_id={}, ticker={}, client_id={:?}",
|
||||
request_id, ticker, client_id);
|
||||
|
||||
// Extract exchange prefix from ticker
|
||||
let exchange_prefix = ticker.split(':').next()
|
||||
.map(|s| format!("{}:", s))
|
||||
// Extract exchange suffix from ticker (Nautilus format: "BTC/USDT.BINANCE")
|
||||
let exchange_prefix = ticker.rsplitn(2, '.').next()
|
||||
.map(|s| format!("{}.", s))
|
||||
.unwrap_or_else(|| String::from(""));
|
||||
|
||||
if exchange_prefix.is_empty() {
|
||||
warn!("Ticker '{}' missing exchange prefix", ticker);
|
||||
warn!("Ticker '{}' missing exchange suffix", ticker);
|
||||
}
|
||||
|
||||
// Build DataRequest protobuf for ingestors
|
||||
|
||||
Reference in New Issue
Block a user