backend redesign

This commit is contained in:
2026-03-11 18:47:11 -04:00
parent 8ff277c8c6
commit e99ef5d2dd
210 changed files with 12147 additions and 155 deletions

61
protobuf/ohlc.proto Normal file
View File

@@ -0,0 +1,61 @@
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.dexorder.proto";
// Single OHLC row
message OHLC {
// Timestamp in microseconds since epoch
uint64 timestamp = 1;
// The prices and volumes must be adjusted by the rational denominator provided
// by the market metadata
int64 open = 2;
int64 high = 3;
int64 low = 4;
int64 close = 5;
optional int64 volume = 6;
optional int64 buy_vol = 7;
optional int64 sell_vol = 8;
optional int64 open_time = 9;
optional int64 high_time = 10;
optional int64 low_time = 11;
optional int64 close_time = 12;
optional int64 open_interest = 13;
string ticker = 14;
}
// Batch of OHLC rows with metadata for historical request tracking
// Used for Kafka messages from ingestor → Flink
message OHLCBatch {
// Metadata for tracking this request through the pipeline
OHLCBatchMetadata metadata = 1;
// OHLC rows in this batch
repeated OHLC rows = 2;
}
// Metadata for tracking historical data requests through the pipeline
message OHLCBatchMetadata {
// Request ID from client
string request_id = 1;
// Optional client ID for notification routing
optional string client_id = 2;
// Market identifier
string ticker = 3;
// OHLC period in seconds
uint32 period_seconds = 4;
// Time range requested (microseconds since epoch)
uint64 start_time = 5;
uint64 end_time = 6;
// Status for marker messages (OK, NOT_FOUND, ERROR)
string status = 7;
// Error message if status is ERROR
optional string error_message = 8;
}