diff --git a/go/.DS_Store b/go/.DS_Store index 78115e2a..c26499bc 100644 Binary files a/go/.DS_Store and b/go/.DS_Store differ diff --git a/go/config/config.go b/go/config/config.go index ac6c199c..86ef2724 100644 --- a/go/config/config.go +++ b/go/config/config.go @@ -1,7 +1,7 @@ package config const ( - API_KEY string = "apikey" - SEC_KEY string = "secret key" + API_KEY string = "" + SEC_KEY string = "" BASE_URL string = "https://api.mexc.com/api/v3" ) diff --git a/go/run demo/Wallet/GenDepositAddress.go b/go/run demo/Wallet/GenDepositAddress.go index 2f615310..24062a2c 100644 --- a/go/run demo/Wallet/GenDepositAddress.go +++ b/go/run demo/Wallet/GenDepositAddress.go @@ -11,7 +11,7 @@ import ( //现货参数 // var params string = "" -var params string = `{}` +var params string = `{"coin":"USDT","network": "BNB Smart Chain(BEP20)"}` func main() { diff --git a/go/run demo/Wallet/Withdraw.go b/go/run demo/Wallet/Withdraw.go index d0cafaa7..f42a85d2 100644 --- a/go/run demo/Wallet/Withdraw.go +++ b/go/run demo/Wallet/Withdraw.go @@ -11,7 +11,7 @@ import ( //现货参数 // var params string = "" -var params string = `{}` +var params string = `{"coin":"USDT","address":"0xebe4804f7ecc22d5011c42e6ea1f22e6c891d89b","network":"BNB Smart Chain(BEP20)","amount":"10"}` func main() { diff --git a/go/utils/utils.go b/go/utils/utils.go index fe356593..962d46e6 100644 --- a/go/utils/utils.go +++ b/go/utils/utils.go @@ -214,7 +214,7 @@ func JsonToParamStr(jsonParams string) string { //urlencode func ParamsEncode(paramStr string) string { - return url.QueryEscape(paramStr) + return strings.Replace(url.QueryEscape(paramStr), "+", "%20", -1) } //加密 diff --git a/go/ws/.DS_Store b/go/ws/.DS_Store new file mode 100644 index 00000000..e6d429bf Binary files /dev/null and b/go/ws/.DS_Store differ diff --git a/go/ws/proto/.DS_Store b/go/ws/proto/.DS_Store new file mode 100644 index 00000000..25e96036 Binary files /dev/null and b/go/ws/proto/.DS_Store differ diff --git a/go/ws/proto/go.mod b/go/ws/proto/go.mod new file mode 100644 index 00000000..3751b357 --- /dev/null +++ b/go/ws/proto/go.mod @@ -0,0 +1,8 @@ +module proto-ws-go + +go 1.24 + +require ( + github.com/gorilla/websocket v1.5.3 // indirect + google.golang.org/protobuf v1.36.6 // indirect +) diff --git a/go/ws/proto/go.sum b/go/ws/proto/go.sum new file mode 100644 index 00000000..a24a015b --- /dev/null +++ b/go/ws/proto/go.sum @@ -0,0 +1,4 @@ +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= diff --git a/go/ws/proto/pb/.DS_Store b/go/ws/proto/pb/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/go/ws/proto/pb/.DS_Store differ diff --git a/go/ws/proto/pb/LICENSE b/go/ws/proto/pb/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/go/ws/proto/pb/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/go/ws/proto/pb/PrivateAccountV3Api.pb.go b/go/ws/proto/pb/PrivateAccountV3Api.pb.go new file mode 100644 index 00000000..e70da2ab --- /dev/null +++ b/go/ws/proto/pb/PrivateAccountV3Api.pb.go @@ -0,0 +1,188 @@ +// spot@public.cny.v2.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PrivateAccountV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PrivateAccountV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + VcoinName string `protobuf:"bytes,1,opt,name=vcoinName,proto3" json:"vcoinName,omitempty"` + CoinId string `protobuf:"bytes,2,opt,name=coinId,proto3" json:"coinId,omitempty"` + BalanceAmount string `protobuf:"bytes,3,opt,name=balanceAmount,proto3" json:"balanceAmount,omitempty"` + BalanceAmountChange string `protobuf:"bytes,4,opt,name=balanceAmountChange,proto3" json:"balanceAmountChange,omitempty"` + FrozenAmount string `protobuf:"bytes,5,opt,name=frozenAmount,proto3" json:"frozenAmount,omitempty"` + FrozenAmountChange string `protobuf:"bytes,6,opt,name=frozenAmountChange,proto3" json:"frozenAmountChange,omitempty"` + Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` + Time int64 `protobuf:"varint,8,opt,name=time,proto3" json:"time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrivateAccountV3Api) Reset() { + *x = PrivateAccountV3Api{} + mi := &file_PrivateAccountV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrivateAccountV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateAccountV3Api) ProtoMessage() {} + +func (x *PrivateAccountV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PrivateAccountV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrivateAccountV3Api.ProtoReflect.Descriptor instead. +func (*PrivateAccountV3Api) Descriptor() ([]byte, []int) { + return file_PrivateAccountV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PrivateAccountV3Api) GetVcoinName() string { + if x != nil { + return x.VcoinName + } + return "" +} + +func (x *PrivateAccountV3Api) GetCoinId() string { + if x != nil { + return x.CoinId + } + return "" +} + +func (x *PrivateAccountV3Api) GetBalanceAmount() string { + if x != nil { + return x.BalanceAmount + } + return "" +} + +func (x *PrivateAccountV3Api) GetBalanceAmountChange() string { + if x != nil { + return x.BalanceAmountChange + } + return "" +} + +func (x *PrivateAccountV3Api) GetFrozenAmount() string { + if x != nil { + return x.FrozenAmount + } + return "" +} + +func (x *PrivateAccountV3Api) GetFrozenAmountChange() string { + if x != nil { + return x.FrozenAmountChange + } + return "" +} + +func (x *PrivateAccountV3Api) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *PrivateAccountV3Api) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +var File_PrivateAccountV3Api_proto protoreflect.FileDescriptor + +const file_PrivateAccountV3Api_proto_rawDesc = "" + + "\n" + + "\x19PrivateAccountV3Api.proto\"\x9f\x02\n" + + "\x13PrivateAccountV3Api\x12\x1c\n" + + "\tvcoinName\x18\x01 \x01(\tR\tvcoinName\x12\x16\n" + + "\x06coinId\x18\x02 \x01(\tR\x06coinId\x12$\n" + + "\rbalanceAmount\x18\x03 \x01(\tR\rbalanceAmount\x120\n" + + "\x13balanceAmountChange\x18\x04 \x01(\tR\x13balanceAmountChange\x12\"\n" + + "\ffrozenAmount\x18\x05 \x01(\tR\ffrozenAmount\x12.\n" + + "\x12frozenAmountChange\x18\x06 \x01(\tR\x12frozenAmountChange\x12\x12\n" + + "\x04type\x18\a \x01(\tR\x04type\x12\x12\n" + + "\x04time\x18\b \x01(\x03R\x04timeBL\n" + + "\x1ccom.mxc.push.common.protobufB\x18PrivateAccountV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PrivateAccountV3Api_proto_rawDescOnce sync.Once + file_PrivateAccountV3Api_proto_rawDescData []byte +) + +func file_PrivateAccountV3Api_proto_rawDescGZIP() []byte { + file_PrivateAccountV3Api_proto_rawDescOnce.Do(func() { + file_PrivateAccountV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PrivateAccountV3Api_proto_rawDesc), len(file_PrivateAccountV3Api_proto_rawDesc))) + }) + return file_PrivateAccountV3Api_proto_rawDescData +} + +var file_PrivateAccountV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PrivateAccountV3Api_proto_goTypes = []any{ + (*PrivateAccountV3Api)(nil), // 0: PrivateAccountV3Api +} +var file_PrivateAccountV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PrivateAccountV3Api_proto_init() } +func file_PrivateAccountV3Api_proto_init() { + if File_PrivateAccountV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PrivateAccountV3Api_proto_rawDesc), len(file_PrivateAccountV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PrivateAccountV3Api_proto_goTypes, + DependencyIndexes: file_PrivateAccountV3Api_proto_depIdxs, + MessageInfos: file_PrivateAccountV3Api_proto_msgTypes, + }.Build() + File_PrivateAccountV3Api_proto = out.File + file_PrivateAccountV3Api_proto_goTypes = nil + file_PrivateAccountV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PrivateAccountV3Api.proto b/go/ws/proto/pb/PrivateAccountV3Api.proto new file mode 100644 index 00000000..cf2c87f0 --- /dev/null +++ b/go/ws/proto/pb/PrivateAccountV3Api.proto @@ -0,0 +1,24 @@ +// spot@public.cny.v2.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PrivateAccountV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PrivateAccountV3Api { + + string vcoinName = 1; + string coinId = 2; + + string balanceAmount = 3; + string balanceAmountChange = 4; + string frozenAmount = 5; + string frozenAmountChange = 6; + + string type = 7; + + int64 time = 8; +} diff --git a/go/ws/proto/pb/PrivateDealsV3Api.pb.go b/go/ws/proto/pb/PrivateDealsV3Api.pb.go new file mode 100644 index 00000000..b539371d --- /dev/null +++ b/go/ws/proto/pb/PrivateDealsV3Api.pb.go @@ -0,0 +1,225 @@ +// spot@private.deals.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PrivateDealsV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PrivateDealsV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + TradeType int32 `protobuf:"varint,4,opt,name=tradeType,proto3" json:"tradeType,omitempty"` + IsMaker bool `protobuf:"varint,5,opt,name=isMaker,proto3" json:"isMaker,omitempty"` + IsSelfTrade bool `protobuf:"varint,6,opt,name=isSelfTrade,proto3" json:"isSelfTrade,omitempty"` + TradeId string `protobuf:"bytes,7,opt,name=tradeId,proto3" json:"tradeId,omitempty"` + ClientOrderId string `protobuf:"bytes,8,opt,name=clientOrderId,proto3" json:"clientOrderId,omitempty"` + OrderId string `protobuf:"bytes,9,opt,name=orderId,proto3" json:"orderId,omitempty"` + FeeAmount string `protobuf:"bytes,10,opt,name=feeAmount,proto3" json:"feeAmount,omitempty"` + FeeCurrency string `protobuf:"bytes,11,opt,name=feeCurrency,proto3" json:"feeCurrency,omitempty"` + Time int64 `protobuf:"varint,12,opt,name=time,proto3" json:"time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrivateDealsV3Api) Reset() { + *x = PrivateDealsV3Api{} + mi := &file_PrivateDealsV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrivateDealsV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateDealsV3Api) ProtoMessage() {} + +func (x *PrivateDealsV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PrivateDealsV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrivateDealsV3Api.ProtoReflect.Descriptor instead. +func (*PrivateDealsV3Api) Descriptor() ([]byte, []int) { + return file_PrivateDealsV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PrivateDealsV3Api) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PrivateDealsV3Api) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PrivateDealsV3Api) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *PrivateDealsV3Api) GetTradeType() int32 { + if x != nil { + return x.TradeType + } + return 0 +} + +func (x *PrivateDealsV3Api) GetIsMaker() bool { + if x != nil { + return x.IsMaker + } + return false +} + +func (x *PrivateDealsV3Api) GetIsSelfTrade() bool { + if x != nil { + return x.IsSelfTrade + } + return false +} + +func (x *PrivateDealsV3Api) GetTradeId() string { + if x != nil { + return x.TradeId + } + return "" +} + +func (x *PrivateDealsV3Api) GetClientOrderId() string { + if x != nil { + return x.ClientOrderId + } + return "" +} + +func (x *PrivateDealsV3Api) GetOrderId() string { + if x != nil { + return x.OrderId + } + return "" +} + +func (x *PrivateDealsV3Api) GetFeeAmount() string { + if x != nil { + return x.FeeAmount + } + return "" +} + +func (x *PrivateDealsV3Api) GetFeeCurrency() string { + if x != nil { + return x.FeeCurrency + } + return "" +} + +func (x *PrivateDealsV3Api) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +var File_PrivateDealsV3Api_proto protoreflect.FileDescriptor + +const file_PrivateDealsV3Api_proto_rawDesc = "" + + "\n" + + "\x17PrivateDealsV3Api.proto\"\xe5\x02\n" + + "\x11PrivateDealsV3Api\x12\x14\n" + + "\x05price\x18\x01 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x02 \x01(\tR\bquantity\x12\x16\n" + + "\x06amount\x18\x03 \x01(\tR\x06amount\x12\x1c\n" + + "\ttradeType\x18\x04 \x01(\x05R\ttradeType\x12\x18\n" + + "\aisMaker\x18\x05 \x01(\bR\aisMaker\x12 \n" + + "\visSelfTrade\x18\x06 \x01(\bR\visSelfTrade\x12\x18\n" + + "\atradeId\x18\a \x01(\tR\atradeId\x12$\n" + + "\rclientOrderId\x18\b \x01(\tR\rclientOrderId\x12\x18\n" + + "\aorderId\x18\t \x01(\tR\aorderId\x12\x1c\n" + + "\tfeeAmount\x18\n" + + " \x01(\tR\tfeeAmount\x12 \n" + + "\vfeeCurrency\x18\v \x01(\tR\vfeeCurrency\x12\x12\n" + + "\x04time\x18\f \x01(\x03R\x04timeBJ\n" + + "\x1ccom.mxc.push.common.protobufB\x16PrivateDealsV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PrivateDealsV3Api_proto_rawDescOnce sync.Once + file_PrivateDealsV3Api_proto_rawDescData []byte +) + +func file_PrivateDealsV3Api_proto_rawDescGZIP() []byte { + file_PrivateDealsV3Api_proto_rawDescOnce.Do(func() { + file_PrivateDealsV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PrivateDealsV3Api_proto_rawDesc), len(file_PrivateDealsV3Api_proto_rawDesc))) + }) + return file_PrivateDealsV3Api_proto_rawDescData +} + +var file_PrivateDealsV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PrivateDealsV3Api_proto_goTypes = []any{ + (*PrivateDealsV3Api)(nil), // 0: PrivateDealsV3Api +} +var file_PrivateDealsV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PrivateDealsV3Api_proto_init() } +func file_PrivateDealsV3Api_proto_init() { + if File_PrivateDealsV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PrivateDealsV3Api_proto_rawDesc), len(file_PrivateDealsV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PrivateDealsV3Api_proto_goTypes, + DependencyIndexes: file_PrivateDealsV3Api_proto_depIdxs, + MessageInfos: file_PrivateDealsV3Api_proto_msgTypes, + }.Build() + File_PrivateDealsV3Api_proto = out.File + file_PrivateDealsV3Api_proto_goTypes = nil + file_PrivateDealsV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PrivateDealsV3Api.proto b/go/ws/proto/pb/PrivateDealsV3Api.proto new file mode 100644 index 00000000..1fc1d9f6 --- /dev/null +++ b/go/ws/proto/pb/PrivateDealsV3Api.proto @@ -0,0 +1,29 @@ +// spot@private.deals.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PrivateDealsV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PrivateDealsV3Api { + + string price = 1; + string quantity = 2; + string amount = 3; + + int32 tradeType = 4; + bool isMaker = 5; + bool isSelfTrade = 6; + + string tradeId = 7; + string clientOrderId = 8; + string orderId = 9; + + string feeAmount = 10; + string feeCurrency = 11; + + int64 time = 12; +} diff --git a/go/ws/proto/pb/PrivateOrdersV3Api.pb.go b/go/ws/proto/pb/PrivateOrdersV3Api.pb.go new file mode 100644 index 00000000..72a13c47 --- /dev/null +++ b/go/ws/proto/pb/PrivateOrdersV3Api.pb.go @@ -0,0 +1,368 @@ +// spot@private.orders.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PrivateOrdersV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PrivateOrdersV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` + Price string `protobuf:"bytes,3,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"` + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + AvgPrice string `protobuf:"bytes,6,opt,name=avgPrice,proto3" json:"avgPrice,omitempty"` + OrderType int32 `protobuf:"varint,7,opt,name=orderType,proto3" json:"orderType,omitempty"` + TradeType int32 `protobuf:"varint,8,opt,name=tradeType,proto3" json:"tradeType,omitempty"` + IsMaker bool `protobuf:"varint,9,opt,name=isMaker,proto3" json:"isMaker,omitempty"` + RemainAmount string `protobuf:"bytes,10,opt,name=remainAmount,proto3" json:"remainAmount,omitempty"` + RemainQuantity string `protobuf:"bytes,11,opt,name=remainQuantity,proto3" json:"remainQuantity,omitempty"` + LastDealQuantity *string `protobuf:"bytes,12,opt,name=lastDealQuantity,proto3,oneof" json:"lastDealQuantity,omitempty"` + CumulativeQuantity string `protobuf:"bytes,13,opt,name=cumulativeQuantity,proto3" json:"cumulativeQuantity,omitempty"` + CumulativeAmount string `protobuf:"bytes,14,opt,name=cumulativeAmount,proto3" json:"cumulativeAmount,omitempty"` + Status int32 `protobuf:"varint,15,opt,name=status,proto3" json:"status,omitempty"` + CreateTime int64 `protobuf:"varint,16,opt,name=createTime,proto3" json:"createTime,omitempty"` + Market *string `protobuf:"bytes,17,opt,name=market,proto3,oneof" json:"market,omitempty"` + TriggerType *int32 `protobuf:"varint,18,opt,name=triggerType,proto3,oneof" json:"triggerType,omitempty"` + TriggerPrice *string `protobuf:"bytes,19,opt,name=triggerPrice,proto3,oneof" json:"triggerPrice,omitempty"` + State *int32 `protobuf:"varint,20,opt,name=state,proto3,oneof" json:"state,omitempty"` + OcoId *string `protobuf:"bytes,21,opt,name=ocoId,proto3,oneof" json:"ocoId,omitempty"` + RouteFactor *string `protobuf:"bytes,22,opt,name=routeFactor,proto3,oneof" json:"routeFactor,omitempty"` + SymbolId *string `protobuf:"bytes,23,opt,name=symbolId,proto3,oneof" json:"symbolId,omitempty"` + MarketId *string `protobuf:"bytes,24,opt,name=marketId,proto3,oneof" json:"marketId,omitempty"` + MarketCurrencyId *string `protobuf:"bytes,25,opt,name=marketCurrencyId,proto3,oneof" json:"marketCurrencyId,omitempty"` + CurrencyId *string `protobuf:"bytes,26,opt,name=currencyId,proto3,oneof" json:"currencyId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrivateOrdersV3Api) Reset() { + *x = PrivateOrdersV3Api{} + mi := &file_PrivateOrdersV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrivateOrdersV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateOrdersV3Api) ProtoMessage() {} + +func (x *PrivateOrdersV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PrivateOrdersV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrivateOrdersV3Api.ProtoReflect.Descriptor instead. +func (*PrivateOrdersV3Api) Descriptor() ([]byte, []int) { + return file_PrivateOrdersV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PrivateOrdersV3Api) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PrivateOrdersV3Api) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *PrivateOrdersV3Api) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PrivateOrdersV3Api) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PrivateOrdersV3Api) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *PrivateOrdersV3Api) GetAvgPrice() string { + if x != nil { + return x.AvgPrice + } + return "" +} + +func (x *PrivateOrdersV3Api) GetOrderType() int32 { + if x != nil { + return x.OrderType + } + return 0 +} + +func (x *PrivateOrdersV3Api) GetTradeType() int32 { + if x != nil { + return x.TradeType + } + return 0 +} + +func (x *PrivateOrdersV3Api) GetIsMaker() bool { + if x != nil { + return x.IsMaker + } + return false +} + +func (x *PrivateOrdersV3Api) GetRemainAmount() string { + if x != nil { + return x.RemainAmount + } + return "" +} + +func (x *PrivateOrdersV3Api) GetRemainQuantity() string { + if x != nil { + return x.RemainQuantity + } + return "" +} + +func (x *PrivateOrdersV3Api) GetLastDealQuantity() string { + if x != nil && x.LastDealQuantity != nil { + return *x.LastDealQuantity + } + return "" +} + +func (x *PrivateOrdersV3Api) GetCumulativeQuantity() string { + if x != nil { + return x.CumulativeQuantity + } + return "" +} + +func (x *PrivateOrdersV3Api) GetCumulativeAmount() string { + if x != nil { + return x.CumulativeAmount + } + return "" +} + +func (x *PrivateOrdersV3Api) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *PrivateOrdersV3Api) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *PrivateOrdersV3Api) GetMarket() string { + if x != nil && x.Market != nil { + return *x.Market + } + return "" +} + +func (x *PrivateOrdersV3Api) GetTriggerType() int32 { + if x != nil && x.TriggerType != nil { + return *x.TriggerType + } + return 0 +} + +func (x *PrivateOrdersV3Api) GetTriggerPrice() string { + if x != nil && x.TriggerPrice != nil { + return *x.TriggerPrice + } + return "" +} + +func (x *PrivateOrdersV3Api) GetState() int32 { + if x != nil && x.State != nil { + return *x.State + } + return 0 +} + +func (x *PrivateOrdersV3Api) GetOcoId() string { + if x != nil && x.OcoId != nil { + return *x.OcoId + } + return "" +} + +func (x *PrivateOrdersV3Api) GetRouteFactor() string { + if x != nil && x.RouteFactor != nil { + return *x.RouteFactor + } + return "" +} + +func (x *PrivateOrdersV3Api) GetSymbolId() string { + if x != nil && x.SymbolId != nil { + return *x.SymbolId + } + return "" +} + +func (x *PrivateOrdersV3Api) GetMarketId() string { + if x != nil && x.MarketId != nil { + return *x.MarketId + } + return "" +} + +func (x *PrivateOrdersV3Api) GetMarketCurrencyId() string { + if x != nil && x.MarketCurrencyId != nil { + return *x.MarketCurrencyId + } + return "" +} + +func (x *PrivateOrdersV3Api) GetCurrencyId() string { + if x != nil && x.CurrencyId != nil { + return *x.CurrencyId + } + return "" +} + +var File_PrivateOrdersV3Api_proto protoreflect.FileDescriptor + +const file_PrivateOrdersV3Api_proto_rawDesc = "" + + "\n" + + "\x18PrivateOrdersV3Api.proto\"\x92\b\n" + + "\x12PrivateOrdersV3Api\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + + "\bclientId\x18\x02 \x01(\tR\bclientId\x12\x14\n" + + "\x05price\x18\x03 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x04 \x01(\tR\bquantity\x12\x16\n" + + "\x06amount\x18\x05 \x01(\tR\x06amount\x12\x1a\n" + + "\bavgPrice\x18\x06 \x01(\tR\bavgPrice\x12\x1c\n" + + "\torderType\x18\a \x01(\x05R\torderType\x12\x1c\n" + + "\ttradeType\x18\b \x01(\x05R\ttradeType\x12\x18\n" + + "\aisMaker\x18\t \x01(\bR\aisMaker\x12\"\n" + + "\fremainAmount\x18\n" + + " \x01(\tR\fremainAmount\x12&\n" + + "\x0eremainQuantity\x18\v \x01(\tR\x0eremainQuantity\x12/\n" + + "\x10lastDealQuantity\x18\f \x01(\tH\x00R\x10lastDealQuantity\x88\x01\x01\x12.\n" + + "\x12cumulativeQuantity\x18\r \x01(\tR\x12cumulativeQuantity\x12*\n" + + "\x10cumulativeAmount\x18\x0e \x01(\tR\x10cumulativeAmount\x12\x16\n" + + "\x06status\x18\x0f \x01(\x05R\x06status\x12\x1e\n" + + "\n" + + "createTime\x18\x10 \x01(\x03R\n" + + "createTime\x12\x1b\n" + + "\x06market\x18\x11 \x01(\tH\x01R\x06market\x88\x01\x01\x12%\n" + + "\vtriggerType\x18\x12 \x01(\x05H\x02R\vtriggerType\x88\x01\x01\x12'\n" + + "\ftriggerPrice\x18\x13 \x01(\tH\x03R\ftriggerPrice\x88\x01\x01\x12\x19\n" + + "\x05state\x18\x14 \x01(\x05H\x04R\x05state\x88\x01\x01\x12\x19\n" + + "\x05ocoId\x18\x15 \x01(\tH\x05R\x05ocoId\x88\x01\x01\x12%\n" + + "\vrouteFactor\x18\x16 \x01(\tH\x06R\vrouteFactor\x88\x01\x01\x12\x1f\n" + + "\bsymbolId\x18\x17 \x01(\tH\aR\bsymbolId\x88\x01\x01\x12\x1f\n" + + "\bmarketId\x18\x18 \x01(\tH\bR\bmarketId\x88\x01\x01\x12/\n" + + "\x10marketCurrencyId\x18\x19 \x01(\tH\tR\x10marketCurrencyId\x88\x01\x01\x12#\n" + + "\n" + + "currencyId\x18\x1a \x01(\tH\n" + + "R\n" + + "currencyId\x88\x01\x01B\x13\n" + + "\x11_lastDealQuantityB\t\n" + + "\a_marketB\x0e\n" + + "\f_triggerTypeB\x0f\n" + + "\r_triggerPriceB\b\n" + + "\x06_stateB\b\n" + + "\x06_ocoIdB\x0e\n" + + "\f_routeFactorB\v\n" + + "\t_symbolIdB\v\n" + + "\t_marketIdB\x13\n" + + "\x11_marketCurrencyIdB\r\n" + + "\v_currencyIdBK\n" + + "\x1ccom.mxc.push.common.protobufB\x17PrivateOrdersV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PrivateOrdersV3Api_proto_rawDescOnce sync.Once + file_PrivateOrdersV3Api_proto_rawDescData []byte +) + +func file_PrivateOrdersV3Api_proto_rawDescGZIP() []byte { + file_PrivateOrdersV3Api_proto_rawDescOnce.Do(func() { + file_PrivateOrdersV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PrivateOrdersV3Api_proto_rawDesc), len(file_PrivateOrdersV3Api_proto_rawDesc))) + }) + return file_PrivateOrdersV3Api_proto_rawDescData +} + +var file_PrivateOrdersV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PrivateOrdersV3Api_proto_goTypes = []any{ + (*PrivateOrdersV3Api)(nil), // 0: PrivateOrdersV3Api +} +var file_PrivateOrdersV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PrivateOrdersV3Api_proto_init() } +func file_PrivateOrdersV3Api_proto_init() { + if File_PrivateOrdersV3Api_proto != nil { + return + } + file_PrivateOrdersV3Api_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PrivateOrdersV3Api_proto_rawDesc), len(file_PrivateOrdersV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PrivateOrdersV3Api_proto_goTypes, + DependencyIndexes: file_PrivateOrdersV3Api_proto_depIdxs, + MessageInfos: file_PrivateOrdersV3Api_proto_msgTypes, + }.Build() + File_PrivateOrdersV3Api_proto = out.File + file_PrivateOrdersV3Api_proto_goTypes = nil + file_PrivateOrdersV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PrivateOrdersV3Api.proto b/go/ws/proto/pb/PrivateOrdersV3Api.proto new file mode 100644 index 00000000..d19765ac --- /dev/null +++ b/go/ws/proto/pb/PrivateOrdersV3Api.proto @@ -0,0 +1,48 @@ +// spot@private.orders.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PrivateOrdersV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PrivateOrdersV3Api { + + string id = 1; + string clientId = 2; + + string price = 3; + string quantity = 4; + string amount = 5; + string avgPrice = 6; + + int32 orderType = 7; + int32 tradeType = 8; + bool isMaker = 9; + + string remainAmount = 10; + string remainQuantity= 11; + optional string lastDealQuantity = 12; + string cumulativeQuantity = 13; + string cumulativeAmount = 14; + + int32 status = 15; + int64 createTime = 16; + + optional string market = 17; + optional int32 triggerType = 18; + optional string triggerPrice= 19; + optional int32 state = 20; + + optional string ocoId = 21; + optional string routeFactor = 22; + + optional string symbolId = 23; + optional string marketId = 24; + + optional string marketCurrencyId = 25; + optional string currencyId = 26; +} + diff --git a/go/ws/proto/pb/PublicAggreBookTickerV3Api.pb.go b/go/ws/proto/pb/PublicAggreBookTickerV3Api.pb.go new file mode 100644 index 00000000..8f54186f --- /dev/null +++ b/go/ws/proto/pb/PublicAggreBookTickerV3Api.pb.go @@ -0,0 +1,152 @@ +// spot@public.aggre.bookTicker.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicAggreBookTickerV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicAggreBookTickerV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + BidPrice string `protobuf:"bytes,1,opt,name=bidPrice,proto3" json:"bidPrice,omitempty"` + BidQuantity string `protobuf:"bytes,2,opt,name=bidQuantity,proto3" json:"bidQuantity,omitempty"` + AskPrice string `protobuf:"bytes,3,opt,name=askPrice,proto3" json:"askPrice,omitempty"` + AskQuantity string `protobuf:"bytes,4,opt,name=askQuantity,proto3" json:"askQuantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicAggreBookTickerV3Api) Reset() { + *x = PublicAggreBookTickerV3Api{} + mi := &file_PublicAggreBookTickerV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicAggreBookTickerV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAggreBookTickerV3Api) ProtoMessage() {} + +func (x *PublicAggreBookTickerV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicAggreBookTickerV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicAggreBookTickerV3Api.ProtoReflect.Descriptor instead. +func (*PublicAggreBookTickerV3Api) Descriptor() ([]byte, []int) { + return file_PublicAggreBookTickerV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicAggreBookTickerV3Api) GetBidPrice() string { + if x != nil { + return x.BidPrice + } + return "" +} + +func (x *PublicAggreBookTickerV3Api) GetBidQuantity() string { + if x != nil { + return x.BidQuantity + } + return "" +} + +func (x *PublicAggreBookTickerV3Api) GetAskPrice() string { + if x != nil { + return x.AskPrice + } + return "" +} + +func (x *PublicAggreBookTickerV3Api) GetAskQuantity() string { + if x != nil { + return x.AskQuantity + } + return "" +} + +var File_PublicAggreBookTickerV3Api_proto protoreflect.FileDescriptor + +const file_PublicAggreBookTickerV3Api_proto_rawDesc = "" + + "\n" + + " PublicAggreBookTickerV3Api.proto\"\x98\x01\n" + + "\x1aPublicAggreBookTickerV3Api\x12\x1a\n" + + "\bbidPrice\x18\x01 \x01(\tR\bbidPrice\x12 \n" + + "\vbidQuantity\x18\x02 \x01(\tR\vbidQuantity\x12\x1a\n" + + "\baskPrice\x18\x03 \x01(\tR\baskPrice\x12 \n" + + "\vaskQuantity\x18\x04 \x01(\tR\vaskQuantityBS\n" + + "\x1ccom.mxc.push.common.protobufB\x1fPublicAggreBookTickerV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicAggreBookTickerV3Api_proto_rawDescOnce sync.Once + file_PublicAggreBookTickerV3Api_proto_rawDescData []byte +) + +func file_PublicAggreBookTickerV3Api_proto_rawDescGZIP() []byte { + file_PublicAggreBookTickerV3Api_proto_rawDescOnce.Do(func() { + file_PublicAggreBookTickerV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicAggreBookTickerV3Api_proto_rawDesc), len(file_PublicAggreBookTickerV3Api_proto_rawDesc))) + }) + return file_PublicAggreBookTickerV3Api_proto_rawDescData +} + +var file_PublicAggreBookTickerV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicAggreBookTickerV3Api_proto_goTypes = []any{ + (*PublicAggreBookTickerV3Api)(nil), // 0: PublicAggreBookTickerV3Api +} +var file_PublicAggreBookTickerV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PublicAggreBookTickerV3Api_proto_init() } +func file_PublicAggreBookTickerV3Api_proto_init() { + if File_PublicAggreBookTickerV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicAggreBookTickerV3Api_proto_rawDesc), len(file_PublicAggreBookTickerV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicAggreBookTickerV3Api_proto_goTypes, + DependencyIndexes: file_PublicAggreBookTickerV3Api_proto_depIdxs, + MessageInfos: file_PublicAggreBookTickerV3Api_proto_msgTypes, + }.Build() + File_PublicAggreBookTickerV3Api_proto = out.File + file_PublicAggreBookTickerV3Api_proto_goTypes = nil + file_PublicAggreBookTickerV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicAggreBookTickerV3Api.proto b/go/ws/proto/pb/PublicAggreBookTickerV3Api.proto new file mode 100644 index 00000000..ded055c3 --- /dev/null +++ b/go/ws/proto/pb/PublicAggreBookTickerV3Api.proto @@ -0,0 +1,18 @@ +// spot@public.aggre.bookTicker.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicAggreBookTickerV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicAggreBookTickerV3Api { + + string bidPrice = 1; + string bidQuantity = 2; + string askPrice = 3; + string askQuantity = 4; +} + diff --git a/go/ws/proto/pb/PublicAggreDealsV3Api.pb.go b/go/ws/proto/pb/PublicAggreDealsV3Api.pb.go new file mode 100644 index 00000000..14d9ba26 --- /dev/null +++ b/go/ws/proto/pb/PublicAggreDealsV3Api.pb.go @@ -0,0 +1,209 @@ +// spot@public.aggre.deals.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicAggreDealsV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicAggreDealsV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Deals []*PublicAggreDealsV3ApiItem `protobuf:"bytes,1,rep,name=deals,proto3" json:"deals,omitempty"` + EventType string `protobuf:"bytes,2,opt,name=eventType,proto3" json:"eventType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicAggreDealsV3Api) Reset() { + *x = PublicAggreDealsV3Api{} + mi := &file_PublicAggreDealsV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicAggreDealsV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAggreDealsV3Api) ProtoMessage() {} + +func (x *PublicAggreDealsV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicAggreDealsV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicAggreDealsV3Api.ProtoReflect.Descriptor instead. +func (*PublicAggreDealsV3Api) Descriptor() ([]byte, []int) { + return file_PublicAggreDealsV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicAggreDealsV3Api) GetDeals() []*PublicAggreDealsV3ApiItem { + if x != nil { + return x.Deals + } + return nil +} + +func (x *PublicAggreDealsV3Api) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +type PublicAggreDealsV3ApiItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + TradeType int32 `protobuf:"varint,3,opt,name=tradeType,proto3" json:"tradeType,omitempty"` + Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicAggreDealsV3ApiItem) Reset() { + *x = PublicAggreDealsV3ApiItem{} + mi := &file_PublicAggreDealsV3Api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicAggreDealsV3ApiItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAggreDealsV3ApiItem) ProtoMessage() {} + +func (x *PublicAggreDealsV3ApiItem) ProtoReflect() protoreflect.Message { + mi := &file_PublicAggreDealsV3Api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicAggreDealsV3ApiItem.ProtoReflect.Descriptor instead. +func (*PublicAggreDealsV3ApiItem) Descriptor() ([]byte, []int) { + return file_PublicAggreDealsV3Api_proto_rawDescGZIP(), []int{1} +} + +func (x *PublicAggreDealsV3ApiItem) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PublicAggreDealsV3ApiItem) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PublicAggreDealsV3ApiItem) GetTradeType() int32 { + if x != nil { + return x.TradeType + } + return 0 +} + +func (x *PublicAggreDealsV3ApiItem) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +var File_PublicAggreDealsV3Api_proto protoreflect.FileDescriptor + +const file_PublicAggreDealsV3Api_proto_rawDesc = "" + + "\n" + + "\x1bPublicAggreDealsV3Api.proto\"g\n" + + "\x15PublicAggreDealsV3Api\x120\n" + + "\x05deals\x18\x01 \x03(\v2\x1a.PublicAggreDealsV3ApiItemR\x05deals\x12\x1c\n" + + "\teventType\x18\x02 \x01(\tR\teventType\"\x7f\n" + + "\x19PublicAggreDealsV3ApiItem\x12\x14\n" + + "\x05price\x18\x01 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x02 \x01(\tR\bquantity\x12\x1c\n" + + "\ttradeType\x18\x03 \x01(\x05R\ttradeType\x12\x12\n" + + "\x04time\x18\x04 \x01(\x03R\x04timeBN\n" + + "\x1ccom.mxc.push.common.protobufB\x1aPublicAggreDealsV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicAggreDealsV3Api_proto_rawDescOnce sync.Once + file_PublicAggreDealsV3Api_proto_rawDescData []byte +) + +func file_PublicAggreDealsV3Api_proto_rawDescGZIP() []byte { + file_PublicAggreDealsV3Api_proto_rawDescOnce.Do(func() { + file_PublicAggreDealsV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicAggreDealsV3Api_proto_rawDesc), len(file_PublicAggreDealsV3Api_proto_rawDesc))) + }) + return file_PublicAggreDealsV3Api_proto_rawDescData +} + +var file_PublicAggreDealsV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_PublicAggreDealsV3Api_proto_goTypes = []any{ + (*PublicAggreDealsV3Api)(nil), // 0: PublicAggreDealsV3Api + (*PublicAggreDealsV3ApiItem)(nil), // 1: PublicAggreDealsV3ApiItem +} +var file_PublicAggreDealsV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicAggreDealsV3Api.deals:type_name -> PublicAggreDealsV3ApiItem + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_PublicAggreDealsV3Api_proto_init() } +func file_PublicAggreDealsV3Api_proto_init() { + if File_PublicAggreDealsV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicAggreDealsV3Api_proto_rawDesc), len(file_PublicAggreDealsV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicAggreDealsV3Api_proto_goTypes, + DependencyIndexes: file_PublicAggreDealsV3Api_proto_depIdxs, + MessageInfos: file_PublicAggreDealsV3Api_proto_msgTypes, + }.Build() + File_PublicAggreDealsV3Api_proto = out.File + file_PublicAggreDealsV3Api_proto_goTypes = nil + file_PublicAggreDealsV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicAggreDealsV3Api.proto b/go/ws/proto/pb/PublicAggreDealsV3Api.proto new file mode 100644 index 00000000..9cb8cf98 --- /dev/null +++ b/go/ws/proto/pb/PublicAggreDealsV3Api.proto @@ -0,0 +1,22 @@ +// spot@public.aggre.deals.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicAggreDealsV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicAggreDealsV3Api { + + repeated PublicAggreDealsV3ApiItem deals = 1; + string eventType = 2; +} + +message PublicAggreDealsV3ApiItem { + string price = 1; + string quantity = 2; + int32 tradeType = 3; + int64 time = 4; +} diff --git a/go/ws/proto/pb/PublicAggreDepthsV3Api.pb.go b/go/ws/proto/pb/PublicAggreDepthsV3Api.pb.go new file mode 100644 index 00000000..1d503af3 --- /dev/null +++ b/go/ws/proto/pb/PublicAggreDepthsV3Api.pb.go @@ -0,0 +1,219 @@ +// spot@public.aggre.depth.v3.api.pb@aggreType + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicAggreDepthsV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicAggreDepthsV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asks []*PublicAggreDepthV3ApiItem `protobuf:"bytes,1,rep,name=asks,proto3" json:"asks,omitempty"` + Bids []*PublicAggreDepthV3ApiItem `protobuf:"bytes,2,rep,name=bids,proto3" json:"bids,omitempty"` + EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"` + FromVersion string `protobuf:"bytes,4,opt,name=fromVersion,proto3" json:"fromVersion,omitempty"` + ToVersion string `protobuf:"bytes,5,opt,name=toVersion,proto3" json:"toVersion,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicAggreDepthsV3Api) Reset() { + *x = PublicAggreDepthsV3Api{} + mi := &file_PublicAggreDepthsV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicAggreDepthsV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAggreDepthsV3Api) ProtoMessage() {} + +func (x *PublicAggreDepthsV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicAggreDepthsV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicAggreDepthsV3Api.ProtoReflect.Descriptor instead. +func (*PublicAggreDepthsV3Api) Descriptor() ([]byte, []int) { + return file_PublicAggreDepthsV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicAggreDepthsV3Api) GetAsks() []*PublicAggreDepthV3ApiItem { + if x != nil { + return x.Asks + } + return nil +} + +func (x *PublicAggreDepthsV3Api) GetBids() []*PublicAggreDepthV3ApiItem { + if x != nil { + return x.Bids + } + return nil +} + +func (x *PublicAggreDepthsV3Api) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +func (x *PublicAggreDepthsV3Api) GetFromVersion() string { + if x != nil { + return x.FromVersion + } + return "" +} + +func (x *PublicAggreDepthsV3Api) GetToVersion() string { + if x != nil { + return x.ToVersion + } + return "" +} + +type PublicAggreDepthV3ApiItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicAggreDepthV3ApiItem) Reset() { + *x = PublicAggreDepthV3ApiItem{} + mi := &file_PublicAggreDepthsV3Api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicAggreDepthV3ApiItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAggreDepthV3ApiItem) ProtoMessage() {} + +func (x *PublicAggreDepthV3ApiItem) ProtoReflect() protoreflect.Message { + mi := &file_PublicAggreDepthsV3Api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicAggreDepthV3ApiItem.ProtoReflect.Descriptor instead. +func (*PublicAggreDepthV3ApiItem) Descriptor() ([]byte, []int) { + return file_PublicAggreDepthsV3Api_proto_rawDescGZIP(), []int{1} +} + +func (x *PublicAggreDepthV3ApiItem) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PublicAggreDepthV3ApiItem) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +var File_PublicAggreDepthsV3Api_proto protoreflect.FileDescriptor + +const file_PublicAggreDepthsV3Api_proto_rawDesc = "" + + "\n" + + "\x1cPublicAggreDepthsV3Api.proto\"\xd6\x01\n" + + "\x16PublicAggreDepthsV3Api\x12.\n" + + "\x04asks\x18\x01 \x03(\v2\x1a.PublicAggreDepthV3ApiItemR\x04asks\x12.\n" + + "\x04bids\x18\x02 \x03(\v2\x1a.PublicAggreDepthV3ApiItemR\x04bids\x12\x1c\n" + + "\teventType\x18\x03 \x01(\tR\teventType\x12 \n" + + "\vfromVersion\x18\x04 \x01(\tR\vfromVersion\x12\x1c\n" + + "\ttoVersion\x18\x05 \x01(\tR\ttoVersion\"M\n" + + "\x19PublicAggreDepthV3ApiItem\x12\x14\n" + + "\x05price\x18\x01 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x02 \x01(\tR\bquantityBO\n" + + "\x1ccom.mxc.push.common.protobufB\x1bPublicAggreDepthsV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicAggreDepthsV3Api_proto_rawDescOnce sync.Once + file_PublicAggreDepthsV3Api_proto_rawDescData []byte +) + +func file_PublicAggreDepthsV3Api_proto_rawDescGZIP() []byte { + file_PublicAggreDepthsV3Api_proto_rawDescOnce.Do(func() { + file_PublicAggreDepthsV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicAggreDepthsV3Api_proto_rawDesc), len(file_PublicAggreDepthsV3Api_proto_rawDesc))) + }) + return file_PublicAggreDepthsV3Api_proto_rawDescData +} + +var file_PublicAggreDepthsV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_PublicAggreDepthsV3Api_proto_goTypes = []any{ + (*PublicAggreDepthsV3Api)(nil), // 0: PublicAggreDepthsV3Api + (*PublicAggreDepthV3ApiItem)(nil), // 1: PublicAggreDepthV3ApiItem +} +var file_PublicAggreDepthsV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicAggreDepthsV3Api.asks:type_name -> PublicAggreDepthV3ApiItem + 1, // 1: PublicAggreDepthsV3Api.bids:type_name -> PublicAggreDepthV3ApiItem + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_PublicAggreDepthsV3Api_proto_init() } +func file_PublicAggreDepthsV3Api_proto_init() { + if File_PublicAggreDepthsV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicAggreDepthsV3Api_proto_rawDesc), len(file_PublicAggreDepthsV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicAggreDepthsV3Api_proto_goTypes, + DependencyIndexes: file_PublicAggreDepthsV3Api_proto_depIdxs, + MessageInfos: file_PublicAggreDepthsV3Api_proto_msgTypes, + }.Build() + File_PublicAggreDepthsV3Api_proto = out.File + file_PublicAggreDepthsV3Api_proto_goTypes = nil + file_PublicAggreDepthsV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicAggreDepthsV3Api.proto b/go/ws/proto/pb/PublicAggreDepthsV3Api.proto new file mode 100644 index 00000000..b37a2e40 --- /dev/null +++ b/go/ws/proto/pb/PublicAggreDepthsV3Api.proto @@ -0,0 +1,23 @@ +// spot@public.aggre.depth.v3.api.pb@aggreType + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicAggreDepthsV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicAggreDepthsV3Api { + + repeated PublicAggreDepthV3ApiItem asks = 1; + repeated PublicAggreDepthV3ApiItem bids = 2; + string eventType = 3; + string fromVersion = 4; + string toVersion = 5; +} + +message PublicAggreDepthV3ApiItem { + string price = 1; + string quantity = 2; +} diff --git a/go/ws/proto/pb/PublicBookTickerBatchV3Api.pb.go b/go/ws/proto/pb/PublicBookTickerBatchV3Api.pb.go new file mode 100644 index 00000000..7157b403 --- /dev/null +++ b/go/ws/proto/pb/PublicBookTickerBatchV3Api.pb.go @@ -0,0 +1,128 @@ +// spot@public.bookTicker.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicBookTickerBatchV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicBookTickerBatchV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*PublicBookTickerV3Api `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicBookTickerBatchV3Api) Reset() { + *x = PublicBookTickerBatchV3Api{} + mi := &file_PublicBookTickerBatchV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicBookTickerBatchV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicBookTickerBatchV3Api) ProtoMessage() {} + +func (x *PublicBookTickerBatchV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicBookTickerBatchV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicBookTickerBatchV3Api.ProtoReflect.Descriptor instead. +func (*PublicBookTickerBatchV3Api) Descriptor() ([]byte, []int) { + return file_PublicBookTickerBatchV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicBookTickerBatchV3Api) GetItems() []*PublicBookTickerV3Api { + if x != nil { + return x.Items + } + return nil +} + +var File_PublicBookTickerBatchV3Api_proto protoreflect.FileDescriptor + +const file_PublicBookTickerBatchV3Api_proto_rawDesc = "" + + "\n" + + " PublicBookTickerBatchV3Api.proto\x1a\x1bPublicBookTickerV3Api.proto\"J\n" + + "\x1aPublicBookTickerBatchV3Api\x12,\n" + + "\x05items\x18\x01 \x03(\v2\x16.PublicBookTickerV3ApiR\x05itemsBS\n" + + "\x1ccom.mxc.push.common.protobufB\x1fPublicBookTickerBatchV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicBookTickerBatchV3Api_proto_rawDescOnce sync.Once + file_PublicBookTickerBatchV3Api_proto_rawDescData []byte +) + +func file_PublicBookTickerBatchV3Api_proto_rawDescGZIP() []byte { + file_PublicBookTickerBatchV3Api_proto_rawDescOnce.Do(func() { + file_PublicBookTickerBatchV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicBookTickerBatchV3Api_proto_rawDesc), len(file_PublicBookTickerBatchV3Api_proto_rawDesc))) + }) + return file_PublicBookTickerBatchV3Api_proto_rawDescData +} + +var file_PublicBookTickerBatchV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicBookTickerBatchV3Api_proto_goTypes = []any{ + (*PublicBookTickerBatchV3Api)(nil), // 0: PublicBookTickerBatchV3Api + (*PublicBookTickerV3Api)(nil), // 1: PublicBookTickerV3Api +} +var file_PublicBookTickerBatchV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicBookTickerBatchV3Api.items:type_name -> PublicBookTickerV3Api + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_PublicBookTickerBatchV3Api_proto_init() } +func file_PublicBookTickerBatchV3Api_proto_init() { + if File_PublicBookTickerBatchV3Api_proto != nil { + return + } + file_PublicBookTickerV3Api_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicBookTickerBatchV3Api_proto_rawDesc), len(file_PublicBookTickerBatchV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicBookTickerBatchV3Api_proto_goTypes, + DependencyIndexes: file_PublicBookTickerBatchV3Api_proto_depIdxs, + MessageInfos: file_PublicBookTickerBatchV3Api_proto_msgTypes, + }.Build() + File_PublicBookTickerBatchV3Api_proto = out.File + file_PublicBookTickerBatchV3Api_proto_goTypes = nil + file_PublicBookTickerBatchV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicBookTickerBatchV3Api.proto b/go/ws/proto/pb/PublicBookTickerBatchV3Api.proto new file mode 100644 index 00000000..c9e4b41d --- /dev/null +++ b/go/ws/proto/pb/PublicBookTickerBatchV3Api.proto @@ -0,0 +1,15 @@ +// spot@public.bookTicker.v3.api.pb + +syntax = "proto3"; +import "PublicBookTickerV3Api.proto"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicBookTickerBatchV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicBookTickerBatchV3Api { + repeated PublicBookTickerV3Api items = 1; +} + diff --git a/go/ws/proto/pb/PublicBookTickerV3Api.pb.go b/go/ws/proto/pb/PublicBookTickerV3Api.pb.go new file mode 100644 index 00000000..0af4c4eb --- /dev/null +++ b/go/ws/proto/pb/PublicBookTickerV3Api.pb.go @@ -0,0 +1,152 @@ +// spot@public.bookTicker.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicBookTickerV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicBookTickerV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + BidPrice string `protobuf:"bytes,1,opt,name=bidPrice,proto3" json:"bidPrice,omitempty"` + BidQuantity string `protobuf:"bytes,2,opt,name=bidQuantity,proto3" json:"bidQuantity,omitempty"` + AskPrice string `protobuf:"bytes,3,opt,name=askPrice,proto3" json:"askPrice,omitempty"` + AskQuantity string `protobuf:"bytes,4,opt,name=askQuantity,proto3" json:"askQuantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicBookTickerV3Api) Reset() { + *x = PublicBookTickerV3Api{} + mi := &file_PublicBookTickerV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicBookTickerV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicBookTickerV3Api) ProtoMessage() {} + +func (x *PublicBookTickerV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicBookTickerV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicBookTickerV3Api.ProtoReflect.Descriptor instead. +func (*PublicBookTickerV3Api) Descriptor() ([]byte, []int) { + return file_PublicBookTickerV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicBookTickerV3Api) GetBidPrice() string { + if x != nil { + return x.BidPrice + } + return "" +} + +func (x *PublicBookTickerV3Api) GetBidQuantity() string { + if x != nil { + return x.BidQuantity + } + return "" +} + +func (x *PublicBookTickerV3Api) GetAskPrice() string { + if x != nil { + return x.AskPrice + } + return "" +} + +func (x *PublicBookTickerV3Api) GetAskQuantity() string { + if x != nil { + return x.AskQuantity + } + return "" +} + +var File_PublicBookTickerV3Api_proto protoreflect.FileDescriptor + +const file_PublicBookTickerV3Api_proto_rawDesc = "" + + "\n" + + "\x1bPublicBookTickerV3Api.proto\"\x93\x01\n" + + "\x15PublicBookTickerV3Api\x12\x1a\n" + + "\bbidPrice\x18\x01 \x01(\tR\bbidPrice\x12 \n" + + "\vbidQuantity\x18\x02 \x01(\tR\vbidQuantity\x12\x1a\n" + + "\baskPrice\x18\x03 \x01(\tR\baskPrice\x12 \n" + + "\vaskQuantity\x18\x04 \x01(\tR\vaskQuantityBN\n" + + "\x1ccom.mxc.push.common.protobufB\x1aPublicBookTickerV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicBookTickerV3Api_proto_rawDescOnce sync.Once + file_PublicBookTickerV3Api_proto_rawDescData []byte +) + +func file_PublicBookTickerV3Api_proto_rawDescGZIP() []byte { + file_PublicBookTickerV3Api_proto_rawDescOnce.Do(func() { + file_PublicBookTickerV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicBookTickerV3Api_proto_rawDesc), len(file_PublicBookTickerV3Api_proto_rawDesc))) + }) + return file_PublicBookTickerV3Api_proto_rawDescData +} + +var file_PublicBookTickerV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicBookTickerV3Api_proto_goTypes = []any{ + (*PublicBookTickerV3Api)(nil), // 0: PublicBookTickerV3Api +} +var file_PublicBookTickerV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PublicBookTickerV3Api_proto_init() } +func file_PublicBookTickerV3Api_proto_init() { + if File_PublicBookTickerV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicBookTickerV3Api_proto_rawDesc), len(file_PublicBookTickerV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicBookTickerV3Api_proto_goTypes, + DependencyIndexes: file_PublicBookTickerV3Api_proto_depIdxs, + MessageInfos: file_PublicBookTickerV3Api_proto_msgTypes, + }.Build() + File_PublicBookTickerV3Api_proto = out.File + file_PublicBookTickerV3Api_proto_goTypes = nil + file_PublicBookTickerV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicBookTickerV3Api.proto b/go/ws/proto/pb/PublicBookTickerV3Api.proto new file mode 100644 index 00000000..d24dfc7b --- /dev/null +++ b/go/ws/proto/pb/PublicBookTickerV3Api.proto @@ -0,0 +1,18 @@ +// spot@public.bookTicker.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicBookTickerV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicBookTickerV3Api { + + string bidPrice = 1; + string bidQuantity = 2; + string askPrice = 3; + string askQuantity = 4; +} + diff --git a/go/ws/proto/pb/PublicDealsV3Api.pb.go b/go/ws/proto/pb/PublicDealsV3Api.pb.go new file mode 100644 index 00000000..092342fa --- /dev/null +++ b/go/ws/proto/pb/PublicDealsV3Api.pb.go @@ -0,0 +1,209 @@ +// spot@public.deals.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicDealsV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicDealsV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Deals []*PublicDealsV3ApiItem `protobuf:"bytes,1,rep,name=deals,proto3" json:"deals,omitempty"` + EventType string `protobuf:"bytes,2,opt,name=eventType,proto3" json:"eventType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicDealsV3Api) Reset() { + *x = PublicDealsV3Api{} + mi := &file_PublicDealsV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicDealsV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicDealsV3Api) ProtoMessage() {} + +func (x *PublicDealsV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicDealsV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicDealsV3Api.ProtoReflect.Descriptor instead. +func (*PublicDealsV3Api) Descriptor() ([]byte, []int) { + return file_PublicDealsV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicDealsV3Api) GetDeals() []*PublicDealsV3ApiItem { + if x != nil { + return x.Deals + } + return nil +} + +func (x *PublicDealsV3Api) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +type PublicDealsV3ApiItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + TradeType int32 `protobuf:"varint,3,opt,name=tradeType,proto3" json:"tradeType,omitempty"` + Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicDealsV3ApiItem) Reset() { + *x = PublicDealsV3ApiItem{} + mi := &file_PublicDealsV3Api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicDealsV3ApiItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicDealsV3ApiItem) ProtoMessage() {} + +func (x *PublicDealsV3ApiItem) ProtoReflect() protoreflect.Message { + mi := &file_PublicDealsV3Api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicDealsV3ApiItem.ProtoReflect.Descriptor instead. +func (*PublicDealsV3ApiItem) Descriptor() ([]byte, []int) { + return file_PublicDealsV3Api_proto_rawDescGZIP(), []int{1} +} + +func (x *PublicDealsV3ApiItem) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PublicDealsV3ApiItem) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PublicDealsV3ApiItem) GetTradeType() int32 { + if x != nil { + return x.TradeType + } + return 0 +} + +func (x *PublicDealsV3ApiItem) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +var File_PublicDealsV3Api_proto protoreflect.FileDescriptor + +const file_PublicDealsV3Api_proto_rawDesc = "" + + "\n" + + "\x16PublicDealsV3Api.proto\"]\n" + + "\x10PublicDealsV3Api\x12+\n" + + "\x05deals\x18\x01 \x03(\v2\x15.PublicDealsV3ApiItemR\x05deals\x12\x1c\n" + + "\teventType\x18\x02 \x01(\tR\teventType\"z\n" + + "\x14PublicDealsV3ApiItem\x12\x14\n" + + "\x05price\x18\x01 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x02 \x01(\tR\bquantity\x12\x1c\n" + + "\ttradeType\x18\x03 \x01(\x05R\ttradeType\x12\x12\n" + + "\x04time\x18\x04 \x01(\x03R\x04timeBI\n" + + "\x1ccom.mxc.push.common.protobufB\x15PublicDealsV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicDealsV3Api_proto_rawDescOnce sync.Once + file_PublicDealsV3Api_proto_rawDescData []byte +) + +func file_PublicDealsV3Api_proto_rawDescGZIP() []byte { + file_PublicDealsV3Api_proto_rawDescOnce.Do(func() { + file_PublicDealsV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicDealsV3Api_proto_rawDesc), len(file_PublicDealsV3Api_proto_rawDesc))) + }) + return file_PublicDealsV3Api_proto_rawDescData +} + +var file_PublicDealsV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_PublicDealsV3Api_proto_goTypes = []any{ + (*PublicDealsV3Api)(nil), // 0: PublicDealsV3Api + (*PublicDealsV3ApiItem)(nil), // 1: PublicDealsV3ApiItem +} +var file_PublicDealsV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicDealsV3Api.deals:type_name -> PublicDealsV3ApiItem + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_PublicDealsV3Api_proto_init() } +func file_PublicDealsV3Api_proto_init() { + if File_PublicDealsV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicDealsV3Api_proto_rawDesc), len(file_PublicDealsV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicDealsV3Api_proto_goTypes, + DependencyIndexes: file_PublicDealsV3Api_proto_depIdxs, + MessageInfos: file_PublicDealsV3Api_proto_msgTypes, + }.Build() + File_PublicDealsV3Api_proto = out.File + file_PublicDealsV3Api_proto_goTypes = nil + file_PublicDealsV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicDealsV3Api.proto b/go/ws/proto/pb/PublicDealsV3Api.proto new file mode 100644 index 00000000..d24eca5c --- /dev/null +++ b/go/ws/proto/pb/PublicDealsV3Api.proto @@ -0,0 +1,22 @@ +// spot@public.deals.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicDealsV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicDealsV3Api { + + repeated PublicDealsV3ApiItem deals = 1; + string eventType = 2; +} + +message PublicDealsV3ApiItem { + string price = 1; + string quantity = 2; + int32 tradeType = 3; + int64 time = 4; +} diff --git a/go/ws/proto/pb/PublicIncreaseDepthsBatchV3Api.pb.go b/go/ws/proto/pb/PublicIncreaseDepthsBatchV3Api.pb.go new file mode 100644 index 00000000..fe96cdf9 --- /dev/null +++ b/go/ws/proto/pb/PublicIncreaseDepthsBatchV3Api.pb.go @@ -0,0 +1,137 @@ +// spot@public.increase.depth.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicIncreaseDepthsBatchV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicIncreaseDepthsBatchV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*PublicIncreaseDepthsV3Api `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + EventType string `protobuf:"bytes,2,opt,name=eventType,proto3" json:"eventType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicIncreaseDepthsBatchV3Api) Reset() { + *x = PublicIncreaseDepthsBatchV3Api{} + mi := &file_PublicIncreaseDepthsBatchV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicIncreaseDepthsBatchV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIncreaseDepthsBatchV3Api) ProtoMessage() {} + +func (x *PublicIncreaseDepthsBatchV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicIncreaseDepthsBatchV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIncreaseDepthsBatchV3Api.ProtoReflect.Descriptor instead. +func (*PublicIncreaseDepthsBatchV3Api) Descriptor() ([]byte, []int) { + return file_PublicIncreaseDepthsBatchV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicIncreaseDepthsBatchV3Api) GetItems() []*PublicIncreaseDepthsV3Api { + if x != nil { + return x.Items + } + return nil +} + +func (x *PublicIncreaseDepthsBatchV3Api) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +var File_PublicIncreaseDepthsBatchV3Api_proto protoreflect.FileDescriptor + +const file_PublicIncreaseDepthsBatchV3Api_proto_rawDesc = "" + + "\n" + + "$PublicIncreaseDepthsBatchV3Api.proto\x1a\x1fPublicIncreaseDepthsV3Api.proto\"p\n" + + "\x1ePublicIncreaseDepthsBatchV3Api\x120\n" + + "\x05items\x18\x01 \x03(\v2\x1a.PublicIncreaseDepthsV3ApiR\x05items\x12\x1c\n" + + "\teventType\x18\x02 \x01(\tR\teventTypeBW\n" + + "\x1ccom.mxc.push.common.protobufB#PublicIncreaseDepthsBatchV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicIncreaseDepthsBatchV3Api_proto_rawDescOnce sync.Once + file_PublicIncreaseDepthsBatchV3Api_proto_rawDescData []byte +) + +func file_PublicIncreaseDepthsBatchV3Api_proto_rawDescGZIP() []byte { + file_PublicIncreaseDepthsBatchV3Api_proto_rawDescOnce.Do(func() { + file_PublicIncreaseDepthsBatchV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicIncreaseDepthsBatchV3Api_proto_rawDesc), len(file_PublicIncreaseDepthsBatchV3Api_proto_rawDesc))) + }) + return file_PublicIncreaseDepthsBatchV3Api_proto_rawDescData +} + +var file_PublicIncreaseDepthsBatchV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicIncreaseDepthsBatchV3Api_proto_goTypes = []any{ + (*PublicIncreaseDepthsBatchV3Api)(nil), // 0: PublicIncreaseDepthsBatchV3Api + (*PublicIncreaseDepthsV3Api)(nil), // 1: PublicIncreaseDepthsV3Api +} +var file_PublicIncreaseDepthsBatchV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicIncreaseDepthsBatchV3Api.items:type_name -> PublicIncreaseDepthsV3Api + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_PublicIncreaseDepthsBatchV3Api_proto_init() } +func file_PublicIncreaseDepthsBatchV3Api_proto_init() { + if File_PublicIncreaseDepthsBatchV3Api_proto != nil { + return + } + file_PublicIncreaseDepthsV3Api_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicIncreaseDepthsBatchV3Api_proto_rawDesc), len(file_PublicIncreaseDepthsBatchV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicIncreaseDepthsBatchV3Api_proto_goTypes, + DependencyIndexes: file_PublicIncreaseDepthsBatchV3Api_proto_depIdxs, + MessageInfos: file_PublicIncreaseDepthsBatchV3Api_proto_msgTypes, + }.Build() + File_PublicIncreaseDepthsBatchV3Api_proto = out.File + file_PublicIncreaseDepthsBatchV3Api_proto_goTypes = nil + file_PublicIncreaseDepthsBatchV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicIncreaseDepthsBatchV3Api.proto b/go/ws/proto/pb/PublicIncreaseDepthsBatchV3Api.proto new file mode 100644 index 00000000..8ca8913f --- /dev/null +++ b/go/ws/proto/pb/PublicIncreaseDepthsBatchV3Api.proto @@ -0,0 +1,17 @@ +// spot@public.increase.depth.v3.api.pb + +syntax = "proto3"; +import "PublicIncreaseDepthsV3Api.proto"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicIncreaseDepthsBatchV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicIncreaseDepthsBatchV3Api{ + + repeated PublicIncreaseDepthsV3Api items = 1; + string eventType = 2; +} + diff --git a/go/ws/proto/pb/PublicIncreaseDepthsV3Api.pb.go b/go/ws/proto/pb/PublicIncreaseDepthsV3Api.pb.go new file mode 100644 index 00000000..35623d58 --- /dev/null +++ b/go/ws/proto/pb/PublicIncreaseDepthsV3Api.pb.go @@ -0,0 +1,210 @@ +// spot@public.increase.depth.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicIncreaseDepthsV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicIncreaseDepthsV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asks []*PublicIncreaseDepthV3ApiItem `protobuf:"bytes,1,rep,name=asks,proto3" json:"asks,omitempty"` + Bids []*PublicIncreaseDepthV3ApiItem `protobuf:"bytes,2,rep,name=bids,proto3" json:"bids,omitempty"` + EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicIncreaseDepthsV3Api) Reset() { + *x = PublicIncreaseDepthsV3Api{} + mi := &file_PublicIncreaseDepthsV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicIncreaseDepthsV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIncreaseDepthsV3Api) ProtoMessage() {} + +func (x *PublicIncreaseDepthsV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicIncreaseDepthsV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIncreaseDepthsV3Api.ProtoReflect.Descriptor instead. +func (*PublicIncreaseDepthsV3Api) Descriptor() ([]byte, []int) { + return file_PublicIncreaseDepthsV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicIncreaseDepthsV3Api) GetAsks() []*PublicIncreaseDepthV3ApiItem { + if x != nil { + return x.Asks + } + return nil +} + +func (x *PublicIncreaseDepthsV3Api) GetBids() []*PublicIncreaseDepthV3ApiItem { + if x != nil { + return x.Bids + } + return nil +} + +func (x *PublicIncreaseDepthsV3Api) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +func (x *PublicIncreaseDepthsV3Api) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type PublicIncreaseDepthV3ApiItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicIncreaseDepthV3ApiItem) Reset() { + *x = PublicIncreaseDepthV3ApiItem{} + mi := &file_PublicIncreaseDepthsV3Api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicIncreaseDepthV3ApiItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIncreaseDepthV3ApiItem) ProtoMessage() {} + +func (x *PublicIncreaseDepthV3ApiItem) ProtoReflect() protoreflect.Message { + mi := &file_PublicIncreaseDepthsV3Api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIncreaseDepthV3ApiItem.ProtoReflect.Descriptor instead. +func (*PublicIncreaseDepthV3ApiItem) Descriptor() ([]byte, []int) { + return file_PublicIncreaseDepthsV3Api_proto_rawDescGZIP(), []int{1} +} + +func (x *PublicIncreaseDepthV3ApiItem) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PublicIncreaseDepthV3ApiItem) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +var File_PublicIncreaseDepthsV3Api_proto protoreflect.FileDescriptor + +const file_PublicIncreaseDepthsV3Api_proto_rawDesc = "" + + "\n" + + "\x1fPublicIncreaseDepthsV3Api.proto\"\xb9\x01\n" + + "\x19PublicIncreaseDepthsV3Api\x121\n" + + "\x04asks\x18\x01 \x03(\v2\x1d.PublicIncreaseDepthV3ApiItemR\x04asks\x121\n" + + "\x04bids\x18\x02 \x03(\v2\x1d.PublicIncreaseDepthV3ApiItemR\x04bids\x12\x1c\n" + + "\teventType\x18\x03 \x01(\tR\teventType\x12\x18\n" + + "\aversion\x18\x04 \x01(\tR\aversion\"P\n" + + "\x1cPublicIncreaseDepthV3ApiItem\x12\x14\n" + + "\x05price\x18\x01 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x02 \x01(\tR\bquantityBR\n" + + "\x1ccom.mxc.push.common.protobufB\x1ePublicIncreaseDepthsV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicIncreaseDepthsV3Api_proto_rawDescOnce sync.Once + file_PublicIncreaseDepthsV3Api_proto_rawDescData []byte +) + +func file_PublicIncreaseDepthsV3Api_proto_rawDescGZIP() []byte { + file_PublicIncreaseDepthsV3Api_proto_rawDescOnce.Do(func() { + file_PublicIncreaseDepthsV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicIncreaseDepthsV3Api_proto_rawDesc), len(file_PublicIncreaseDepthsV3Api_proto_rawDesc))) + }) + return file_PublicIncreaseDepthsV3Api_proto_rawDescData +} + +var file_PublicIncreaseDepthsV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_PublicIncreaseDepthsV3Api_proto_goTypes = []any{ + (*PublicIncreaseDepthsV3Api)(nil), // 0: PublicIncreaseDepthsV3Api + (*PublicIncreaseDepthV3ApiItem)(nil), // 1: PublicIncreaseDepthV3ApiItem +} +var file_PublicIncreaseDepthsV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicIncreaseDepthsV3Api.asks:type_name -> PublicIncreaseDepthV3ApiItem + 1, // 1: PublicIncreaseDepthsV3Api.bids:type_name -> PublicIncreaseDepthV3ApiItem + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_PublicIncreaseDepthsV3Api_proto_init() } +func file_PublicIncreaseDepthsV3Api_proto_init() { + if File_PublicIncreaseDepthsV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicIncreaseDepthsV3Api_proto_rawDesc), len(file_PublicIncreaseDepthsV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicIncreaseDepthsV3Api_proto_goTypes, + DependencyIndexes: file_PublicIncreaseDepthsV3Api_proto_depIdxs, + MessageInfos: file_PublicIncreaseDepthsV3Api_proto_msgTypes, + }.Build() + File_PublicIncreaseDepthsV3Api_proto = out.File + file_PublicIncreaseDepthsV3Api_proto_goTypes = nil + file_PublicIncreaseDepthsV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicIncreaseDepthsV3Api.proto b/go/ws/proto/pb/PublicIncreaseDepthsV3Api.proto new file mode 100644 index 00000000..dc6b07c0 --- /dev/null +++ b/go/ws/proto/pb/PublicIncreaseDepthsV3Api.proto @@ -0,0 +1,22 @@ +// spot@public.increase.depth.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicIncreaseDepthsV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicIncreaseDepthsV3Api { + + repeated PublicIncreaseDepthV3ApiItem asks = 1; + repeated PublicIncreaseDepthV3ApiItem bids = 2; + string eventType = 3; + string version = 4; +} + +message PublicIncreaseDepthV3ApiItem { + string price = 1; + string quantity = 2; +} diff --git a/go/ws/proto/pb/PublicLimitDepthsV3Api.pb.go b/go/ws/proto/pb/PublicLimitDepthsV3Api.pb.go new file mode 100644 index 00000000..62cdab03 --- /dev/null +++ b/go/ws/proto/pb/PublicLimitDepthsV3Api.pb.go @@ -0,0 +1,210 @@ +// spot@public.limit.depth.v3.api.pb + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicLimitDepthsV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicLimitDepthsV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asks []*PublicLimitDepthV3ApiItem `protobuf:"bytes,1,rep,name=asks,proto3" json:"asks,omitempty"` + Bids []*PublicLimitDepthV3ApiItem `protobuf:"bytes,2,rep,name=bids,proto3" json:"bids,omitempty"` + EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicLimitDepthsV3Api) Reset() { + *x = PublicLimitDepthsV3Api{} + mi := &file_PublicLimitDepthsV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicLimitDepthsV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicLimitDepthsV3Api) ProtoMessage() {} + +func (x *PublicLimitDepthsV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicLimitDepthsV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicLimitDepthsV3Api.ProtoReflect.Descriptor instead. +func (*PublicLimitDepthsV3Api) Descriptor() ([]byte, []int) { + return file_PublicLimitDepthsV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicLimitDepthsV3Api) GetAsks() []*PublicLimitDepthV3ApiItem { + if x != nil { + return x.Asks + } + return nil +} + +func (x *PublicLimitDepthsV3Api) GetBids() []*PublicLimitDepthV3ApiItem { + if x != nil { + return x.Bids + } + return nil +} + +func (x *PublicLimitDepthsV3Api) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +func (x *PublicLimitDepthsV3Api) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type PublicLimitDepthV3ApiItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicLimitDepthV3ApiItem) Reset() { + *x = PublicLimitDepthV3ApiItem{} + mi := &file_PublicLimitDepthsV3Api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicLimitDepthV3ApiItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicLimitDepthV3ApiItem) ProtoMessage() {} + +func (x *PublicLimitDepthV3ApiItem) ProtoReflect() protoreflect.Message { + mi := &file_PublicLimitDepthsV3Api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicLimitDepthV3ApiItem.ProtoReflect.Descriptor instead. +func (*PublicLimitDepthV3ApiItem) Descriptor() ([]byte, []int) { + return file_PublicLimitDepthsV3Api_proto_rawDescGZIP(), []int{1} +} + +func (x *PublicLimitDepthV3ApiItem) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PublicLimitDepthV3ApiItem) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +var File_PublicLimitDepthsV3Api_proto protoreflect.FileDescriptor + +const file_PublicLimitDepthsV3Api_proto_rawDesc = "" + + "\n" + + "\x1cPublicLimitDepthsV3Api.proto\"\xb0\x01\n" + + "\x16PublicLimitDepthsV3Api\x12.\n" + + "\x04asks\x18\x01 \x03(\v2\x1a.PublicLimitDepthV3ApiItemR\x04asks\x12.\n" + + "\x04bids\x18\x02 \x03(\v2\x1a.PublicLimitDepthV3ApiItemR\x04bids\x12\x1c\n" + + "\teventType\x18\x03 \x01(\tR\teventType\x12\x18\n" + + "\aversion\x18\x04 \x01(\tR\aversion\"M\n" + + "\x19PublicLimitDepthV3ApiItem\x12\x14\n" + + "\x05price\x18\x01 \x01(\tR\x05price\x12\x1a\n" + + "\bquantity\x18\x02 \x01(\tR\bquantityBO\n" + + "\x1ccom.mxc.push.common.protobufB\x1bPublicLimitDepthsV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicLimitDepthsV3Api_proto_rawDescOnce sync.Once + file_PublicLimitDepthsV3Api_proto_rawDescData []byte +) + +func file_PublicLimitDepthsV3Api_proto_rawDescGZIP() []byte { + file_PublicLimitDepthsV3Api_proto_rawDescOnce.Do(func() { + file_PublicLimitDepthsV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicLimitDepthsV3Api_proto_rawDesc), len(file_PublicLimitDepthsV3Api_proto_rawDesc))) + }) + return file_PublicLimitDepthsV3Api_proto_rawDescData +} + +var file_PublicLimitDepthsV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_PublicLimitDepthsV3Api_proto_goTypes = []any{ + (*PublicLimitDepthsV3Api)(nil), // 0: PublicLimitDepthsV3Api + (*PublicLimitDepthV3ApiItem)(nil), // 1: PublicLimitDepthV3ApiItem +} +var file_PublicLimitDepthsV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicLimitDepthsV3Api.asks:type_name -> PublicLimitDepthV3ApiItem + 1, // 1: PublicLimitDepthsV3Api.bids:type_name -> PublicLimitDepthV3ApiItem + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_PublicLimitDepthsV3Api_proto_init() } +func file_PublicLimitDepthsV3Api_proto_init() { + if File_PublicLimitDepthsV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicLimitDepthsV3Api_proto_rawDesc), len(file_PublicLimitDepthsV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicLimitDepthsV3Api_proto_goTypes, + DependencyIndexes: file_PublicLimitDepthsV3Api_proto_depIdxs, + MessageInfos: file_PublicLimitDepthsV3Api_proto_msgTypes, + }.Build() + File_PublicLimitDepthsV3Api_proto = out.File + file_PublicLimitDepthsV3Api_proto_goTypes = nil + file_PublicLimitDepthsV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicLimitDepthsV3Api.proto b/go/ws/proto/pb/PublicLimitDepthsV3Api.proto new file mode 100644 index 00000000..f0494f6a --- /dev/null +++ b/go/ws/proto/pb/PublicLimitDepthsV3Api.proto @@ -0,0 +1,22 @@ +// spot@public.limit.depth.v3.api.pb + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicLimitDepthsV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicLimitDepthsV3Api { + + repeated PublicLimitDepthV3ApiItem asks = 1; + repeated PublicLimitDepthV3ApiItem bids = 2; + string eventType = 3; + string version = 4; +} + +message PublicLimitDepthV3ApiItem { + string price = 1; + string quantity = 2; +} diff --git a/go/ws/proto/pb/PublicMiniTickerV3Api.pb.go b/go/ws/proto/pb/PublicMiniTickerV3Api.pb.go new file mode 100644 index 00000000..ac99fc41 --- /dev/null +++ b/go/ws/proto/pb/PublicMiniTickerV3Api.pb.go @@ -0,0 +1,237 @@ +// spot@public.miniTicker.v3.api + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicMiniTickerV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicMiniTickerV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + // 交易对名 + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + // 最新价格 + Price string `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"` + // utc+8时区涨跌幅 + Rate string `protobuf:"bytes,3,opt,name=rate,proto3" json:"rate,omitempty"` + // 时区涨跌幅 + ZonedRate string `protobuf:"bytes,4,opt,name=zonedRate,proto3" json:"zonedRate,omitempty"` + // 滚动最高价 + High string `protobuf:"bytes,5,opt,name=high,proto3" json:"high,omitempty"` + // 滚动最低价 + Low string `protobuf:"bytes,6,opt,name=low,proto3" json:"low,omitempty"` + // 滚动成交额 + Volume string `protobuf:"bytes,7,opt,name=volume,proto3" json:"volume,omitempty"` + // 滚动成交量 + Quantity string `protobuf:"bytes,8,opt,name=quantity,proto3" json:"quantity,omitempty"` + // utc+8时区上期收盘价模式涨跌幅 + LastCloseRate string `protobuf:"bytes,9,opt,name=lastCloseRate,proto3" json:"lastCloseRate,omitempty"` + // 上期收盘价模式时区涨跌幅 + LastCloseZonedRate string `protobuf:"bytes,10,opt,name=lastCloseZonedRate,proto3" json:"lastCloseZonedRate,omitempty"` + // 上期收盘价模式滚动最高价 + LastCloseHigh string `protobuf:"bytes,11,opt,name=lastCloseHigh,proto3" json:"lastCloseHigh,omitempty"` + // 上期收盘价模式滚动最低价 + LastCloseLow string `protobuf:"bytes,12,opt,name=lastCloseLow,proto3" json:"lastCloseLow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicMiniTickerV3Api) Reset() { + *x = PublicMiniTickerV3Api{} + mi := &file_PublicMiniTickerV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicMiniTickerV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicMiniTickerV3Api) ProtoMessage() {} + +func (x *PublicMiniTickerV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicMiniTickerV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicMiniTickerV3Api.ProtoReflect.Descriptor instead. +func (*PublicMiniTickerV3Api) Descriptor() ([]byte, []int) { + return file_PublicMiniTickerV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicMiniTickerV3Api) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetRate() string { + if x != nil { + return x.Rate + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetZonedRate() string { + if x != nil { + return x.ZonedRate + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetHigh() string { + if x != nil { + return x.High + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetLow() string { + if x != nil { + return x.Low + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetVolume() string { + if x != nil { + return x.Volume + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetQuantity() string { + if x != nil { + return x.Quantity + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetLastCloseRate() string { + if x != nil { + return x.LastCloseRate + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetLastCloseZonedRate() string { + if x != nil { + return x.LastCloseZonedRate + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetLastCloseHigh() string { + if x != nil { + return x.LastCloseHigh + } + return "" +} + +func (x *PublicMiniTickerV3Api) GetLastCloseLow() string { + if x != nil { + return x.LastCloseLow + } + return "" +} + +var File_PublicMiniTickerV3Api_proto protoreflect.FileDescriptor + +const file_PublicMiniTickerV3Api_proto_rawDesc = "" + + "\n" + + "\x1bPublicMiniTickerV3Api.proto\"\xf1\x02\n" + + "\x15PublicMiniTickerV3Api\x12\x16\n" + + "\x06symbol\x18\x01 \x01(\tR\x06symbol\x12\x14\n" + + "\x05price\x18\x02 \x01(\tR\x05price\x12\x12\n" + + "\x04rate\x18\x03 \x01(\tR\x04rate\x12\x1c\n" + + "\tzonedRate\x18\x04 \x01(\tR\tzonedRate\x12\x12\n" + + "\x04high\x18\x05 \x01(\tR\x04high\x12\x10\n" + + "\x03low\x18\x06 \x01(\tR\x03low\x12\x16\n" + + "\x06volume\x18\a \x01(\tR\x06volume\x12\x1a\n" + + "\bquantity\x18\b \x01(\tR\bquantity\x12$\n" + + "\rlastCloseRate\x18\t \x01(\tR\rlastCloseRate\x12.\n" + + "\x12lastCloseZonedRate\x18\n" + + " \x01(\tR\x12lastCloseZonedRate\x12$\n" + + "\rlastCloseHigh\x18\v \x01(\tR\rlastCloseHigh\x12\"\n" + + "\flastCloseLow\x18\f \x01(\tR\flastCloseLowBN\n" + + "\x1ccom.mxc.push.common.protobufB\x1aPublicMiniTickerV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicMiniTickerV3Api_proto_rawDescOnce sync.Once + file_PublicMiniTickerV3Api_proto_rawDescData []byte +) + +func file_PublicMiniTickerV3Api_proto_rawDescGZIP() []byte { + file_PublicMiniTickerV3Api_proto_rawDescOnce.Do(func() { + file_PublicMiniTickerV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicMiniTickerV3Api_proto_rawDesc), len(file_PublicMiniTickerV3Api_proto_rawDesc))) + }) + return file_PublicMiniTickerV3Api_proto_rawDescData +} + +var file_PublicMiniTickerV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicMiniTickerV3Api_proto_goTypes = []any{ + (*PublicMiniTickerV3Api)(nil), // 0: PublicMiniTickerV3Api +} +var file_PublicMiniTickerV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PublicMiniTickerV3Api_proto_init() } +func file_PublicMiniTickerV3Api_proto_init() { + if File_PublicMiniTickerV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicMiniTickerV3Api_proto_rawDesc), len(file_PublicMiniTickerV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicMiniTickerV3Api_proto_goTypes, + DependencyIndexes: file_PublicMiniTickerV3Api_proto_depIdxs, + MessageInfos: file_PublicMiniTickerV3Api_proto_msgTypes, + }.Build() + File_PublicMiniTickerV3Api_proto = out.File + file_PublicMiniTickerV3Api_proto_goTypes = nil + file_PublicMiniTickerV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicMiniTickerV3Api.proto b/go/ws/proto/pb/PublicMiniTickerV3Api.proto new file mode 100644 index 00000000..3e010a4d --- /dev/null +++ b/go/ws/proto/pb/PublicMiniTickerV3Api.proto @@ -0,0 +1,37 @@ +// spot@public.miniTicker.v3.api + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicMiniTickerV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicMiniTickerV3Api { + + // 交易对名 + string symbol = 1; + // 最新价格 + string price = 2; + // utc+8时区涨跌幅 + string rate = 3; + // 时区涨跌幅 + string zonedRate = 4; + // 滚动最高价 + string high = 5; + // 滚动最低价 + string low = 6; + // 滚动成交额 + string volume = 7; + // 滚动成交量 + string quantity = 8; + // utc+8时区上期收盘价模式涨跌幅 + string lastCloseRate = 9; + // 上期收盘价模式时区涨跌幅 + string lastCloseZonedRate = 10; + // 上期收盘价模式滚动最高价 + string lastCloseHigh = 11; + // 上期收盘价模式滚动最低价 + string lastCloseLow = 12; +} \ No newline at end of file diff --git a/go/ws/proto/pb/PublicMiniTickersV3Api.pb.go b/go/ws/proto/pb/PublicMiniTickersV3Api.pb.go new file mode 100644 index 00000000..58bb50a2 --- /dev/null +++ b/go/ws/proto/pb/PublicMiniTickersV3Api.pb.go @@ -0,0 +1,128 @@ +// spot@public.miniTickers.v3.api + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicMiniTickersV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicMiniTickersV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*PublicMiniTickerV3Api `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicMiniTickersV3Api) Reset() { + *x = PublicMiniTickersV3Api{} + mi := &file_PublicMiniTickersV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicMiniTickersV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicMiniTickersV3Api) ProtoMessage() {} + +func (x *PublicMiniTickersV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicMiniTickersV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicMiniTickersV3Api.ProtoReflect.Descriptor instead. +func (*PublicMiniTickersV3Api) Descriptor() ([]byte, []int) { + return file_PublicMiniTickersV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicMiniTickersV3Api) GetItems() []*PublicMiniTickerV3Api { + if x != nil { + return x.Items + } + return nil +} + +var File_PublicMiniTickersV3Api_proto protoreflect.FileDescriptor + +const file_PublicMiniTickersV3Api_proto_rawDesc = "" + + "\n" + + "\x1cPublicMiniTickersV3Api.proto\x1a\x1bPublicMiniTickerV3Api.proto\"F\n" + + "\x16PublicMiniTickersV3Api\x12,\n" + + "\x05items\x18\x01 \x03(\v2\x16.PublicMiniTickerV3ApiR\x05itemsBO\n" + + "\x1ccom.mxc.push.common.protobufB\x1bPublicMiniTickersV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicMiniTickersV3Api_proto_rawDescOnce sync.Once + file_PublicMiniTickersV3Api_proto_rawDescData []byte +) + +func file_PublicMiniTickersV3Api_proto_rawDescGZIP() []byte { + file_PublicMiniTickersV3Api_proto_rawDescOnce.Do(func() { + file_PublicMiniTickersV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicMiniTickersV3Api_proto_rawDesc), len(file_PublicMiniTickersV3Api_proto_rawDesc))) + }) + return file_PublicMiniTickersV3Api_proto_rawDescData +} + +var file_PublicMiniTickersV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicMiniTickersV3Api_proto_goTypes = []any{ + (*PublicMiniTickersV3Api)(nil), // 0: PublicMiniTickersV3Api + (*PublicMiniTickerV3Api)(nil), // 1: PublicMiniTickerV3Api +} +var file_PublicMiniTickersV3Api_proto_depIdxs = []int32{ + 1, // 0: PublicMiniTickersV3Api.items:type_name -> PublicMiniTickerV3Api + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_PublicMiniTickersV3Api_proto_init() } +func file_PublicMiniTickersV3Api_proto_init() { + if File_PublicMiniTickersV3Api_proto != nil { + return + } + file_PublicMiniTickerV3Api_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicMiniTickersV3Api_proto_rawDesc), len(file_PublicMiniTickersV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicMiniTickersV3Api_proto_goTypes, + DependencyIndexes: file_PublicMiniTickersV3Api_proto_depIdxs, + MessageInfos: file_PublicMiniTickersV3Api_proto_msgTypes, + }.Build() + File_PublicMiniTickersV3Api_proto = out.File + file_PublicMiniTickersV3Api_proto_goTypes = nil + file_PublicMiniTickersV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicMiniTickersV3Api.proto b/go/ws/proto/pb/PublicMiniTickersV3Api.proto new file mode 100644 index 00000000..de68968a --- /dev/null +++ b/go/ws/proto/pb/PublicMiniTickersV3Api.proto @@ -0,0 +1,16 @@ +// spot@public.miniTickers.v3.api + +syntax = "proto3"; + +import "PublicMiniTickerV3Api.proto"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicMiniTickersV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicMiniTickersV3Api { + + repeated PublicMiniTickerV3Api items = 1; +} diff --git a/go/ws/proto/pb/PublicSpotKlineV3Api.pb.go b/go/ws/proto/pb/PublicSpotKlineV3Api.pb.go new file mode 100644 index 00000000..59bc4adb --- /dev/null +++ b/go/ws/proto/pb/PublicSpotKlineV3Api.pb.go @@ -0,0 +1,206 @@ +// spot@public.kline.v3.api.pb@@ + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PublicSpotKlineV3Api.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublicSpotKlineV3Api struct { + state protoimpl.MessageState `protogen:"open.v1"` + // K线周期(Min1,Min5,Min15,Min30,Min60,Hour4,Hour8,Day1,Week1,Month1) + Interval string `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` + // 窗口开始时间戳(秒时间戳) + WindowStart int64 `protobuf:"varint,2,opt,name=windowStart,proto3" json:"windowStart,omitempty"` + // 开盘价 + OpeningPrice string `protobuf:"bytes,3,opt,name=openingPrice,proto3" json:"openingPrice,omitempty"` + // 收盘价 + ClosingPrice string `protobuf:"bytes,4,opt,name=closingPrice,proto3" json:"closingPrice,omitempty"` + // 最高价 + HighestPrice string `protobuf:"bytes,5,opt,name=highestPrice,proto3" json:"highestPrice,omitempty"` + // 最低价 + LowestPrice string `protobuf:"bytes,6,opt,name=lowestPrice,proto3" json:"lowestPrice,omitempty"` + // 成交量 + Volume string `protobuf:"bytes,7,opt,name=volume,proto3" json:"volume,omitempty"` + // 成交额 + Amount string `protobuf:"bytes,8,opt,name=amount,proto3" json:"amount,omitempty"` + // 窗口结束时间戳(秒时间戳) + WindowEnd int64 `protobuf:"varint,9,opt,name=windowEnd,proto3" json:"windowEnd,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicSpotKlineV3Api) Reset() { + *x = PublicSpotKlineV3Api{} + mi := &file_PublicSpotKlineV3Api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicSpotKlineV3Api) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicSpotKlineV3Api) ProtoMessage() {} + +func (x *PublicSpotKlineV3Api) ProtoReflect() protoreflect.Message { + mi := &file_PublicSpotKlineV3Api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicSpotKlineV3Api.ProtoReflect.Descriptor instead. +func (*PublicSpotKlineV3Api) Descriptor() ([]byte, []int) { + return file_PublicSpotKlineV3Api_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicSpotKlineV3Api) GetInterval() string { + if x != nil { + return x.Interval + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetWindowStart() int64 { + if x != nil { + return x.WindowStart + } + return 0 +} + +func (x *PublicSpotKlineV3Api) GetOpeningPrice() string { + if x != nil { + return x.OpeningPrice + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetClosingPrice() string { + if x != nil { + return x.ClosingPrice + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetHighestPrice() string { + if x != nil { + return x.HighestPrice + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetLowestPrice() string { + if x != nil { + return x.LowestPrice + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetVolume() string { + if x != nil { + return x.Volume + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *PublicSpotKlineV3Api) GetWindowEnd() int64 { + if x != nil { + return x.WindowEnd + } + return 0 +} + +var File_PublicSpotKlineV3Api_proto protoreflect.FileDescriptor + +const file_PublicSpotKlineV3Api_proto_rawDesc = "" + + "\n" + + "\x1aPublicSpotKlineV3Api.proto\"\xb0\x02\n" + + "\x14PublicSpotKlineV3Api\x12\x1a\n" + + "\binterval\x18\x01 \x01(\tR\binterval\x12 \n" + + "\vwindowStart\x18\x02 \x01(\x03R\vwindowStart\x12\"\n" + + "\fopeningPrice\x18\x03 \x01(\tR\fopeningPrice\x12\"\n" + + "\fclosingPrice\x18\x04 \x01(\tR\fclosingPrice\x12\"\n" + + "\fhighestPrice\x18\x05 \x01(\tR\fhighestPrice\x12 \n" + + "\vlowestPrice\x18\x06 \x01(\tR\vlowestPrice\x12\x16\n" + + "\x06volume\x18\a \x01(\tR\x06volume\x12\x16\n" + + "\x06amount\x18\b \x01(\tR\x06amount\x12\x1c\n" + + "\twindowEnd\x18\t \x01(\x03R\twindowEndBM\n" + + "\x1ccom.mxc.push.common.protobufB\x19PublicSpotKlineV3ApiProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PublicSpotKlineV3Api_proto_rawDescOnce sync.Once + file_PublicSpotKlineV3Api_proto_rawDescData []byte +) + +func file_PublicSpotKlineV3Api_proto_rawDescGZIP() []byte { + file_PublicSpotKlineV3Api_proto_rawDescOnce.Do(func() { + file_PublicSpotKlineV3Api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PublicSpotKlineV3Api_proto_rawDesc), len(file_PublicSpotKlineV3Api_proto_rawDesc))) + }) + return file_PublicSpotKlineV3Api_proto_rawDescData +} + +var file_PublicSpotKlineV3Api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PublicSpotKlineV3Api_proto_goTypes = []any{ + (*PublicSpotKlineV3Api)(nil), // 0: PublicSpotKlineV3Api +} +var file_PublicSpotKlineV3Api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_PublicSpotKlineV3Api_proto_init() } +func file_PublicSpotKlineV3Api_proto_init() { + if File_PublicSpotKlineV3Api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PublicSpotKlineV3Api_proto_rawDesc), len(file_PublicSpotKlineV3Api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PublicSpotKlineV3Api_proto_goTypes, + DependencyIndexes: file_PublicSpotKlineV3Api_proto_depIdxs, + MessageInfos: file_PublicSpotKlineV3Api_proto_msgTypes, + }.Build() + File_PublicSpotKlineV3Api_proto = out.File + file_PublicSpotKlineV3Api_proto_goTypes = nil + file_PublicSpotKlineV3Api_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PublicSpotKlineV3Api.proto b/go/ws/proto/pb/PublicSpotKlineV3Api.proto new file mode 100644 index 00000000..3e5292e1 --- /dev/null +++ b/go/ws/proto/pb/PublicSpotKlineV3Api.proto @@ -0,0 +1,30 @@ +// spot@public.kline.v3.api.pb@@ + +syntax = "proto3"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PublicSpotKlineV3ApiProto"; +option go_package = "proto-ws-go/pb"; + +message PublicSpotKlineV3Api { + //K线周期(Min1,Min5,Min15,Min30,Min60,Hour4,Hour8,Day1,Week1,Month1) + string interval = 1; + // 窗口开始时间戳(秒时间戳) + int64 windowStart = 2; + // 开盘价 + string openingPrice = 3; + // 收盘价 + string closingPrice = 4; + // 最高价 + string highestPrice = 5; + // 最低价 + string lowestPrice = 6; + // 成交量 + string volume = 7; + // 成交额 + string amount = 8; + // 窗口结束时间戳(秒时间戳) + int64 windowEnd = 9; +} \ No newline at end of file diff --git a/go/ws/proto/pb/PushDataV3ApiWrapper.pb.go b/go/ws/proto/pb/PushDataV3ApiWrapper.pb.go new file mode 100644 index 00000000..18098cfd --- /dev/null +++ b/go/ws/proto/pb/PushDataV3ApiWrapper.pb.go @@ -0,0 +1,511 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.2 +// source: PushDataV3ApiWrapper.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PushDataV3ApiWrapper struct { + state protoimpl.MessageState `protogen:"open.v1"` + // * + // 频道 + Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` + // * + // 数据,NOTE:因为不能重复,所以类型和变量名尽量使用全名 + // + // Types that are valid to be assigned to Body: + // + // *PushDataV3ApiWrapper_PublicDeals + // *PushDataV3ApiWrapper_PublicIncreaseDepths + // *PushDataV3ApiWrapper_PublicLimitDepths + // *PushDataV3ApiWrapper_PrivateOrders + // *PushDataV3ApiWrapper_PublicBookTicker + // *PushDataV3ApiWrapper_PrivateDeals + // *PushDataV3ApiWrapper_PrivateAccount + // *PushDataV3ApiWrapper_PublicSpotKline + // *PushDataV3ApiWrapper_PublicMiniTicker + // *PushDataV3ApiWrapper_PublicMiniTickers + // *PushDataV3ApiWrapper_PublicBookTickerBatch + // *PushDataV3ApiWrapper_PublicIncreaseDepthsBatch + // *PushDataV3ApiWrapper_PublicAggreDepths + // *PushDataV3ApiWrapper_PublicAggreDeals + // *PushDataV3ApiWrapper_PublicAggreBookTicker + Body isPushDataV3ApiWrapper_Body `protobuf_oneof:"body"` + // * + // 交易对 + Symbol *string `protobuf:"bytes,3,opt,name=symbol,proto3,oneof" json:"symbol,omitempty"` + // * + // 交易对ID + SymbolId *string `protobuf:"bytes,4,opt,name=symbolId,proto3,oneof" json:"symbolId,omitempty"` + // * + // 消息生成时间 + CreateTime *int64 `protobuf:"varint,5,opt,name=createTime,proto3,oneof" json:"createTime,omitempty"` + // * + // 消息推送时间 + SendTime *int64 `protobuf:"varint,6,opt,name=sendTime,proto3,oneof" json:"sendTime,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushDataV3ApiWrapper) Reset() { + *x = PushDataV3ApiWrapper{} + mi := &file_PushDataV3ApiWrapper_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushDataV3ApiWrapper) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushDataV3ApiWrapper) ProtoMessage() {} + +func (x *PushDataV3ApiWrapper) ProtoReflect() protoreflect.Message { + mi := &file_PushDataV3ApiWrapper_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushDataV3ApiWrapper.ProtoReflect.Descriptor instead. +func (*PushDataV3ApiWrapper) Descriptor() ([]byte, []int) { + return file_PushDataV3ApiWrapper_proto_rawDescGZIP(), []int{0} +} + +func (x *PushDataV3ApiWrapper) GetChannel() string { + if x != nil { + return x.Channel + } + return "" +} + +func (x *PushDataV3ApiWrapper) GetBody() isPushDataV3ApiWrapper_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicDeals() *PublicDealsV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicDeals); ok { + return x.PublicDeals + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicIncreaseDepths() *PublicIncreaseDepthsV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicIncreaseDepths); ok { + return x.PublicIncreaseDepths + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicLimitDepths() *PublicLimitDepthsV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicLimitDepths); ok { + return x.PublicLimitDepths + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPrivateOrders() *PrivateOrdersV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PrivateOrders); ok { + return x.PrivateOrders + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicBookTicker() *PublicBookTickerV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicBookTicker); ok { + return x.PublicBookTicker + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPrivateDeals() *PrivateDealsV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PrivateDeals); ok { + return x.PrivateDeals + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPrivateAccount() *PrivateAccountV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PrivateAccount); ok { + return x.PrivateAccount + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicSpotKline() *PublicSpotKlineV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicSpotKline); ok { + return x.PublicSpotKline + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicMiniTicker() *PublicMiniTickerV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicMiniTicker); ok { + return x.PublicMiniTicker + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicMiniTickers() *PublicMiniTickersV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicMiniTickers); ok { + return x.PublicMiniTickers + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicBookTickerBatch() *PublicBookTickerBatchV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicBookTickerBatch); ok { + return x.PublicBookTickerBatch + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicIncreaseDepthsBatch() *PublicIncreaseDepthsBatchV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicIncreaseDepthsBatch); ok { + return x.PublicIncreaseDepthsBatch + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicAggreDepths() *PublicAggreDepthsV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicAggreDepths); ok { + return x.PublicAggreDepths + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicAggreDeals() *PublicAggreDealsV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicAggreDeals); ok { + return x.PublicAggreDeals + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetPublicAggreBookTicker() *PublicAggreBookTickerV3Api { + if x != nil { + if x, ok := x.Body.(*PushDataV3ApiWrapper_PublicAggreBookTicker); ok { + return x.PublicAggreBookTicker + } + } + return nil +} + +func (x *PushDataV3ApiWrapper) GetSymbol() string { + if x != nil && x.Symbol != nil { + return *x.Symbol + } + return "" +} + +func (x *PushDataV3ApiWrapper) GetSymbolId() string { + if x != nil && x.SymbolId != nil { + return *x.SymbolId + } + return "" +} + +func (x *PushDataV3ApiWrapper) GetCreateTime() int64 { + if x != nil && x.CreateTime != nil { + return *x.CreateTime + } + return 0 +} + +func (x *PushDataV3ApiWrapper) GetSendTime() int64 { + if x != nil && x.SendTime != nil { + return *x.SendTime + } + return 0 +} + +type isPushDataV3ApiWrapper_Body interface { + isPushDataV3ApiWrapper_Body() +} + +type PushDataV3ApiWrapper_PublicDeals struct { + PublicDeals *PublicDealsV3Api `protobuf:"bytes,301,opt,name=publicDeals,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicIncreaseDepths struct { + PublicIncreaseDepths *PublicIncreaseDepthsV3Api `protobuf:"bytes,302,opt,name=publicIncreaseDepths,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicLimitDepths struct { + PublicLimitDepths *PublicLimitDepthsV3Api `protobuf:"bytes,303,opt,name=publicLimitDepths,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PrivateOrders struct { + PrivateOrders *PrivateOrdersV3Api `protobuf:"bytes,304,opt,name=privateOrders,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicBookTicker struct { + PublicBookTicker *PublicBookTickerV3Api `protobuf:"bytes,305,opt,name=publicBookTicker,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PrivateDeals struct { + PrivateDeals *PrivateDealsV3Api `protobuf:"bytes,306,opt,name=privateDeals,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PrivateAccount struct { + PrivateAccount *PrivateAccountV3Api `protobuf:"bytes,307,opt,name=privateAccount,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicSpotKline struct { + PublicSpotKline *PublicSpotKlineV3Api `protobuf:"bytes,308,opt,name=publicSpotKline,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicMiniTicker struct { + PublicMiniTicker *PublicMiniTickerV3Api `protobuf:"bytes,309,opt,name=publicMiniTicker,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicMiniTickers struct { + PublicMiniTickers *PublicMiniTickersV3Api `protobuf:"bytes,310,opt,name=publicMiniTickers,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicBookTickerBatch struct { + PublicBookTickerBatch *PublicBookTickerBatchV3Api `protobuf:"bytes,311,opt,name=publicBookTickerBatch,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicIncreaseDepthsBatch struct { + PublicIncreaseDepthsBatch *PublicIncreaseDepthsBatchV3Api `protobuf:"bytes,312,opt,name=publicIncreaseDepthsBatch,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicAggreDepths struct { + PublicAggreDepths *PublicAggreDepthsV3Api `protobuf:"bytes,313,opt,name=publicAggreDepths,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicAggreDeals struct { + PublicAggreDeals *PublicAggreDealsV3Api `protobuf:"bytes,314,opt,name=publicAggreDeals,proto3,oneof"` +} + +type PushDataV3ApiWrapper_PublicAggreBookTicker struct { + PublicAggreBookTicker *PublicAggreBookTickerV3Api `protobuf:"bytes,315,opt,name=publicAggreBookTicker,proto3,oneof"` +} + +func (*PushDataV3ApiWrapper_PublicDeals) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicIncreaseDepths) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicLimitDepths) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PrivateOrders) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicBookTicker) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PrivateDeals) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PrivateAccount) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicSpotKline) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicMiniTicker) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicMiniTickers) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicBookTickerBatch) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicIncreaseDepthsBatch) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicAggreDepths) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicAggreDeals) isPushDataV3ApiWrapper_Body() {} + +func (*PushDataV3ApiWrapper_PublicAggreBookTicker) isPushDataV3ApiWrapper_Body() {} + +var File_PushDataV3ApiWrapper_proto protoreflect.FileDescriptor + +const file_PushDataV3ApiWrapper_proto_rawDesc = "" + + "\n" + + "\x1aPushDataV3ApiWrapper.proto\x1a\x16PublicDealsV3Api.proto\x1a\x1fPublicIncreaseDepthsV3Api.proto\x1a\x1cPublicLimitDepthsV3Api.proto\x1a\x18PrivateOrdersV3Api.proto\x1a\x1bPublicBookTickerV3Api.proto\x1a\x17PrivateDealsV3Api.proto\x1a\x19PrivateAccountV3Api.proto\x1a\x1aPublicSpotKlineV3Api.proto\x1a\x1bPublicMiniTickerV3Api.proto\x1a\x1cPublicMiniTickersV3Api.proto\x1a PublicBookTickerBatchV3Api.proto\x1a$PublicIncreaseDepthsBatchV3Api.proto\x1a\x1cPublicAggreDepthsV3Api.proto\x1a\x1bPublicAggreDealsV3Api.proto\x1a PublicAggreBookTickerV3Api.proto\"\xba\n" + + "\n" + + "\x14PushDataV3ApiWrapper\x12\x18\n" + + "\achannel\x18\x01 \x01(\tR\achannel\x126\n" + + "\vpublicDeals\x18\xad\x02 \x01(\v2\x11.PublicDealsV3ApiH\x00R\vpublicDeals\x12Q\n" + + "\x14publicIncreaseDepths\x18\xae\x02 \x01(\v2\x1a.PublicIncreaseDepthsV3ApiH\x00R\x14publicIncreaseDepths\x12H\n" + + "\x11publicLimitDepths\x18\xaf\x02 \x01(\v2\x17.PublicLimitDepthsV3ApiH\x00R\x11publicLimitDepths\x12<\n" + + "\rprivateOrders\x18\xb0\x02 \x01(\v2\x13.PrivateOrdersV3ApiH\x00R\rprivateOrders\x12E\n" + + "\x10publicBookTicker\x18\xb1\x02 \x01(\v2\x16.PublicBookTickerV3ApiH\x00R\x10publicBookTicker\x129\n" + + "\fprivateDeals\x18\xb2\x02 \x01(\v2\x12.PrivateDealsV3ApiH\x00R\fprivateDeals\x12?\n" + + "\x0eprivateAccount\x18\xb3\x02 \x01(\v2\x14.PrivateAccountV3ApiH\x00R\x0eprivateAccount\x12B\n" + + "\x0fpublicSpotKline\x18\xb4\x02 \x01(\v2\x15.PublicSpotKlineV3ApiH\x00R\x0fpublicSpotKline\x12E\n" + + "\x10publicMiniTicker\x18\xb5\x02 \x01(\v2\x16.PublicMiniTickerV3ApiH\x00R\x10publicMiniTicker\x12H\n" + + "\x11publicMiniTickers\x18\xb6\x02 \x01(\v2\x17.PublicMiniTickersV3ApiH\x00R\x11publicMiniTickers\x12T\n" + + "\x15publicBookTickerBatch\x18\xb7\x02 \x01(\v2\x1b.PublicBookTickerBatchV3ApiH\x00R\x15publicBookTickerBatch\x12`\n" + + "\x19publicIncreaseDepthsBatch\x18\xb8\x02 \x01(\v2\x1f.PublicIncreaseDepthsBatchV3ApiH\x00R\x19publicIncreaseDepthsBatch\x12H\n" + + "\x11publicAggreDepths\x18\xb9\x02 \x01(\v2\x17.PublicAggreDepthsV3ApiH\x00R\x11publicAggreDepths\x12E\n" + + "\x10publicAggreDeals\x18\xba\x02 \x01(\v2\x16.PublicAggreDealsV3ApiH\x00R\x10publicAggreDeals\x12T\n" + + "\x15publicAggreBookTicker\x18\xbb\x02 \x01(\v2\x1b.PublicAggreBookTickerV3ApiH\x00R\x15publicAggreBookTicker\x12\x1b\n" + + "\x06symbol\x18\x03 \x01(\tH\x01R\x06symbol\x88\x01\x01\x12\x1f\n" + + "\bsymbolId\x18\x04 \x01(\tH\x02R\bsymbolId\x88\x01\x01\x12#\n" + + "\n" + + "createTime\x18\x05 \x01(\x03H\x03R\n" + + "createTime\x88\x01\x01\x12\x1f\n" + + "\bsendTime\x18\x06 \x01(\x03H\x04R\bsendTime\x88\x01\x01B\x06\n" + + "\x04bodyB\t\n" + + "\a_symbolB\v\n" + + "\t_symbolIdB\r\n" + + "\v_createTimeB\v\n" + + "\t_sendTimeBM\n" + + "\x1ccom.mxc.push.common.protobufB\x19PushDataV3ApiWrapperProtoH\x01P\x01Z\x0eproto-ws-go/pbb\x06proto3" + +var ( + file_PushDataV3ApiWrapper_proto_rawDescOnce sync.Once + file_PushDataV3ApiWrapper_proto_rawDescData []byte +) + +func file_PushDataV3ApiWrapper_proto_rawDescGZIP() []byte { + file_PushDataV3ApiWrapper_proto_rawDescOnce.Do(func() { + file_PushDataV3ApiWrapper_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_PushDataV3ApiWrapper_proto_rawDesc), len(file_PushDataV3ApiWrapper_proto_rawDesc))) + }) + return file_PushDataV3ApiWrapper_proto_rawDescData +} + +var file_PushDataV3ApiWrapper_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_PushDataV3ApiWrapper_proto_goTypes = []any{ + (*PushDataV3ApiWrapper)(nil), // 0: PushDataV3ApiWrapper + (*PublicDealsV3Api)(nil), // 1: PublicDealsV3Api + (*PublicIncreaseDepthsV3Api)(nil), // 2: PublicIncreaseDepthsV3Api + (*PublicLimitDepthsV3Api)(nil), // 3: PublicLimitDepthsV3Api + (*PrivateOrdersV3Api)(nil), // 4: PrivateOrdersV3Api + (*PublicBookTickerV3Api)(nil), // 5: PublicBookTickerV3Api + (*PrivateDealsV3Api)(nil), // 6: PrivateDealsV3Api + (*PrivateAccountV3Api)(nil), // 7: PrivateAccountV3Api + (*PublicSpotKlineV3Api)(nil), // 8: PublicSpotKlineV3Api + (*PublicMiniTickerV3Api)(nil), // 9: PublicMiniTickerV3Api + (*PublicMiniTickersV3Api)(nil), // 10: PublicMiniTickersV3Api + (*PublicBookTickerBatchV3Api)(nil), // 11: PublicBookTickerBatchV3Api + (*PublicIncreaseDepthsBatchV3Api)(nil), // 12: PublicIncreaseDepthsBatchV3Api + (*PublicAggreDepthsV3Api)(nil), // 13: PublicAggreDepthsV3Api + (*PublicAggreDealsV3Api)(nil), // 14: PublicAggreDealsV3Api + (*PublicAggreBookTickerV3Api)(nil), // 15: PublicAggreBookTickerV3Api +} +var file_PushDataV3ApiWrapper_proto_depIdxs = []int32{ + 1, // 0: PushDataV3ApiWrapper.publicDeals:type_name -> PublicDealsV3Api + 2, // 1: PushDataV3ApiWrapper.publicIncreaseDepths:type_name -> PublicIncreaseDepthsV3Api + 3, // 2: PushDataV3ApiWrapper.publicLimitDepths:type_name -> PublicLimitDepthsV3Api + 4, // 3: PushDataV3ApiWrapper.privateOrders:type_name -> PrivateOrdersV3Api + 5, // 4: PushDataV3ApiWrapper.publicBookTicker:type_name -> PublicBookTickerV3Api + 6, // 5: PushDataV3ApiWrapper.privateDeals:type_name -> PrivateDealsV3Api + 7, // 6: PushDataV3ApiWrapper.privateAccount:type_name -> PrivateAccountV3Api + 8, // 7: PushDataV3ApiWrapper.publicSpotKline:type_name -> PublicSpotKlineV3Api + 9, // 8: PushDataV3ApiWrapper.publicMiniTicker:type_name -> PublicMiniTickerV3Api + 10, // 9: PushDataV3ApiWrapper.publicMiniTickers:type_name -> PublicMiniTickersV3Api + 11, // 10: PushDataV3ApiWrapper.publicBookTickerBatch:type_name -> PublicBookTickerBatchV3Api + 12, // 11: PushDataV3ApiWrapper.publicIncreaseDepthsBatch:type_name -> PublicIncreaseDepthsBatchV3Api + 13, // 12: PushDataV3ApiWrapper.publicAggreDepths:type_name -> PublicAggreDepthsV3Api + 14, // 13: PushDataV3ApiWrapper.publicAggreDeals:type_name -> PublicAggreDealsV3Api + 15, // 14: PushDataV3ApiWrapper.publicAggreBookTicker:type_name -> PublicAggreBookTickerV3Api + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_PushDataV3ApiWrapper_proto_init() } +func file_PushDataV3ApiWrapper_proto_init() { + if File_PushDataV3ApiWrapper_proto != nil { + return + } + file_PublicDealsV3Api_proto_init() + file_PublicIncreaseDepthsV3Api_proto_init() + file_PublicLimitDepthsV3Api_proto_init() + file_PrivateOrdersV3Api_proto_init() + file_PublicBookTickerV3Api_proto_init() + file_PrivateDealsV3Api_proto_init() + file_PrivateAccountV3Api_proto_init() + file_PublicSpotKlineV3Api_proto_init() + file_PublicMiniTickerV3Api_proto_init() + file_PublicMiniTickersV3Api_proto_init() + file_PublicBookTickerBatchV3Api_proto_init() + file_PublicIncreaseDepthsBatchV3Api_proto_init() + file_PublicAggreDepthsV3Api_proto_init() + file_PublicAggreDealsV3Api_proto_init() + file_PublicAggreBookTickerV3Api_proto_init() + file_PushDataV3ApiWrapper_proto_msgTypes[0].OneofWrappers = []any{ + (*PushDataV3ApiWrapper_PublicDeals)(nil), + (*PushDataV3ApiWrapper_PublicIncreaseDepths)(nil), + (*PushDataV3ApiWrapper_PublicLimitDepths)(nil), + (*PushDataV3ApiWrapper_PrivateOrders)(nil), + (*PushDataV3ApiWrapper_PublicBookTicker)(nil), + (*PushDataV3ApiWrapper_PrivateDeals)(nil), + (*PushDataV3ApiWrapper_PrivateAccount)(nil), + (*PushDataV3ApiWrapper_PublicSpotKline)(nil), + (*PushDataV3ApiWrapper_PublicMiniTicker)(nil), + (*PushDataV3ApiWrapper_PublicMiniTickers)(nil), + (*PushDataV3ApiWrapper_PublicBookTickerBatch)(nil), + (*PushDataV3ApiWrapper_PublicIncreaseDepthsBatch)(nil), + (*PushDataV3ApiWrapper_PublicAggreDepths)(nil), + (*PushDataV3ApiWrapper_PublicAggreDeals)(nil), + (*PushDataV3ApiWrapper_PublicAggreBookTicker)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_PushDataV3ApiWrapper_proto_rawDesc), len(file_PushDataV3ApiWrapper_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_PushDataV3ApiWrapper_proto_goTypes, + DependencyIndexes: file_PushDataV3ApiWrapper_proto_depIdxs, + MessageInfos: file_PushDataV3ApiWrapper_proto_msgTypes, + }.Build() + File_PushDataV3ApiWrapper_proto = out.File + file_PushDataV3ApiWrapper_proto_goTypes = nil + file_PushDataV3ApiWrapper_proto_depIdxs = nil +} diff --git a/go/ws/proto/pb/PushDataV3ApiWrapper.proto b/go/ws/proto/pb/PushDataV3ApiWrapper.proto new file mode 100644 index 00000000..20b8fdde --- /dev/null +++ b/go/ws/proto/pb/PushDataV3ApiWrapper.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; + +import "PublicDealsV3Api.proto"; +import "PublicIncreaseDepthsV3Api.proto"; +import "PublicLimitDepthsV3Api.proto"; +import "PrivateOrdersV3Api.proto"; +import "PublicBookTickerV3Api.proto"; +import "PrivateDealsV3Api.proto"; +import "PrivateAccountV3Api.proto"; +import "PublicSpotKlineV3Api.proto"; +import "PublicMiniTickerV3Api.proto"; +import "PublicMiniTickersV3Api.proto"; +import "PublicBookTickerBatchV3Api.proto"; +import "PublicIncreaseDepthsBatchV3Api.proto"; +import "PublicAggreDepthsV3Api.proto"; +import "PublicAggreDealsV3Api.proto"; +import "PublicAggreBookTickerV3Api.proto"; + +option java_package = "com.mxc.push.common.protobuf"; +option optimize_for = SPEED; +option java_multiple_files = true; +option java_outer_classname = "PushDataV3ApiWrapperProto"; +option go_package = "proto-ws-go/pb"; + +message PushDataV3ApiWrapper { + + + /** + * 频道 + */ + string channel = 1; + + /** + * 数据,NOTE:因为不能重复,所以类型和变量名尽量使用全名 + */ + oneof body { + PublicDealsV3Api publicDeals = 301; + PublicIncreaseDepthsV3Api publicIncreaseDepths = 302; + PublicLimitDepthsV3Api publicLimitDepths = 303; + PrivateOrdersV3Api privateOrders = 304; + PublicBookTickerV3Api publicBookTicker = 305; + PrivateDealsV3Api privateDeals = 306; + PrivateAccountV3Api privateAccount = 307; + PublicSpotKlineV3Api publicSpotKline = 308; + PublicMiniTickerV3Api publicMiniTicker = 309; + PublicMiniTickersV3Api publicMiniTickers = 310; + PublicBookTickerBatchV3Api publicBookTickerBatch = 311; + PublicIncreaseDepthsBatchV3Api publicIncreaseDepthsBatch = 312; + PublicAggreDepthsV3Api publicAggreDepths = 313; + PublicAggreDealsV3Api publicAggreDeals = 314; + PublicAggreBookTickerV3Api publicAggreBookTicker = 315; + } + + /** + * 交易对 + */ + optional string symbol = 3; + + /** + * 交易对ID + */ + optional string symbolId = 4; + + /** + * 消息生成时间 + */ + optional int64 createTime = 5; + + /** + * 消息推送时间 + */ + optional int64 sendTime = 6; + +} \ No newline at end of file diff --git a/go/ws/proto/ws.go b/go/ws/proto/ws.go new file mode 100644 index 00000000..ac961c2d --- /dev/null +++ b/go/ws/proto/ws.go @@ -0,0 +1,104 @@ +package main + +import ( + "encoding/json" + "log" + "os" + "os/signal" + "time" + + "github.com/gorilla/websocket" + "google.golang.org/protobuf/proto" + pb "proto-ws-go/pb" +) + +const ( + websocketURL = "wss://wbs-api.mexc.com/ws" +) + +func main() { + interrupt := make(chan os.Signal, 1) + signal.Notify(interrupt, os.Interrupt) + + c, _, err := websocket.DefaultDialer.Dial(websocketURL, nil) + if err != nil { + log.Fatal("dial:", err) + } + defer c.Close() + + done := make(chan struct{}) + + // 订阅消息 + subscriptionMessage := map[string]interface{}{ + "method": "SUBSCRIPTION", + "params": []string{"spot@public.limit.depth.v3.api.pb@USDCUSDT@5"}, + } + subMsg, _ := json.Marshal(subscriptionMessage) + + // PING 消息 + pingMessage := map[string]string{ + "method": "PING", + } + pingMsg, _ := json.Marshal(pingMessage) + + // 发送订阅消息 + err = c.WriteMessage(websocket.TextMessage, subMsg) + if err != nil { + log.Println("write:", err) + return + } + log.Printf("发送订阅消息: %s", subMsg) + + // 定时发送 PING + ticker := time.NewTicker(15 * time.Second) + defer ticker.Stop() + + go func() { + defer close(done) + for { + select { + case <-ticker.C: + err := c.WriteMessage(websocket.TextMessage, pingMsg) + if err != nil { + log.Println("write:", err) + return + } + log.Printf("发送 PING 消息: %s", pingMsg) + case <-interrupt: + log.Println("收到中断信号,关闭连接...") + err := c.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) + if err != nil { + log.Println("write close:", err) + return + } + return + } + } + }() + + // 接收消息 + for { + _, message, err := c.ReadMessage() + if err != nil { + log.Println("read:", err) + return + } + + // 处理 Protobuf 消息 + // 注意:这里需要替换为您的 Protobuf 解码逻辑 + // decodedMessage := &pb.PushDataV3ApiWrapper{} + // if err := proto.Unmarshal(message, decodedMessage); err != nil { + // log.Println("protobuf unmarshal error:", err) + // continue + // } + + decodedMessage := &pb.PushDataV3ApiWrapper{} + if err := proto.Unmarshal(message, decodedMessage); err != nil { + log.Println("protobuf unmarshal error:", err) + continue + } + + // 打印解码后的消息 + log.Printf("收到消息: %+v", decodedMessage) + } +} diff --git a/go/ws/v2/.DS_Store b/go/ws/v2/.DS_Store new file mode 100644 index 00000000..bea84848 Binary files /dev/null and b/go/ws/v2/.DS_Store differ