From 2e201159d806bebd4ca1cff4620b044a0e728b16 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sat, 4 Jun 2022 12:09:38 -0400 Subject: [PATCH] refactor: Move BinanceDepthStreamParams into own file --- .../api/md/binance/BinanceDepthStreamParams.proto | 15 +++++++++++++++ .../BinanceMarketDataSubscriptionParams.proto | 11 +---------- 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 src/lib/api/md/binance/BinanceDepthStreamParams.proto diff --git a/src/lib/api/md/binance/BinanceDepthStreamParams.proto b/src/lib/api/md/binance/BinanceDepthStreamParams.proto new file mode 100644 index 000000000..fd15f099d --- /dev/null +++ b/src/lib/api/md/binance/BinanceDepthStreamParams.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +import "lib/api/io/URL.proto"; + +package bts.api.md.binance; + +message BinanceDepthStreamParams { + bts.api.io.URL stream_url = 1; + bts.api.io.URL snapshot_url = 2; + repeated string symbols = 3; + // The number of book levels to observe. At the time of writing this comment, + // valid values are 1, 5, 10, 100, 1000, or unlimited (represented by 0). + // Check the binance api docs for updates. + uint32 num_levels = 4; +} diff --git a/src/lib/api/md/binance/BinanceMarketDataSubscriptionParams.proto b/src/lib/api/md/binance/BinanceMarketDataSubscriptionParams.proto index 771c697f6..d7355a828 100644 --- a/src/lib/api/md/binance/BinanceMarketDataSubscriptionParams.proto +++ b/src/lib/api/md/binance/BinanceMarketDataSubscriptionParams.proto @@ -1,19 +1,10 @@ syntax = "proto3"; import "lib/api/io/URL.proto"; +import "lib/api/md/binance/BinanceDepthStreamParams.proto"; package bts.api.md.binance; -message BinanceDepthStreamParams { - bts.api.io.URL stream_url = 1; - bts.api.io.URL snapshot_url = 2; - repeated string symbols = 3; - // The number of book levels to observe. At the time of writing this comment, - // valid values are 1, 5, 10, 100, 1000, or unlimited (represented by 0). - // Check the binance api docs for updates. - uint32 num_levels = 4; -} - message BinanceMarketDataSubscriptionParams { repeated BinanceDepthStreamParams depth_streams = 2; }