Documentation ¶
Index ¶
- Variables
- func RegisterOrderMatchingServiceServer(s grpc.ServiceRegistrar, srv OrderMatchingServiceServer)
- type ListAllAskReply
- type ListAllAsksRequest
- func (*ListAllAsksRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllAsksRequest) GetSymbol() string
- func (*ListAllAsksRequest) ProtoMessage()
- func (x *ListAllAsksRequest) ProtoReflect() protoreflect.Message
- func (x *ListAllAsksRequest) Reset()
- func (x *ListAllAsksRequest) String() string
- type ListAllBidsReply
- type ListAllBidsRequest
- func (*ListAllBidsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllBidsRequest) GetSymbol() string
- func (*ListAllBidsRequest) ProtoMessage()
- func (x *ListAllBidsRequest) ProtoReflect() protoreflect.Message
- func (x *ListAllBidsRequest) Reset()
- func (x *ListAllBidsRequest) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCreatedAtMilli() int64
- func (x *Order) GetFilledQuantity() int64
- func (x *Order) GetID() string
- func (x *Order) GetKind() OrderKind
- func (x *Order) GetParams() OrderParams
- func (x *Order) GetPrice() *Price
- func (x *Order) GetQuantity() int64
- func (x *Order) GetStopPrice() *Price
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderKind
- type OrderMatchingServiceClient
- type OrderMatchingServiceServer
- type OrderParams
- func (OrderParams) Descriptor() protoreflect.EnumDescriptor
- func (x OrderParams) Enum() *OrderParams
- func (OrderParams) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderParams) Number() protoreflect.EnumNumber
- func (x OrderParams) String() string
- func (OrderParams) Type() protoreflect.EnumType
- type OrderSide
- type Price
- type SubmitOrderReply
- func (*SubmitOrderReply) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitOrderReply) GetCreatedAtMilli() int64
- func (x *SubmitOrderReply) GetOrderID() string
- func (*SubmitOrderReply) ProtoMessage()
- func (x *SubmitOrderReply) ProtoReflect() protoreflect.Message
- func (x *SubmitOrderReply) Reset()
- func (x *SubmitOrderReply) String() string
- type SubmitOrderRequest
- func (*SubmitOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitOrderRequest) GetCustomerID() string
- func (x *SubmitOrderRequest) GetKind() OrderKind
- func (x *SubmitOrderRequest) GetParams() OrderParams
- func (x *SubmitOrderRequest) GetPrice() *Price
- func (x *SubmitOrderRequest) GetQuantity() int64
- func (x *SubmitOrderRequest) GetSide() OrderSide
- func (x *SubmitOrderRequest) GetStopPrice() *Price
- func (x *SubmitOrderRequest) GetSymbol() string
- func (*SubmitOrderRequest) ProtoMessage()
- func (x *SubmitOrderRequest) ProtoReflect() protoreflect.Message
- func (x *SubmitOrderRequest) Reset()
- func (x *SubmitOrderRequest) String() string
- type UnimplementedOrderMatchingServiceServer
- func (UnimplementedOrderMatchingServiceServer) ListAllAsks(context.Context, *ListAllAsksRequest) (*ListAllAskReply, error)
- func (UnimplementedOrderMatchingServiceServer) ListAllBids(context.Context, *ListAllBidsRequest) (*ListAllBidsReply, error)
- func (UnimplementedOrderMatchingServiceServer) SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderReply, error)
- type UnsafeOrderMatchingServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( OrderParams_name = map[int32]string{ 0: "ORDER_PARAMS_UNKNOWN", 1: "ORDER_PARAMS_STOP", 2: "ORDER_PARAMS_AON", 3: "ORDER_PARAMS_IOC", 4: "ORDER_PARAMS_FOK", 5: "ORDER_PARAMS_GTC", 6: "ORDER_PARAMS_GFD", 7: "ORDER_PARAMS_GTD", } OrderParams_value = map[string]int32{ "ORDER_PARAMS_UNKNOWN": 0, "ORDER_PARAMS_STOP": 1, "ORDER_PARAMS_AON": 2, "ORDER_PARAMS_IOC": 3, "ORDER_PARAMS_FOK": 4, "ORDER_PARAMS_GTC": 5, "ORDER_PARAMS_GFD": 6, "ORDER_PARAMS_GTD": 7, } )
Enum value maps for OrderParams.
var ( OrderKind_name = map[int32]string{ 0: "ORDER_KIND_UNKNOWN", 1: "ORDER_KIND_MARKET", 2: "ORDER_KIND_LIMIT", } OrderKind_value = map[string]int32{ "ORDER_KIND_UNKNOWN": 0, "ORDER_KIND_MARKET": 1, "ORDER_KIND_LIMIT": 2, } )
Enum value maps for OrderKind.
var ( OrderSide_name = map[int32]string{ 0: "ORDER_SIDE_UNKNOWN", 1: "ORDER_SIDE_BUY", 2: "ORDER_SIDE_SELL", } OrderSide_value = map[string]int32{ "ORDER_SIDE_UNKNOWN": 0, "ORDER_SIDE_BUY": 1, "ORDER_SIDE_SELL": 2, } )
Enum value maps for OrderSide.
var File_order_order_proto protoreflect.FileDescriptor
var OrderMatchingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "order.OrderMatchingService", HandlerType: (*OrderMatchingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SubmitOrder", Handler: _OrderMatchingService_SubmitOrder_Handler, }, { MethodName: "ListAllAsks", Handler: _OrderMatchingService_ListAllAsks_Handler, }, { MethodName: "ListAllBids", Handler: _OrderMatchingService_ListAllBids_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "order/order.proto", }
OrderMatchingService_ServiceDesc is the grpc.ServiceDesc for OrderMatchingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrderMatchingServiceServer ¶
func RegisterOrderMatchingServiceServer(s grpc.ServiceRegistrar, srv OrderMatchingServiceServer)
Types ¶
type ListAllAskReply ¶
type ListAllAskReply struct { Orders []*Order `protobuf:"bytes,1,rep,name=Orders,proto3" json:"Orders,omitempty"` // contains filtered or unexported fields }
func (*ListAllAskReply) Descriptor
deprecated
func (*ListAllAskReply) Descriptor() ([]byte, []int)
Deprecated: Use ListAllAskReply.ProtoReflect.Descriptor instead.
func (*ListAllAskReply) GetOrders ¶
func (x *ListAllAskReply) GetOrders() []*Order
func (*ListAllAskReply) ProtoMessage ¶
func (*ListAllAskReply) ProtoMessage()
func (*ListAllAskReply) ProtoReflect ¶
func (x *ListAllAskReply) ProtoReflect() protoreflect.Message
func (*ListAllAskReply) Reset ¶
func (x *ListAllAskReply) Reset()
func (*ListAllAskReply) String ¶
func (x *ListAllAskReply) String() string
type ListAllAsksRequest ¶
type ListAllAsksRequest struct { Symbol string `protobuf:"bytes,1,opt,name=Symbol,proto3" json:"Symbol,omitempty"` // contains filtered or unexported fields }
func (*ListAllAsksRequest) Descriptor
deprecated
func (*ListAllAsksRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAllAsksRequest.ProtoReflect.Descriptor instead.
func (*ListAllAsksRequest) GetSymbol ¶
func (x *ListAllAsksRequest) GetSymbol() string
func (*ListAllAsksRequest) ProtoMessage ¶
func (*ListAllAsksRequest) ProtoMessage()
func (*ListAllAsksRequest) ProtoReflect ¶
func (x *ListAllAsksRequest) ProtoReflect() protoreflect.Message
func (*ListAllAsksRequest) Reset ¶
func (x *ListAllAsksRequest) Reset()
func (*ListAllAsksRequest) String ¶
func (x *ListAllAsksRequest) String() string
type ListAllBidsReply ¶
type ListAllBidsReply struct { Orders []*Order `protobuf:"bytes,1,rep,name=Orders,proto3" json:"Orders,omitempty"` // contains filtered or unexported fields }
func (*ListAllBidsReply) Descriptor
deprecated
func (*ListAllBidsReply) Descriptor() ([]byte, []int)
Deprecated: Use ListAllBidsReply.ProtoReflect.Descriptor instead.
func (*ListAllBidsReply) GetOrders ¶
func (x *ListAllBidsReply) GetOrders() []*Order
func (*ListAllBidsReply) ProtoMessage ¶
func (*ListAllBidsReply) ProtoMessage()
func (*ListAllBidsReply) ProtoReflect ¶
func (x *ListAllBidsReply) ProtoReflect() protoreflect.Message
func (*ListAllBidsReply) Reset ¶
func (x *ListAllBidsReply) Reset()
func (*ListAllBidsReply) String ¶
func (x *ListAllBidsReply) String() string
type ListAllBidsRequest ¶
type ListAllBidsRequest struct { Symbol string `protobuf:"bytes,1,opt,name=Symbol,proto3" json:"Symbol,omitempty"` // contains filtered or unexported fields }
func (*ListAllBidsRequest) Descriptor
deprecated
func (*ListAllBidsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAllBidsRequest.ProtoReflect.Descriptor instead.
func (*ListAllBidsRequest) GetSymbol ¶
func (x *ListAllBidsRequest) GetSymbol() string
func (*ListAllBidsRequest) ProtoMessage ¶
func (*ListAllBidsRequest) ProtoMessage()
func (*ListAllBidsRequest) ProtoReflect ¶
func (x *ListAllBidsRequest) ProtoReflect() protoreflect.Message
func (*ListAllBidsRequest) Reset ¶
func (x *ListAllBidsRequest) Reset()
func (*ListAllBidsRequest) String ¶
func (x *ListAllBidsRequest) String() string
type Order ¶
type Order struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Kind OrderKind `protobuf:"varint,2,opt,name=Kind,proto3,enum=order.OrderKind" json:"Kind,omitempty"` Price *Price `protobuf:"bytes,3,opt,name=Price,proto3" json:"Price,omitempty"` StopPrice *Price `protobuf:"bytes,4,opt,name=StopPrice,proto3" json:"StopPrice,omitempty"` CreatedAtMilli int64 `protobuf:"varint,5,opt,name=CreatedAtMilli,proto3" json:"CreatedAtMilli,omitempty"` Quantity int64 `protobuf:"varint,6,opt,name=Quantity,proto3" json:"Quantity,omitempty"` FilledQuantity int64 `protobuf:"varint,7,opt,name=FilledQuantity,proto3" json:"FilledQuantity,omitempty"` Params OrderParams `protobuf:"varint,8,opt,name=Params,proto3,enum=order.OrderParams" json:"Params,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetCreatedAtMilli ¶
func (*Order) GetFilledQuantity ¶
func (*Order) GetParams ¶
func (x *Order) GetParams() OrderParams
func (*Order) GetQuantity ¶
func (*Order) GetStopPrice ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderKind ¶
type OrderKind int32
func (OrderKind) Descriptor ¶
func (OrderKind) Descriptor() protoreflect.EnumDescriptor
func (OrderKind) EnumDescriptor
deprecated
func (OrderKind) Number ¶
func (x OrderKind) Number() protoreflect.EnumNumber
func (OrderKind) Type ¶
func (OrderKind) Type() protoreflect.EnumType
type OrderMatchingServiceClient ¶
type OrderMatchingServiceClient interface { SubmitOrder(ctx context.Context, in *SubmitOrderRequest, opts ...grpc.CallOption) (*SubmitOrderReply, error) ListAllAsks(ctx context.Context, in *ListAllAsksRequest, opts ...grpc.CallOption) (*ListAllAskReply, error) ListAllBids(ctx context.Context, in *ListAllBidsRequest, opts ...grpc.CallOption) (*ListAllBidsReply, error) }
OrderMatchingServiceClient is the client API for OrderMatchingService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewOrderMatchingServiceClient ¶
func NewOrderMatchingServiceClient(cc grpc.ClientConnInterface) OrderMatchingServiceClient
type OrderMatchingServiceServer ¶
type OrderMatchingServiceServer interface { SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderReply, error) ListAllAsks(context.Context, *ListAllAsksRequest) (*ListAllAskReply, error) ListAllBids(context.Context, *ListAllBidsRequest) (*ListAllBidsReply, error) }
OrderMatchingServiceServer is the server API for OrderMatchingService service. All implementations should embed UnimplementedOrderMatchingServiceServer for forward compatibility
type OrderParams ¶
type OrderParams int32
const ( OrderParams_ORDER_PARAMS_UNKNOWN OrderParams = 0 OrderParams_ORDER_PARAMS_STOP OrderParams = 1 // stop order (has to have stop price set) OrderParams_ORDER_PARAMS_AON OrderParams = 2 // all-or-nothing - complete fill or cancel OrderParams_ORDER_PARAMS_IOC OrderParams = 3 // immediate-or-cancel - immediately fill what you can, cancel the rest OrderParams_ORDER_PARAMS_FOK OrderParams = 4 // immediately try to fill the whole order OrderParams_ORDER_PARAMS_GTC OrderParams = 5 // good-till-cancelled - keep order active until manually cancelled OrderParams_ORDER_PARAMS_GFD OrderParams = 6 // good-for-day keep order active until the end of the trading day OrderParams_ORDER_PARAMS_GTD OrderParams = 7 // good-till-date - keep order active until the provided date (including the date) )
func (OrderParams) Descriptor ¶
func (OrderParams) Descriptor() protoreflect.EnumDescriptor
func (OrderParams) Enum ¶
func (x OrderParams) Enum() *OrderParams
func (OrderParams) EnumDescriptor
deprecated
func (OrderParams) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderParams.Descriptor instead.
func (OrderParams) Number ¶
func (x OrderParams) Number() protoreflect.EnumNumber
func (OrderParams) String ¶
func (x OrderParams) String() string
func (OrderParams) Type ¶
func (OrderParams) Type() protoreflect.EnumType
type OrderSide ¶
type OrderSide int32
func (OrderSide) Descriptor ¶
func (OrderSide) Descriptor() protoreflect.EnumDescriptor
func (OrderSide) EnumDescriptor
deprecated
func (OrderSide) Number ¶
func (x OrderSide) Number() protoreflect.EnumNumber
func (OrderSide) Type ¶
func (OrderSide) Type() protoreflect.EnumType
type Price ¶
type Price struct { Coefficient int64 `protobuf:"varint,1,opt,name=Coefficient,proto3" json:"Coefficient,omitempty"` Exponent int32 `protobuf:"varint,2,opt,name=Exponent,proto3" json:"Exponent,omitempty"` // contains filtered or unexported fields }
func (*Price) Descriptor
deprecated
func (*Price) GetCoefficient ¶
func (*Price) GetExponent ¶
func (*Price) ProtoMessage ¶
func (*Price) ProtoMessage()
func (*Price) ProtoReflect ¶
func (x *Price) ProtoReflect() protoreflect.Message
type SubmitOrderReply ¶
type SubmitOrderReply struct { OrderID string `protobuf:"bytes,1,opt,name=OrderID,proto3" json:"OrderID,omitempty"` CreatedAtMilli int64 `protobuf:"varint,2,opt,name=CreatedAtMilli,proto3" json:"CreatedAtMilli,omitempty"` // contains filtered or unexported fields }
func (*SubmitOrderReply) Descriptor
deprecated
func (*SubmitOrderReply) Descriptor() ([]byte, []int)
Deprecated: Use SubmitOrderReply.ProtoReflect.Descriptor instead.
func (*SubmitOrderReply) GetCreatedAtMilli ¶
func (x *SubmitOrderReply) GetCreatedAtMilli() int64
func (*SubmitOrderReply) GetOrderID ¶
func (x *SubmitOrderReply) GetOrderID() string
func (*SubmitOrderReply) ProtoMessage ¶
func (*SubmitOrderReply) ProtoMessage()
func (*SubmitOrderReply) ProtoReflect ¶
func (x *SubmitOrderReply) ProtoReflect() protoreflect.Message
func (*SubmitOrderReply) Reset ¶
func (x *SubmitOrderReply) Reset()
func (*SubmitOrderReply) String ¶
func (x *SubmitOrderReply) String() string
type SubmitOrderRequest ¶
type SubmitOrderRequest struct { Symbol string `protobuf:"bytes,1,opt,name=Symbol,proto3" json:"Symbol,omitempty"` CustomerID string `protobuf:"bytes,2,opt,name=CustomerID,proto3" json:"CustomerID,omitempty"` Quantity int64 `protobuf:"varint,3,opt,name=Quantity,proto3" json:"Quantity,omitempty"` Price *Price `protobuf:"bytes,4,opt,name=Price,proto3" json:"Price,omitempty"` StopPrice *Price `protobuf:"bytes,5,opt,name=StopPrice,proto3" json:"StopPrice,omitempty"` Kind OrderKind `protobuf:"varint,6,opt,name=Kind,proto3,enum=order.OrderKind" json:"Kind,omitempty"` Side OrderSide `protobuf:"varint,7,opt,name=Side,proto3,enum=order.OrderSide" json:"Side,omitempty"` Params OrderParams `protobuf:"varint,8,opt,name=Params,proto3,enum=order.OrderParams" json:"Params,omitempty"` // contains filtered or unexported fields }
func (*SubmitOrderRequest) Descriptor
deprecated
func (*SubmitOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubmitOrderRequest.ProtoReflect.Descriptor instead.
func (*SubmitOrderRequest) GetCustomerID ¶
func (x *SubmitOrderRequest) GetCustomerID() string
func (*SubmitOrderRequest) GetKind ¶
func (x *SubmitOrderRequest) GetKind() OrderKind
func (*SubmitOrderRequest) GetParams ¶
func (x *SubmitOrderRequest) GetParams() OrderParams
func (*SubmitOrderRequest) GetPrice ¶
func (x *SubmitOrderRequest) GetPrice() *Price
func (*SubmitOrderRequest) GetQuantity ¶
func (x *SubmitOrderRequest) GetQuantity() int64
func (*SubmitOrderRequest) GetSide ¶
func (x *SubmitOrderRequest) GetSide() OrderSide
func (*SubmitOrderRequest) GetStopPrice ¶
func (x *SubmitOrderRequest) GetStopPrice() *Price
func (*SubmitOrderRequest) GetSymbol ¶
func (x *SubmitOrderRequest) GetSymbol() string
func (*SubmitOrderRequest) ProtoMessage ¶
func (*SubmitOrderRequest) ProtoMessage()
func (*SubmitOrderRequest) ProtoReflect ¶
func (x *SubmitOrderRequest) ProtoReflect() protoreflect.Message
func (*SubmitOrderRequest) Reset ¶
func (x *SubmitOrderRequest) Reset()
func (*SubmitOrderRequest) String ¶
func (x *SubmitOrderRequest) String() string
type UnimplementedOrderMatchingServiceServer ¶
type UnimplementedOrderMatchingServiceServer struct { }
UnimplementedOrderMatchingServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedOrderMatchingServiceServer) ListAllAsks ¶
func (UnimplementedOrderMatchingServiceServer) ListAllAsks(context.Context, *ListAllAsksRequest) (*ListAllAskReply, error)
func (UnimplementedOrderMatchingServiceServer) ListAllBids ¶
func (UnimplementedOrderMatchingServiceServer) ListAllBids(context.Context, *ListAllBidsRequest) (*ListAllBidsReply, error)
func (UnimplementedOrderMatchingServiceServer) SubmitOrder ¶
func (UnimplementedOrderMatchingServiceServer) SubmitOrder(context.Context, *SubmitOrderRequest) (*SubmitOrderReply, error)
type UnsafeOrderMatchingServiceServer ¶
type UnsafeOrderMatchingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOrderMatchingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderMatchingServiceServer will result in compilation errors.