proto

package
v0.0.0-...-59cd0a4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_marketdata_proto protoreflect.FileDescriptor
View Source
var MarketDataService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "marketdata.MarketDataService",
	HandlerType: (*MarketDataServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMarketData",
			Handler:    _MarketDataService_GetMarketData_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamMarketData",
			Handler:       _MarketDataService_StreamMarketData_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "marketdata.proto",
}

MarketDataService_ServiceDesc is the grpc.ServiceDesc for MarketDataService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMarketDataServiceServer

func RegisterMarketDataServiceServer(s grpc.ServiceRegistrar, srv MarketDataServiceServer)

Types

type AskUpdate

type AskUpdate struct {
	Symbol    string  `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	AskPrice  float64 `protobuf:"fixed64,2,opt,name=ask_price,json=askPrice,proto3" json:"ask_price,omitempty"`
	AskVolume int64   `protobuf:"varint,3,opt,name=ask_volume,json=askVolume,proto3" json:"ask_volume,omitempty"` // Volume for ask.
	Timestamp int64   `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Update for the ask price and ask volume.

func (*AskUpdate) Descriptor deprecated

func (*AskUpdate) Descriptor() ([]byte, []int)

Deprecated: Use AskUpdate.ProtoReflect.Descriptor instead.

func (*AskUpdate) GetAskPrice

func (x *AskUpdate) GetAskPrice() float64

func (*AskUpdate) GetAskVolume

func (x *AskUpdate) GetAskVolume() int64

func (*AskUpdate) GetSymbol

func (x *AskUpdate) GetSymbol() string

func (*AskUpdate) GetTimestamp

func (x *AskUpdate) GetTimestamp() int64

func (*AskUpdate) ProtoMessage

func (*AskUpdate) ProtoMessage()

func (*AskUpdate) ProtoReflect

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

func (*AskUpdate) Reset

func (x *AskUpdate) Reset()

func (*AskUpdate) String

func (x *AskUpdate) String() string

type BidUpdate

type BidUpdate struct {
	Symbol    string  `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	BidPrice  float64 `protobuf:"fixed64,2,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"`
	BidVolume int64   `protobuf:"varint,3,opt,name=bid_volume,json=bidVolume,proto3" json:"bid_volume,omitempty"` // Volume for bid.
	Timestamp int64   `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Update for the bid price and bid volume.

func (*BidUpdate) Descriptor deprecated

func (*BidUpdate) Descriptor() ([]byte, []int)

Deprecated: Use BidUpdate.ProtoReflect.Descriptor instead.

func (*BidUpdate) GetBidPrice

func (x *BidUpdate) GetBidPrice() float64

func (*BidUpdate) GetBidVolume

func (x *BidUpdate) GetBidVolume() int64

func (*BidUpdate) GetSymbol

func (x *BidUpdate) GetSymbol() string

func (*BidUpdate) GetTimestamp

func (x *BidUpdate) GetTimestamp() int64

func (*BidUpdate) ProtoMessage

func (*BidUpdate) ProtoMessage()

func (*BidUpdate) ProtoReflect

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

func (*BidUpdate) Reset

func (x *BidUpdate) Reset()

func (*BidUpdate) String

func (x *BidUpdate) String() string

type LastTradeUpdate

type LastTradeUpdate struct {
	Symbol          string  `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	LastTradedPrice float64 `protobuf:"fixed64,2,opt,name=last_traded_price,json=lastTradedPrice,proto3" json:"last_traded_price,omitempty"`
	Volume          int64   `protobuf:"varint,3,opt,name=volume,proto3" json:"volume,omitempty"` // Volume for this trade.
	Timestamp       int64   `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Update for the last traded price.

func (*LastTradeUpdate) Descriptor deprecated

func (*LastTradeUpdate) Descriptor() ([]byte, []int)

Deprecated: Use LastTradeUpdate.ProtoReflect.Descriptor instead.

func (*LastTradeUpdate) GetLastTradedPrice

func (x *LastTradeUpdate) GetLastTradedPrice() float64

func (*LastTradeUpdate) GetSymbol

func (x *LastTradeUpdate) GetSymbol() string

func (*LastTradeUpdate) GetTimestamp

func (x *LastTradeUpdate) GetTimestamp() int64

func (*LastTradeUpdate) GetVolume

func (x *LastTradeUpdate) GetVolume() int64

func (*LastTradeUpdate) ProtoMessage

func (*LastTradeUpdate) ProtoMessage()

func (*LastTradeUpdate) ProtoReflect

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

func (*LastTradeUpdate) Reset

func (x *LastTradeUpdate) Reset()

func (*LastTradeUpdate) String

func (x *LastTradeUpdate) String() string

type MarketData

type MarketData struct {
	Symbol          string  `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	BidPrice        float64 `protobuf:"fixed64,2,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"`
	AskPrice        float64 `protobuf:"fixed64,3,opt,name=ask_price,json=askPrice,proto3" json:"ask_price,omitempty"`
	LastTradedPrice float64 `protobuf:"fixed64,4,opt,name=last_traded_price,json=lastTradedPrice,proto3" json:"last_traded_price,omitempty"`
	OpenPrice       float64 `protobuf:"fixed64,5,opt,name=open_price,json=openPrice,proto3" json:"open_price,omitempty"`
	HighPrice       float64 `protobuf:"fixed64,6,opt,name=high_price,json=highPrice,proto3" json:"high_price,omitempty"`
	LowPrice        float64 `protobuf:"fixed64,7,opt,name=low_price,json=lowPrice,proto3" json:"low_price,omitempty"`
	ClosePrice      float64 `protobuf:"fixed64,8,opt,name=close_price,json=closePrice,proto3" json:"close_price,omitempty"`
	Volume          int64   `protobuf:"varint,9,opt,name=volume,proto3" json:"volume,omitempty"`
	Exchange        string  `protobuf:"bytes,10,opt,name=exchange,proto3" json:"exchange,omitempty"`
	Timestamp       int64   `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Message representing a full snapshot of market data.

func (*MarketData) Descriptor deprecated

func (*MarketData) Descriptor() ([]byte, []int)

Deprecated: Use MarketData.ProtoReflect.Descriptor instead.

func (*MarketData) GetAskPrice

func (x *MarketData) GetAskPrice() float64

func (*MarketData) GetBidPrice

func (x *MarketData) GetBidPrice() float64

func (*MarketData) GetClosePrice

func (x *MarketData) GetClosePrice() float64

func (*MarketData) GetExchange

func (x *MarketData) GetExchange() string

func (*MarketData) GetHighPrice

func (x *MarketData) GetHighPrice() float64

func (*MarketData) GetLastTradedPrice

func (x *MarketData) GetLastTradedPrice() float64

func (*MarketData) GetLowPrice

func (x *MarketData) GetLowPrice() float64

func (*MarketData) GetOpenPrice

func (x *MarketData) GetOpenPrice() float64

func (*MarketData) GetSymbol

func (x *MarketData) GetSymbol() string

func (*MarketData) GetTimestamp

func (x *MarketData) GetTimestamp() int64

func (*MarketData) GetVolume

func (x *MarketData) GetVolume() int64

func (*MarketData) ProtoMessage

func (*MarketData) ProtoMessage()

func (*MarketData) ProtoReflect

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

func (*MarketData) Reset

func (x *MarketData) Reset()

func (*MarketData) String

func (x *MarketData) String() string

type MarketDataRequest

type MarketDataRequest struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` // The ticker symbol to request data for.
	// contains filtered or unexported fields
}

Message representing a request for market data for a specific symbol.

func (*MarketDataRequest) Descriptor deprecated

func (*MarketDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use MarketDataRequest.ProtoReflect.Descriptor instead.

func (*MarketDataRequest) GetSymbol

func (x *MarketDataRequest) GetSymbol() string

func (*MarketDataRequest) ProtoMessage

func (*MarketDataRequest) ProtoMessage()

func (*MarketDataRequest) ProtoReflect

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

func (*MarketDataRequest) Reset

func (x *MarketDataRequest) Reset()

func (*MarketDataRequest) String

func (x *MarketDataRequest) String() string

type MarketDataResponse

type MarketDataResponse struct {
	Data *MarketData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Market data for the requested symbol.
	// contains filtered or unexported fields
}

Message representing a response to a market data request.

func (*MarketDataResponse) Descriptor deprecated

func (*MarketDataResponse) Descriptor() ([]byte, []int)

Deprecated: Use MarketDataResponse.ProtoReflect.Descriptor instead.

func (*MarketDataResponse) GetData

func (x *MarketDataResponse) GetData() *MarketData

func (*MarketDataResponse) ProtoMessage

func (*MarketDataResponse) ProtoMessage()

func (*MarketDataResponse) ProtoReflect

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

func (*MarketDataResponse) Reset

func (x *MarketDataResponse) Reset()

func (*MarketDataResponse) String

func (x *MarketDataResponse) String() string

type MarketDataServiceClient

type MarketDataServiceClient interface {
	// Unary RPC method for getting a single snapshot of market data.
	GetMarketData(ctx context.Context, in *MarketDataRequest, opts ...grpc.CallOption) (*MarketDataResponse, error)
	// Server-streaming RPC method for pushing market data updates.
	StreamMarketData(ctx context.Context, in *MarketDataRequest, opts ...grpc.CallOption) (MarketDataService_StreamMarketDataClient, error)
}

MarketDataServiceClient is the client API for MarketDataService 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 MarketDataServiceServer

type MarketDataServiceServer interface {
	// Unary RPC method for getting a single snapshot of market data.
	GetMarketData(context.Context, *MarketDataRequest) (*MarketDataResponse, error)
	// Server-streaming RPC method for pushing market data updates.
	StreamMarketData(*MarketDataRequest, MarketDataService_StreamMarketDataServer) error
	// contains filtered or unexported methods
}

MarketDataServiceServer is the server API for MarketDataService service. All implementations must embed UnimplementedMarketDataServiceServer for forward compatibility

type MarketDataService_StreamMarketDataClient

type MarketDataService_StreamMarketDataClient interface {
	Recv() (*MarketDataUpdate, error)
	grpc.ClientStream
}

type MarketDataService_StreamMarketDataServer

type MarketDataService_StreamMarketDataServer interface {
	Send(*MarketDataUpdate) error
	grpc.ServerStream
}

type MarketDataUpdate

type MarketDataUpdate struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// Types that are assignable to Update:
	//	*MarketDataUpdate_BidUpdate
	//	*MarketDataUpdate_AskUpdate
	//	*MarketDataUpdate_LastTradeUpdate
	//	*MarketDataUpdate_VolumeUpdate
	Update isMarketDataUpdate_Update `protobuf_oneof:"update"`
	// contains filtered or unexported fields
}

Unified update message that can contain any of the specific updates.

func (*MarketDataUpdate) Descriptor deprecated

func (*MarketDataUpdate) Descriptor() ([]byte, []int)

Deprecated: Use MarketDataUpdate.ProtoReflect.Descriptor instead.

func (*MarketDataUpdate) GetAskUpdate

func (x *MarketDataUpdate) GetAskUpdate() *AskUpdate

func (*MarketDataUpdate) GetBidUpdate

func (x *MarketDataUpdate) GetBidUpdate() *BidUpdate

func (*MarketDataUpdate) GetLastTradeUpdate

func (x *MarketDataUpdate) GetLastTradeUpdate() *LastTradeUpdate

func (*MarketDataUpdate) GetSymbol

func (x *MarketDataUpdate) GetSymbol() string

func (*MarketDataUpdate) GetUpdate

func (m *MarketDataUpdate) GetUpdate() isMarketDataUpdate_Update

func (*MarketDataUpdate) GetVolumeUpdate

func (x *MarketDataUpdate) GetVolumeUpdate() *VolumeUpdate

func (*MarketDataUpdate) ProtoMessage

func (*MarketDataUpdate) ProtoMessage()

func (*MarketDataUpdate) ProtoReflect

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

func (*MarketDataUpdate) Reset

func (x *MarketDataUpdate) Reset()

func (*MarketDataUpdate) String

func (x *MarketDataUpdate) String() string

type MarketDataUpdate_AskUpdate

type MarketDataUpdate_AskUpdate struct {
	AskUpdate *AskUpdate `protobuf:"bytes,3,opt,name=ask_update,json=askUpdate,proto3,oneof"`
}

type MarketDataUpdate_BidUpdate

type MarketDataUpdate_BidUpdate struct {
	BidUpdate *BidUpdate `protobuf:"bytes,2,opt,name=bid_update,json=bidUpdate,proto3,oneof"`
}

type MarketDataUpdate_LastTradeUpdate

type MarketDataUpdate_LastTradeUpdate struct {
	LastTradeUpdate *LastTradeUpdate `protobuf:"bytes,4,opt,name=last_trade_update,json=lastTradeUpdate,proto3,oneof"`
}

type MarketDataUpdate_VolumeUpdate

type MarketDataUpdate_VolumeUpdate struct {
	VolumeUpdate *VolumeUpdate `protobuf:"bytes,5,opt,name=volume_update,json=volumeUpdate,proto3,oneof"`
}

type UnimplementedMarketDataServiceServer

type UnimplementedMarketDataServiceServer struct {
}

UnimplementedMarketDataServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMarketDataServiceServer) GetMarketData

func (UnimplementedMarketDataServiceServer) StreamMarketData

type UnsafeMarketDataServiceServer

type UnsafeMarketDataServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeMarketDataServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MarketDataServiceServer will result in compilation errors.

type VolumeUpdate

type VolumeUpdate struct {
	Symbol    string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Volume    int64  `protobuf:"varint,2,opt,name=volume,proto3" json:"volume,omitempty"` // Total volume for the trading day.
	Timestamp int64  `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Update for the overall trading volume.

func (*VolumeUpdate) Descriptor deprecated

func (*VolumeUpdate) Descriptor() ([]byte, []int)

Deprecated: Use VolumeUpdate.ProtoReflect.Descriptor instead.

func (*VolumeUpdate) GetSymbol

func (x *VolumeUpdate) GetSymbol() string

func (*VolumeUpdate) GetTimestamp

func (x *VolumeUpdate) GetTimestamp() int64

func (*VolumeUpdate) GetVolume

func (x *VolumeUpdate) GetVolume() int64

func (*VolumeUpdate) ProtoMessage

func (*VolumeUpdate) ProtoMessage()

func (*VolumeUpdate) ProtoReflect

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

func (*VolumeUpdate) Reset

func (x *VolumeUpdate) Reset()

func (*VolumeUpdate) String

func (x *VolumeUpdate) String() string

Jump to

Keyboard shortcuts

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