From d8361260a0250774b5822fcf927ddaff06905feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=82=8B=E3=81=BF?= Date: Tue, 12 Apr 2022 22:25:48 +0800 Subject: [PATCH] grpc: add start/end time to fix queryklines --- pkg/grpc/server.go | 12 +++ pkg/pb/bbgo.pb.go | 210 ++++++++++++++++++++++++--------------------- pkg/pb/bbgo.proto | 5 +- python/bbgo_pb2.py | 117 ++++++++++++------------- 4 files changed, 184 insertions(+), 160 deletions(-) diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go index 6854b26e0..2563d2669 100644 --- a/pkg/grpc/server.go +++ b/pkg/grpc/server.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net" + "time" "github.com/pkg/errors" log "github.com/sirupsen/logrus" @@ -113,6 +114,17 @@ func (s *Server) QueryKLines(ctx context.Context, request *pb.QueryKLinesRequest Limit: int(request.Limit), } + endTime := time.Now() + if request.EndTime != 0 { + endTime = time.Unix(request.EndTime, 0) + } + options.EndTime = &endTime + + if request.StartTime != 0 { + startTime := time.Unix(request.StartTime, 0) + options.StartTime = &startTime + } + klines, err := session.Exchange.QueryKLines(ctx, request.Symbol, types.Interval(request.Interval), options) if err != nil { return nil, err diff --git a/pkg/pb/bbgo.pb.go b/pkg/pb/bbgo.pb.go index 47cfe24e5..775924f34 100644 --- a/pkg/pb/bbgo.pb.go +++ b/pkg/pb/bbgo.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.19.3 +// protoc-gen-go v1.28.0 +// protoc v3.19.4 // source: pkg/pb/bbgo.proto package pb @@ -2000,8 +2000,9 @@ type QueryKLinesRequest struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Interval string `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"` // time period of K line in minute - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Limit int64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` + StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + EndTime int64 `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + Limit int64 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` } func (x *QueryKLinesRequest) Reset() { @@ -2057,9 +2058,16 @@ func (x *QueryKLinesRequest) GetInterval() string { return "" } -func (x *QueryKLinesRequest) GetTimestamp() int64 { +func (x *QueryKLinesRequest) GetStartTime() int64 { if x != nil { - return x.Timestamp + return x.StartTime + } + return 0 +} + +func (x *QueryKLinesRequest) GetEndTime() int64 { + if x != nil { + return x.EndTime } return 0 } @@ -2482,106 +2490,108 @@ var file_pkg_pb_bbgo_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x98, 0x01, 0x0a, 0x12, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xb4, 0x01, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, - 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, - 0x06, 0x6b, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x6b, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x9a, 0x02, 0x0a, 0x05, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x6f, 0x70, 0x65, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x04, 0x68, 0x69, 0x67, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x71, 0x75, 0x6f, - 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x2a, 0xe4, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x42, - 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x53, - 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, - 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, - 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, - 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x12, - 0x0a, 0x0e, 0x54, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, - 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, - 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, - 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0b, 0x12, 0x09, - 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x63, 0x2a, 0x3f, 0x0a, 0x07, 0x43, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x54, 0x52, 0x41, 0x44, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x49, 0x43, - 0x4b, 0x45, 0x52, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x03, 0x12, - 0x09, 0x0a, 0x05, 0x4b, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x04, 0x2a, 0x19, 0x0a, 0x04, 0x53, 0x69, - 0x64, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x55, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, - 0x45, 0x4c, 0x4c, 0x10, 0x01, 0x2a, 0x61, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x4f, - 0x50, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, - 0x4f, 0x50, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x4f, - 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4f, 0x43, - 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x05, 0x32, 0x9b, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, - 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x16, 0x2e, 0x62, 0x62, - 0x67, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x44, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x18, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x50, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x11, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0b, - 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x62, 0x62, - 0x67, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x32, 0xeb, 0x02, 0x0a, 0x0e, 0x54, 0x72, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x62, 0x62, 0x67, - 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x12, 0x18, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, - 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x62, 0x62, 0x67, 0x6f, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x44, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, - 0x18, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x22, 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x6b, 0x6c, 0x69, + 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x62, 0x67, 0x6f, + 0x2e, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x6b, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x21, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x9a, 0x02, 0x0a, 0x05, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x68, 0x69, 0x67, + 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, + 0x6c, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x2a, 0xe4, + 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, + 0x42, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x53, 0x55, 0x42, 0x53, 0x43, + 0x52, 0x49, 0x42, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4e, 0x41, 0x50, 0x53, + 0x48, 0x4f, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, + 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x4e, + 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x52, 0x44, 0x45, + 0x52, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x52, + 0x41, 0x44, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x08, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x09, + 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x4e, 0x41, 0x50, + 0x53, 0x48, 0x4f, 0x54, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x63, 0x2a, 0x3f, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, + 0x41, 0x44, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x10, + 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x4b, + 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x04, 0x2a, 0x19, 0x0a, 0x04, 0x53, 0x69, 0x64, 0x65, 0x12, 0x07, + 0x0a, 0x03, 0x42, 0x55, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4c, 0x4c, 0x10, + 0x01, 0x2a, 0x61, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x49, + 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4d, 0x41, + 0x52, 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4c, + 0x49, 0x4d, 0x49, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x4f, + 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4f, 0x43, 0x5f, 0x4c, 0x49, 0x4d, + 0x49, 0x54, 0x10, 0x05, 0x32, 0x9b, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x16, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x0b, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x62, 0x62, + 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4b, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x32, 0x50, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0b, 0x2e, 0x62, 0x62, 0x67, + 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x32, 0xeb, 0x02, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, + 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x62, + 0x62, 0x67, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x17, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x62, 0x67, + 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0b, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x62, 0x62, + 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x62, 0x67, 0x6f, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/pb/bbgo.proto b/pkg/pb/bbgo.proto index ca03361c1..95cdaeb63 100644 --- a/pkg/pb/bbgo.proto +++ b/pkg/pb/bbgo.proto @@ -245,8 +245,9 @@ message QueryKLinesRequest { string exchange = 1; string symbol = 2; string interval = 3; // time period of K line in minute - int64 timestamp = 4; - int64 limit = 5; + int64 start_time = 4; + int64 end_time = 5; + int64 limit = 6; } message QueryKLinesResponse { diff --git a/python/bbgo_pb2.py b/python/bbgo_pb2.py index 7f5b108c9..724b96efc 100644 --- a/python/bbgo_pb2.py +++ b/python/bbgo_pb2.py @@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nbbgo.proto\x12\x04\x62\x62go\"\x07\n\x05\x45mpty\"2\n\x05\x45rror\x12\x12\n\nerror_code\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t\"=\n\x10SubscribeRequest\x12)\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x12.bbgo.Subscription\"_\n\x0cSubscription\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x1e\n\x07\x63hannel\x18\x02 \x01(\x0e\x32\r.bbgo.Channel\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\x03\"\xb9\x02\n\x11SubscribeResponse\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x1e\n\x07\x63hannel\x18\x03 \x01(\x0e\x32\r.bbgo.Channel\x12\x1a\n\x05\x65vent\x18\x04 \x01(\x0e\x32\x0b.bbgo.Event\x12\x1a\n\x05\x64\x65pth\x18\x05 \x01(\x0b\x32\x0b.bbgo.Depth\x12\x1b\n\x06trades\x18\x06 \x03(\x0b\x32\x0b.bbgo.Trade\x12\x1c\n\x06ticker\x18\x07 \x01(\x0b\x32\x0c.bbgo.Ticker\x12\x1b\n\x06orders\x18\x08 \x03(\x0b\x32\x0b.bbgo.Order\x12\x1f\n\x08\x62\x61lances\x18\t \x03(\x0b\x32\r.bbgo.Balance\x12\x15\n\rsubscribed_at\x18\n \x01(\x03\x12\x1a\n\x05\x65rror\x18\x0b \x01(\x0b\x32\x0b.bbgo.Error\"k\n\x05\x44\x65pth\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x1f\n\x04\x61sks\x18\x03 \x03(\x0b\x32\x11.bbgo.PriceVolume\x12\x1f\n\x04\x62ids\x18\x04 \x03(\x0b\x32\x11.bbgo.PriceVolume\",\n\x0bPriceVolume\x12\r\n\x05price\x18\x01 \x01(\x03\x12\x0e\n\x06volume\x18\x02 \x01(\x03\"\xc3\x01\n\x05Trade\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\r\n\x05price\x18\x04 \x01(\x01\x12\x0e\n\x06volume\x18\x05 \x01(\x01\x12\x12\n\ncreated_at\x18\x06 \x01(\x03\x12\x18\n\x04side\x18\x07 \x01(\x0e\x32\n.bbgo.Side\x12\x0b\n\x03\x66\x65\x65\x18\x08 \x01(\x01\x12\x14\n\x0c\x66\x65\x65_currency\x18\t \x01(\t\x12\r\n\x05maker\x18\n \x01(\x08\x12\r\n\x05trend\x18\x0b \x01(\t\"r\n\x06Ticker\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x0c\n\x04open\x18\x03 \x01(\x01\x12\x0c\n\x04high\x18\x04 \x01(\x01\x12\x0b\n\x03low\x18\x05 \x01(\x01\x12\r\n\x05\x63lose\x18\x06 \x01(\x01\x12\x0e\n\x06volume\x18\x07 \x01(\x01\"\xba\x02\n\x05Order\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\x18\n\x04side\x18\x04 \x01(\x0e\x32\n.bbgo.Side\x12#\n\norder_type\x18\x05 \x01(\x0e\x32\x0f.bbgo.OrderType\x12\r\n\x05price\x18\x06 \x01(\x01\x12\x12\n\nstop_price\x18\x07 \x01(\x01\x12\x11\n\tavg_price\x18\x08 \x01(\x01\x12\x0e\n\x06status\x18\t \x01(\t\x12\x12\n\ncreated_at\x18\n \x01(\x03\x12\x10\n\x08quantity\x18\x0b \x01(\x01\x12\x17\n\x0f\x65xecuted_volume\x18\x0c \x01(\x01\x12\x14\n\x0ctrades_count\x18\r \x01(\x03\x12\x17\n\x0f\x63lient_order_id\x18\x0e \x01(\t\x12\x10\n\x08group_id\x18\x0f \x01(\x03\"\xce\x01\n\x0bSubmitOrder\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x18\n\x04side\x18\x03 \x01(\x0e\x32\n.bbgo.Side\x12\x10\n\x08quantity\x18\x04 \x01(\x01\x12\r\n\x05price\x18\x05 \x01(\x01\x12\x12\n\nstop_price\x18\x06 \x01(\x01\x12#\n\norder_type\x18\x07 \x01(\x0e\x32\x0f.bbgo.OrderType\x12\x17\n\x0f\x63lient_order_id\x18\x08 \x01(\t\x12\x10\n\x08group_id\x18\t \x01(\x03\"P\n\x07\x42\x61lance\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x10\n\x08\x63urrency\x18\x02 \x01(\t\x12\x11\n\tavailable\x18\x03 \x01(\x01\x12\x0e\n\x06locked\x18\x04 \x01(\x01\"=\n\x12SubmitOrderRequest\x12\'\n\x0csubmit_order\x18\x01 \x01(\x0b\x32\x11.bbgo.SubmitOrder\"M\n\x13SubmitOrderResponse\x12\x1a\n\x05order\x18\x01 \x01(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"K\n\x12\x43\x61ncelOrderRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x17\n\x0f\x63lient_order_id\x18\x03 \x01(\t\"M\n\x13\x43\x61ncelOrderResponse\x12\x1a\n\x05order\x18\x01 \x01(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"J\n\x11QueryOrderRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x17\n\x0f\x63lient_order_id\x18\x03 \x01(\t\"L\n\x12QueryOrderResponse\x12\x1a\n\x05order\x18\x01 \x01(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"\xaa\x01\n\x12QueryOrdersRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x03(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x10\n\x08group_id\x18\x05 \x01(\x03\x12\x12\n\npagination\x18\x06 \x01(\x08\x12\x0c\n\x04page\x18\x07 \x01(\x03\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x0e\n\x06offset\x18\t \x01(\x03\"N\n\x13QueryOrdersResponse\x12\x1b\n\x06orders\x18\x01 \x03(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"\xb6\x01\n\x12QueryTradesRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x03\x12\x0c\n\x04\x66rom\x18\x04 \x01(\x03\x12\n\n\x02to\x18\x05 \x01(\x03\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x12\n\npagination\x18\x07 \x01(\x08\x12\x0c\n\x04page\x18\x08 \x01(\x03\x12\r\n\x05limit\x18\t \x01(\x03\x12\x0e\n\x06offset\x18\n \x01(\x03\"N\n\x13QueryTradesResponse\x12\x1b\n\x06trades\x18\x01 \x03(\x0b\x32\x0b.bbgo.Trade\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"j\n\x12QueryKLinesRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x10\n\x08interval\x18\x03 \x01(\t\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12\r\n\x05limit\x18\x05 \x01(\x03\"N\n\x13QueryKLinesResponse\x12\x1b\n\x06klines\x18\x01 \x03(\x0b\x32\x0b.bbgo.KLine\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"\x9a\x01\n\x05KLine\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x03\x12\x0c\n\x04open\x18\x04 \x01(\x01\x12\x0c\n\x04high\x18\x05 \x01(\x01\x12\x0b\n\x03low\x18\x06 \x01(\x01\x12\r\n\x05\x63lose\x18\x07 \x01(\x01\x12\x0e\n\x06volume\x18\x08 \x01(\x01\x12\x14\n\x0cquote_volume\x18\t \x01(\x01*\xe4\x01\n\x05\x45vent\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0e\n\nSUBSCRIBED\x10\x01\x12\x10\n\x0cUNSUBSCRIBED\x10\x02\x12\x0c\n\x08SNAPSHOT\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\x11\n\rAUTHENTICATED\x10\x05\x12\x12\n\x0eORDER_SNAPSHOT\x10\x06\x12\x10\n\x0cORDER_UPDATE\x10\x07\x12\x12\n\x0eTRADE_SNAPSHOT\x10\x08\x12\x10\n\x0cTRADE_UPDATE\x10\t\x12\x14\n\x10\x41\x43\x43OUNT_SNAPSHOT\x10\n\x12\x12\n\x0e\x41\x43\x43OUNT_UPDATE\x10\x0b\x12\t\n\x05\x45RROR\x10\x63*4\n\x07\x43hannel\x12\x08\n\x04\x42OOK\x10\x00\x12\t\n\x05TRADE\x10\x01\x12\n\n\x06TICKER\x10\x02\x12\x08\n\x04USER\x10\x03*\x19\n\x04Side\x12\x07\n\x03\x42UY\x10\x00\x12\x08\n\x04SELL\x10\x01*a\n\tOrderType\x12\n\n\x06MARKET\x10\x00\x12\t\n\x05LIMIT\x10\x01\x12\x0f\n\x0bSTOP_MARKET\x10\x02\x12\x0e\n\nSTOP_LIMIT\x10\x03\x12\r\n\tPOST_ONLY\x10\x04\x12\r\n\tIOC_LIMIT\x10\x05\x32\x9b\x01\n\x11MarketDataService\x12@\n\tSubscribe\x12\x16.bbgo.SubscribeRequest\x1a\x17.bbgo.SubscribeResponse\"\x00\x30\x01\x12\x44\n\x0bQueryKLines\x12\x18.bbgo.QueryKLinesRequest\x1a\x19.bbgo.QueryKLinesResponse\"\x00\x32P\n\x0fUserDataService\x12=\n\x11SubscribeUserData\x12\x0b.bbgo.Empty\x1a\x17.bbgo.SubscribeResponse\"\x00\x30\x01\x32\xeb\x02\n\x0eTradingService\x12\x44\n\x0bSubmitOrder\x12\x18.bbgo.SubmitOrderRequest\x1a\x19.bbgo.SubmitOrderResponse\"\x00\x12\x44\n\x0b\x43\x61ncelOrder\x12\x18.bbgo.CancelOrderRequest\x1a\x19.bbgo.CancelOrderResponse\"\x00\x12\x41\n\nQueryOrder\x12\x17.bbgo.QueryOrderRequest\x1a\x18.bbgo.QueryOrderResponse\"\x00\x12\x44\n\x0bQueryOrders\x12\x18.bbgo.QueryOrdersRequest\x1a\x19.bbgo.QueryOrdersResponse\"\x00\x12\x44\n\x0bQueryTrades\x12\x18.bbgo.QueryTradesRequest\x1a\x19.bbgo.QueryTradesResponse\"\x00\x42\x07Z\x05../pbb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nbbgo.proto\x12\x04\x62\x62go\"\x07\n\x05\x45mpty\"2\n\x05\x45rror\x12\x12\n\nerror_code\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t\"=\n\x10SubscribeRequest\x12)\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x12.bbgo.Subscription\"q\n\x0cSubscription\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x1e\n\x07\x63hannel\x18\x02 \x01(\x0e\x32\r.bbgo.Channel\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\t\x12\x10\n\x08interval\x18\x05 \x01(\t\"\xe6\x02\n\x11SubscribeResponse\x12\x0f\n\x07session\x18\x01 \x01(\t\x12\x10\n\x08\x65xchange\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x1e\n\x07\x63hannel\x18\x04 \x01(\x0e\x32\r.bbgo.Channel\x12\x1a\n\x05\x65vent\x18\x05 \x01(\x0e\x32\x0b.bbgo.Event\x12\x1a\n\x05\x64\x65pth\x18\x06 \x01(\x0b\x32\x0b.bbgo.Depth\x12\x1a\n\x05kline\x18\x07 \x01(\x0b\x32\x0b.bbgo.KLine\x12\x1b\n\x06trades\x18\x08 \x03(\x0b\x32\x0b.bbgo.Trade\x12\x1c\n\x06ticker\x18\t \x01(\x0b\x32\x0c.bbgo.Ticker\x12\x1b\n\x06orders\x18\n \x03(\x0b\x32\x0b.bbgo.Order\x12\x1f\n\x08\x62\x61lances\x18\x0b \x03(\x0b\x32\r.bbgo.Balance\x12\x15\n\rsubscribed_at\x18\x0c \x01(\x03\x12\x1a\n\x05\x65rror\x18\r \x01(\x0b\x32\x0b.bbgo.Error\"k\n\x05\x44\x65pth\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x1f\n\x04\x61sks\x18\x03 \x03(\x0b\x32\x11.bbgo.PriceVolume\x12\x1f\n\x04\x62ids\x18\x04 \x03(\x0b\x32\x11.bbgo.PriceVolume\",\n\x0bPriceVolume\x12\r\n\x05price\x18\x01 \x01(\t\x12\x0e\n\x06volume\x18\x02 \x01(\t\"\xc3\x01\n\x05Trade\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\r\n\x05price\x18\x04 \x01(\x01\x12\x0e\n\x06volume\x18\x05 \x01(\x01\x12\x12\n\ncreated_at\x18\x06 \x01(\x03\x12\x18\n\x04side\x18\x07 \x01(\x0e\x32\n.bbgo.Side\x12\x0b\n\x03\x66\x65\x65\x18\x08 \x01(\x01\x12\x14\n\x0c\x66\x65\x65_currency\x18\t \x01(\t\x12\r\n\x05maker\x18\n \x01(\x08\x12\r\n\x05trend\x18\x0b \x01(\t\"r\n\x06Ticker\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x0c\n\x04open\x18\x03 \x01(\x01\x12\x0c\n\x04high\x18\x04 \x01(\x01\x12\x0b\n\x03low\x18\x05 \x01(\x01\x12\r\n\x05\x63lose\x18\x06 \x01(\x01\x12\x0e\n\x06volume\x18\x07 \x01(\x01\"\xba\x02\n\x05Order\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\x18\n\x04side\x18\x04 \x01(\x0e\x32\n.bbgo.Side\x12#\n\norder_type\x18\x05 \x01(\x0e\x32\x0f.bbgo.OrderType\x12\r\n\x05price\x18\x06 \x01(\x01\x12\x12\n\nstop_price\x18\x07 \x01(\x01\x12\x11\n\tavg_price\x18\x08 \x01(\x01\x12\x0e\n\x06status\x18\t \x01(\t\x12\x12\n\ncreated_at\x18\n \x01(\x03\x12\x10\n\x08quantity\x18\x0b \x01(\x01\x12\x17\n\x0f\x65xecuted_volume\x18\x0c \x01(\x01\x12\x14\n\x0ctrades_count\x18\r \x01(\x03\x12\x17\n\x0f\x63lient_order_id\x18\x0e \x01(\t\x12\x10\n\x08group_id\x18\x0f \x01(\x03\"\xce\x01\n\x0bSubmitOrder\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x18\n\x04side\x18\x03 \x01(\x0e\x32\n.bbgo.Side\x12\x10\n\x08quantity\x18\x04 \x01(\x01\x12\r\n\x05price\x18\x05 \x01(\x01\x12\x12\n\nstop_price\x18\x06 \x01(\x01\x12#\n\norder_type\x18\x07 \x01(\x0e\x32\x0f.bbgo.OrderType\x12\x17\n\x0f\x63lient_order_id\x18\x08 \x01(\t\x12\x10\n\x08group_id\x18\t \x01(\x03\"P\n\x07\x42\x61lance\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x10\n\x08\x63urrency\x18\x02 \x01(\t\x12\x11\n\tavailable\x18\x03 \x01(\x01\x12\x0e\n\x06locked\x18\x04 \x01(\x01\"=\n\x12SubmitOrderRequest\x12\'\n\x0csubmit_order\x18\x01 \x01(\x0b\x32\x11.bbgo.SubmitOrder\"M\n\x13SubmitOrderResponse\x12\x1a\n\x05order\x18\x01 \x01(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"K\n\x12\x43\x61ncelOrderRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x17\n\x0f\x63lient_order_id\x18\x03 \x01(\t\"M\n\x13\x43\x61ncelOrderResponse\x12\x1a\n\x05order\x18\x01 \x01(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"J\n\x11QueryOrderRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x17\n\x0f\x63lient_order_id\x18\x03 \x01(\t\"L\n\x12QueryOrderResponse\x12\x1a\n\x05order\x18\x01 \x01(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"\xaa\x01\n\x12QueryOrdersRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x03(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x10\n\x08group_id\x18\x05 \x01(\x03\x12\x12\n\npagination\x18\x06 \x01(\x08\x12\x0c\n\x04page\x18\x07 \x01(\x03\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x0e\n\x06offset\x18\t \x01(\x03\"N\n\x13QueryOrdersResponse\x12\x1b\n\x06orders\x18\x01 \x03(\x0b\x32\x0b.bbgo.Order\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"\xb6\x01\n\x12QueryTradesRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x03\x12\x0c\n\x04\x66rom\x18\x04 \x01(\x03\x12\n\n\x02to\x18\x05 \x01(\x03\x12\x10\n\x08order_by\x18\x06 \x01(\t\x12\x12\n\npagination\x18\x07 \x01(\x08\x12\x0c\n\x04page\x18\x08 \x01(\x03\x12\r\n\x05limit\x18\t \x01(\x03\x12\x0e\n\x06offset\x18\n \x01(\x03\"N\n\x13QueryTradesResponse\x12\x1b\n\x06trades\x18\x01 \x03(\x0b\x32\x0b.bbgo.Trade\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"}\n\x12QueryKLinesRequest\x12\x10\n\x08\x65xchange\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x10\n\x08interval\x18\x03 \x01(\t\x12\x12\n\nstart_time\x18\x04 \x01(\x03\x12\x10\n\x08\x65nd_time\x18\x05 \x01(\x03\x12\r\n\x05limit\x18\x06 \x01(\x03\"N\n\x13QueryKLinesResponse\x12\x1b\n\x06klines\x18\x01 \x03(\x0b\x32\x0b.bbgo.KLine\x12\x1a\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.bbgo.Error\"\xbe\x01\n\x05KLine\x12\x0f\n\x07session\x18\x01 \x01(\t\x12\x10\n\x08\x65xchange\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x0c\n\x04open\x18\x04 \x01(\x01\x12\x0c\n\x04high\x18\x05 \x01(\x01\x12\x0b\n\x03low\x18\x06 \x01(\x01\x12\r\n\x05\x63lose\x18\x07 \x01(\x01\x12\x0e\n\x06volume\x18\x08 \x01(\x01\x12\x14\n\x0cquote_volume\x18\t \x01(\x01\x12\x12\n\nstart_time\x18\n \x01(\x03\x12\x10\n\x08\x65nd_time\x18\x0b \x01(\x03*\xe4\x01\n\x05\x45vent\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0e\n\nSUBSCRIBED\x10\x01\x12\x10\n\x0cUNSUBSCRIBED\x10\x02\x12\x0c\n\x08SNAPSHOT\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\x11\n\rAUTHENTICATED\x10\x05\x12\x12\n\x0eORDER_SNAPSHOT\x10\x06\x12\x10\n\x0cORDER_UPDATE\x10\x07\x12\x12\n\x0eTRADE_SNAPSHOT\x10\x08\x12\x10\n\x0cTRADE_UPDATE\x10\t\x12\x14\n\x10\x41\x43\x43OUNT_SNAPSHOT\x10\n\x12\x12\n\x0e\x41\x43\x43OUNT_UPDATE\x10\x0b\x12\t\n\x05\x45RROR\x10\x63*?\n\x07\x43hannel\x12\x08\n\x04\x42OOK\x10\x00\x12\t\n\x05TRADE\x10\x01\x12\n\n\x06TICKER\x10\x02\x12\x08\n\x04USER\x10\x03\x12\t\n\x05KLINE\x10\x04*\x19\n\x04Side\x12\x07\n\x03\x42UY\x10\x00\x12\x08\n\x04SELL\x10\x01*a\n\tOrderType\x12\n\n\x06MARKET\x10\x00\x12\t\n\x05LIMIT\x10\x01\x12\x0f\n\x0bSTOP_MARKET\x10\x02\x12\x0e\n\nSTOP_LIMIT\x10\x03\x12\r\n\tPOST_ONLY\x10\x04\x12\r\n\tIOC_LIMIT\x10\x05\x32\x9b\x01\n\x11MarketDataService\x12@\n\tSubscribe\x12\x16.bbgo.SubscribeRequest\x1a\x17.bbgo.SubscribeResponse\"\x00\x30\x01\x12\x44\n\x0bQueryKLines\x12\x18.bbgo.QueryKLinesRequest\x1a\x19.bbgo.QueryKLinesResponse\"\x00\x32P\n\x0fUserDataService\x12=\n\x11SubscribeUserData\x12\x0b.bbgo.Empty\x1a\x17.bbgo.SubscribeResponse\"\x00\x30\x01\x32\xeb\x02\n\x0eTradingService\x12\x44\n\x0bSubmitOrder\x12\x18.bbgo.SubmitOrderRequest\x1a\x19.bbgo.SubmitOrderResponse\"\x00\x12\x44\n\x0b\x43\x61ncelOrder\x12\x18.bbgo.CancelOrderRequest\x1a\x19.bbgo.CancelOrderResponse\"\x00\x12\x41\n\nQueryOrder\x12\x17.bbgo.QueryOrderRequest\x1a\x18.bbgo.QueryOrderResponse\"\x00\x12\x44\n\x0bQueryOrders\x12\x18.bbgo.QueryOrdersRequest\x1a\x19.bbgo.QueryOrdersResponse\"\x00\x12\x44\n\x0bQueryTrades\x12\x18.bbgo.QueryTradesRequest\x1a\x19.bbgo.QueryTradesResponse\"\x00\x42\x07Z\x05../pbb\x06proto3') _EVENT = DESCRIPTOR.enum_types_by_name['Event'] Event = enum_type_wrapper.EnumTypeWrapper(_EVENT) @@ -42,6 +42,7 @@ BOOK = 0 TRADE = 1 TICKER = 2 USER = 3 +KLINE = 4 BUY = 0 SELL = 1 MARKET = 0 @@ -259,14 +260,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'Z\005../pb' - _EVENT._serialized_start=2950 - _EVENT._serialized_end=3178 - _CHANNEL._serialized_start=3180 - _CHANNEL._serialized_end=3232 - _SIDE._serialized_start=3234 - _SIDE._serialized_end=3259 - _ORDERTYPE._serialized_start=3261 - _ORDERTYPE._serialized_end=3358 + _EVENT._serialized_start=3068 + _EVENT._serialized_end=3296 + _CHANNEL._serialized_start=3298 + _CHANNEL._serialized_end=3361 + _SIDE._serialized_start=3363 + _SIDE._serialized_end=3388 + _ORDERTYPE._serialized_start=3390 + _ORDERTYPE._serialized_end=3487 _EMPTY._serialized_start=20 _EMPTY._serialized_end=27 _ERROR._serialized_start=29 @@ -274,53 +275,53 @@ if _descriptor._USE_C_DESCRIPTORS == False: _SUBSCRIBEREQUEST._serialized_start=81 _SUBSCRIBEREQUEST._serialized_end=142 _SUBSCRIPTION._serialized_start=144 - _SUBSCRIPTION._serialized_end=239 - _SUBSCRIBERESPONSE._serialized_start=242 - _SUBSCRIBERESPONSE._serialized_end=555 - _DEPTH._serialized_start=557 - _DEPTH._serialized_end=664 - _PRICEVOLUME._serialized_start=666 - _PRICEVOLUME._serialized_end=710 - _TRADE._serialized_start=713 - _TRADE._serialized_end=908 - _TICKER._serialized_start=910 - _TICKER._serialized_end=1024 - _ORDER._serialized_start=1027 - _ORDER._serialized_end=1341 - _SUBMITORDER._serialized_start=1344 - _SUBMITORDER._serialized_end=1550 - _BALANCE._serialized_start=1552 - _BALANCE._serialized_end=1632 - _SUBMITORDERREQUEST._serialized_start=1634 - _SUBMITORDERREQUEST._serialized_end=1695 - _SUBMITORDERRESPONSE._serialized_start=1697 - _SUBMITORDERRESPONSE._serialized_end=1774 - _CANCELORDERREQUEST._serialized_start=1776 - _CANCELORDERREQUEST._serialized_end=1851 - _CANCELORDERRESPONSE._serialized_start=1853 - _CANCELORDERRESPONSE._serialized_end=1930 - _QUERYORDERREQUEST._serialized_start=1932 - _QUERYORDERREQUEST._serialized_end=2006 - _QUERYORDERRESPONSE._serialized_start=2008 - _QUERYORDERRESPONSE._serialized_end=2084 - _QUERYORDERSREQUEST._serialized_start=2087 - _QUERYORDERSREQUEST._serialized_end=2257 - _QUERYORDERSRESPONSE._serialized_start=2259 - _QUERYORDERSRESPONSE._serialized_end=2337 - _QUERYTRADESREQUEST._serialized_start=2340 - _QUERYTRADESREQUEST._serialized_end=2522 - _QUERYTRADESRESPONSE._serialized_start=2524 - _QUERYTRADESRESPONSE._serialized_end=2602 - _QUERYKLINESREQUEST._serialized_start=2604 - _QUERYKLINESREQUEST._serialized_end=2710 - _QUERYKLINESRESPONSE._serialized_start=2712 - _QUERYKLINESRESPONSE._serialized_end=2790 - _KLINE._serialized_start=2793 - _KLINE._serialized_end=2947 - _MARKETDATASERVICE._serialized_start=3361 - _MARKETDATASERVICE._serialized_end=3516 - _USERDATASERVICE._serialized_start=3518 - _USERDATASERVICE._serialized_end=3598 - _TRADINGSERVICE._serialized_start=3601 - _TRADINGSERVICE._serialized_end=3964 + _SUBSCRIPTION._serialized_end=257 + _SUBSCRIBERESPONSE._serialized_start=260 + _SUBSCRIBERESPONSE._serialized_end=618 + _DEPTH._serialized_start=620 + _DEPTH._serialized_end=727 + _PRICEVOLUME._serialized_start=729 + _PRICEVOLUME._serialized_end=773 + _TRADE._serialized_start=776 + _TRADE._serialized_end=971 + _TICKER._serialized_start=973 + _TICKER._serialized_end=1087 + _ORDER._serialized_start=1090 + _ORDER._serialized_end=1404 + _SUBMITORDER._serialized_start=1407 + _SUBMITORDER._serialized_end=1613 + _BALANCE._serialized_start=1615 + _BALANCE._serialized_end=1695 + _SUBMITORDERREQUEST._serialized_start=1697 + _SUBMITORDERREQUEST._serialized_end=1758 + _SUBMITORDERRESPONSE._serialized_start=1760 + _SUBMITORDERRESPONSE._serialized_end=1837 + _CANCELORDERREQUEST._serialized_start=1839 + _CANCELORDERREQUEST._serialized_end=1914 + _CANCELORDERRESPONSE._serialized_start=1916 + _CANCELORDERRESPONSE._serialized_end=1993 + _QUERYORDERREQUEST._serialized_start=1995 + _QUERYORDERREQUEST._serialized_end=2069 + _QUERYORDERRESPONSE._serialized_start=2071 + _QUERYORDERRESPONSE._serialized_end=2147 + _QUERYORDERSREQUEST._serialized_start=2150 + _QUERYORDERSREQUEST._serialized_end=2320 + _QUERYORDERSRESPONSE._serialized_start=2322 + _QUERYORDERSRESPONSE._serialized_end=2400 + _QUERYTRADESREQUEST._serialized_start=2403 + _QUERYTRADESREQUEST._serialized_end=2585 + _QUERYTRADESRESPONSE._serialized_start=2587 + _QUERYTRADESRESPONSE._serialized_end=2665 + _QUERYKLINESREQUEST._serialized_start=2667 + _QUERYKLINESREQUEST._serialized_end=2792 + _QUERYKLINESRESPONSE._serialized_start=2794 + _QUERYKLINESRESPONSE._serialized_end=2872 + _KLINE._serialized_start=2875 + _KLINE._serialized_end=3065 + _MARKETDATASERVICE._serialized_start=3490 + _MARKETDATASERVICE._serialized_end=3645 + _USERDATASERVICE._serialized_start=3647 + _USERDATASERVICE._serialized_end=3727 + _TRADINGSERVICE._serialized_start=3730 + _TRADINGSERVICE._serialized_end=4093 # @@protoc_insertion_point(module_scope)