order

package
v0.0.0-...-848a935 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
var File_order_order_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetCreatedAtMilli

func (x *Order) GetCreatedAtMilli() int64

func (*Order) GetFilledQuantity

func (x *Order) GetFilledQuantity() int64

func (*Order) GetID

func (x *Order) GetID() string

func (*Order) GetKind

func (x *Order) GetKind() OrderKind

func (*Order) GetParams

func (x *Order) GetParams() OrderParams

func (*Order) GetPrice

func (x *Order) GetPrice() *Price

func (*Order) GetQuantity

func (x *Order) GetQuantity() int64

func (*Order) GetStopPrice

func (x *Order) GetStopPrice() *Price

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect

func (x *Order) ProtoReflect() protoreflect.Message

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

type OrderKind

type OrderKind int32
const (
	OrderKind_ORDER_KIND_UNKNOWN OrderKind = 0
	OrderKind_ORDER_KIND_MARKET  OrderKind = 1
	OrderKind_ORDER_KIND_LIMIT   OrderKind = 2
)

func (OrderKind) Descriptor

func (OrderKind) Descriptor() protoreflect.EnumDescriptor

func (OrderKind) Enum

func (x OrderKind) Enum() *OrderKind

func (OrderKind) EnumDescriptor deprecated

func (OrderKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use OrderKind.Descriptor instead.

func (OrderKind) Number

func (x OrderKind) Number() protoreflect.EnumNumber

func (OrderKind) String

func (x OrderKind) String() string

func (OrderKind) Type

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.

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) 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

type OrderSide

type OrderSide int32
const (
	OrderSide_ORDER_SIDE_UNKNOWN OrderSide = 0
	OrderSide_ORDER_SIDE_BUY     OrderSide = 1
	OrderSide_ORDER_SIDE_SELL    OrderSide = 2
)

func (OrderSide) Descriptor

func (OrderSide) Descriptor() protoreflect.EnumDescriptor

func (OrderSide) Enum

func (x OrderSide) Enum() *OrderSide

func (OrderSide) EnumDescriptor deprecated

func (OrderSide) EnumDescriptor() ([]byte, []int)

Deprecated: Use OrderSide.Descriptor instead.

func (OrderSide) Number

func (x OrderSide) Number() protoreflect.EnumNumber

func (OrderSide) String

func (x OrderSide) String() string

func (OrderSide) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Price.ProtoReflect.Descriptor instead.

func (*Price) GetCoefficient

func (x *Price) GetCoefficient() int64

func (*Price) GetExponent

func (x *Price) GetExponent() int32

func (*Price) ProtoMessage

func (*Price) ProtoMessage()

func (*Price) ProtoReflect

func (x *Price) ProtoReflect() protoreflect.Message

func (*Price) Reset

func (x *Price) Reset()

func (*Price) String

func (x *Price) String() string

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) ListAllBids

func (UnimplementedOrderMatchingServiceServer) SubmitOrder

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL