Symbol & data refactoring for Nautilus
This commit is contained in:
@@ -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