pb

package
v0.0.0-...-9243632 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Marketdata_GetAsset_FullMethodName               = "/foreverbull.finance.Marketdata/GetAsset"
	Marketdata_GetIndex_FullMethodName               = "/foreverbull.finance.Marketdata/GetIndex"
	Marketdata_DownloadHistoricalData_FullMethodName = "/foreverbull.finance.Marketdata/DownloadHistoricalData"
)
View Source
const (
	Trading_GetPortfolio_FullMethodName = "/foreverbull.finance.Trading/GetPortfolio"
	Trading_GetOrders_FullMethodName    = "/foreverbull.finance.Trading/GetOrders"
	Trading_PlaceOrder_FullMethodName   = "/foreverbull.finance.Trading/PlaceOrder"
)

Variables

View Source
var File_foreverbull_finance_finance_proto protoreflect.FileDescriptor
View Source
var File_foreverbull_finance_marketdata_service_proto protoreflect.FileDescriptor
View Source
var File_foreverbull_finance_trading_service_proto protoreflect.FileDescriptor
View Source
var Marketdata_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "foreverbull.finance.Marketdata",
	HandlerType: (*MarketdataServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAsset",
			Handler:    _Marketdata_GetAsset_Handler,
		},
		{
			MethodName: "GetIndex",
			Handler:    _Marketdata_GetIndex_Handler,
		},
		{
			MethodName: "DownloadHistoricalData",
			Handler:    _Marketdata_DownloadHistoricalData_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "foreverbull/finance/marketdata_service.proto",
}

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

View Source
var Trading_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "foreverbull.finance.Trading",
	HandlerType: (*TradingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPortfolio",
			Handler:    _Trading_GetPortfolio_Handler,
		},
		{
			MethodName: "GetOrders",
			Handler:    _Trading_GetOrders_Handler,
		},
		{
			MethodName: "PlaceOrder",
			Handler:    _Trading_PlaceOrder_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "foreverbull/finance/trading_service.proto",
}

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

Functions

func RegisterMarketdataServer

func RegisterMarketdataServer(s grpc.ServiceRegistrar, srv MarketdataServer)

func RegisterTradingServer

func RegisterTradingServer(s grpc.ServiceRegistrar, srv TradingServer)

Types

type Asset

type Asset struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Asset) Descriptor deprecated

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

Deprecated: Use Asset.ProtoReflect.Descriptor instead.

func (*Asset) GetName

func (x *Asset) GetName() string

func (*Asset) GetSymbol

func (x *Asset) GetSymbol() string

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) ProtoReflect

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

func (*Asset) Reset

func (x *Asset) Reset()

func (*Asset) String

func (x *Asset) String() string

type DownloadHistoricalDataRequest

type DownloadHistoricalDataRequest struct {
	Symbols   []string `protobuf:"bytes,1,rep,name=symbols,proto3" json:"symbols,omitempty"`
	StartDate *pb.Date `protobuf:"bytes,2,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	EndDate   *pb.Date `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
	// contains filtered or unexported fields
}

func (*DownloadHistoricalDataRequest) Descriptor deprecated

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

Deprecated: Use DownloadHistoricalDataRequest.ProtoReflect.Descriptor instead.

func (*DownloadHistoricalDataRequest) GetEndDate

func (x *DownloadHistoricalDataRequest) GetEndDate() *pb.Date

func (*DownloadHistoricalDataRequest) GetStartDate

func (x *DownloadHistoricalDataRequest) GetStartDate() *pb.Date

func (*DownloadHistoricalDataRequest) GetSymbols

func (x *DownloadHistoricalDataRequest) GetSymbols() []string

func (*DownloadHistoricalDataRequest) ProtoMessage

func (*DownloadHistoricalDataRequest) ProtoMessage()

func (*DownloadHistoricalDataRequest) ProtoReflect

func (*DownloadHistoricalDataRequest) Reset

func (x *DownloadHistoricalDataRequest) Reset()

func (*DownloadHistoricalDataRequest) String

type DownloadHistoricalDataResponse

type DownloadHistoricalDataResponse struct {
	// contains filtered or unexported fields
}

func (*DownloadHistoricalDataResponse) Descriptor deprecated

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

Deprecated: Use DownloadHistoricalDataResponse.ProtoReflect.Descriptor instead.

func (*DownloadHistoricalDataResponse) ProtoMessage

func (*DownloadHistoricalDataResponse) ProtoMessage()

func (*DownloadHistoricalDataResponse) ProtoReflect

func (*DownloadHistoricalDataResponse) Reset

func (x *DownloadHistoricalDataResponse) Reset()

func (*DownloadHistoricalDataResponse) String

type GetAssetRequest

type GetAssetRequest struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAssetRequest) Descriptor deprecated

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

Deprecated: Use GetAssetRequest.ProtoReflect.Descriptor instead.

func (*GetAssetRequest) GetSymbol

func (x *GetAssetRequest) GetSymbol() string

func (*GetAssetRequest) ProtoMessage

func (*GetAssetRequest) ProtoMessage()

func (*GetAssetRequest) ProtoReflect

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

func (*GetAssetRequest) Reset

func (x *GetAssetRequest) Reset()

func (*GetAssetRequest) String

func (x *GetAssetRequest) String() string

type GetAssetResponse

type GetAssetResponse struct {
	Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAssetResponse) Descriptor deprecated

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

Deprecated: Use GetAssetResponse.ProtoReflect.Descriptor instead.

func (*GetAssetResponse) GetAsset

func (x *GetAssetResponse) GetAsset() *Asset

func (*GetAssetResponse) ProtoMessage

func (*GetAssetResponse) ProtoMessage()

func (*GetAssetResponse) ProtoReflect

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

func (*GetAssetResponse) Reset

func (x *GetAssetResponse) Reset()

func (*GetAssetResponse) String

func (x *GetAssetResponse) String() string

type GetIndexRequest

type GetIndexRequest struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*GetIndexRequest) Descriptor deprecated

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

Deprecated: Use GetIndexRequest.ProtoReflect.Descriptor instead.

func (*GetIndexRequest) GetSymbol

func (x *GetIndexRequest) GetSymbol() string

func (*GetIndexRequest) ProtoMessage

func (*GetIndexRequest) ProtoMessage()

func (*GetIndexRequest) ProtoReflect

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

func (*GetIndexRequest) Reset

func (x *GetIndexRequest) Reset()

func (*GetIndexRequest) String

func (x *GetIndexRequest) String() string

type GetIndexResponse

type GetIndexResponse struct {
	Assets []*Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
	// contains filtered or unexported fields
}

func (*GetIndexResponse) Descriptor deprecated

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

Deprecated: Use GetIndexResponse.ProtoReflect.Descriptor instead.

func (*GetIndexResponse) GetAssets

func (x *GetIndexResponse) GetAssets() []*Asset

func (*GetIndexResponse) ProtoMessage

func (*GetIndexResponse) ProtoMessage()

func (*GetIndexResponse) ProtoReflect

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

func (*GetIndexResponse) Reset

func (x *GetIndexResponse) Reset()

func (*GetIndexResponse) String

func (x *GetIndexResponse) String() string

type GetOrdersRequest

type GetOrdersRequest struct {
	// contains filtered or unexported fields
}

func (*GetOrdersRequest) Descriptor deprecated

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

Deprecated: Use GetOrdersRequest.ProtoReflect.Descriptor instead.

func (*GetOrdersRequest) ProtoMessage

func (*GetOrdersRequest) ProtoMessage()

func (*GetOrdersRequest) ProtoReflect

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

func (*GetOrdersRequest) Reset

func (x *GetOrdersRequest) Reset()

func (*GetOrdersRequest) String

func (x *GetOrdersRequest) String() string

type GetOrdersResponse

type GetOrdersResponse struct {
	Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"`
	// contains filtered or unexported fields
}

func (*GetOrdersResponse) Descriptor deprecated

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

Deprecated: Use GetOrdersResponse.ProtoReflect.Descriptor instead.

func (*GetOrdersResponse) GetOrders

func (x *GetOrdersResponse) GetOrders() []*Order

func (*GetOrdersResponse) ProtoMessage

func (*GetOrdersResponse) ProtoMessage()

func (*GetOrdersResponse) ProtoReflect

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

func (*GetOrdersResponse) Reset

func (x *GetOrdersResponse) Reset()

func (*GetOrdersResponse) String

func (x *GetOrdersResponse) String() string

type GetPortfolioRequest

type GetPortfolioRequest struct {
	// contains filtered or unexported fields
}

func (*GetPortfolioRequest) Descriptor deprecated

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

Deprecated: Use GetPortfolioRequest.ProtoReflect.Descriptor instead.

func (*GetPortfolioRequest) ProtoMessage

func (*GetPortfolioRequest) ProtoMessage()

func (*GetPortfolioRequest) ProtoReflect

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

func (*GetPortfolioRequest) Reset

func (x *GetPortfolioRequest) Reset()

func (*GetPortfolioRequest) String

func (x *GetPortfolioRequest) String() string

type GetPortfolioResponse

type GetPortfolioResponse struct {
	Portfolio *Portfolio `protobuf:"bytes,1,opt,name=portfolio,proto3" json:"portfolio,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPortfolioResponse) Descriptor deprecated

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

Deprecated: Use GetPortfolioResponse.ProtoReflect.Descriptor instead.

func (*GetPortfolioResponse) GetPortfolio

func (x *GetPortfolioResponse) GetPortfolio() *Portfolio

func (*GetPortfolioResponse) ProtoMessage

func (*GetPortfolioResponse) ProtoMessage()

func (*GetPortfolioResponse) ProtoReflect

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

func (*GetPortfolioResponse) Reset

func (x *GetPortfolioResponse) Reset()

func (*GetPortfolioResponse) String

func (x *GetPortfolioResponse) String() string

type MarketdataClient

type MarketdataClient interface {
	GetAsset(ctx context.Context, in *GetAssetRequest, opts ...grpc.CallOption) (*GetAssetResponse, error)
	GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*GetIndexResponse, error)
	DownloadHistoricalData(ctx context.Context, in *DownloadHistoricalDataRequest, opts ...grpc.CallOption) (*DownloadHistoricalDataResponse, error)
}

MarketdataClient is the client API for Marketdata 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 NewMarketdataClient

func NewMarketdataClient(cc grpc.ClientConnInterface) MarketdataClient

type MarketdataServer

type MarketdataServer interface {
	GetAsset(context.Context, *GetAssetRequest) (*GetAssetResponse, error)
	GetIndex(context.Context, *GetIndexRequest) (*GetIndexResponse, error)
	DownloadHistoricalData(context.Context, *DownloadHistoricalDataRequest) (*DownloadHistoricalDataResponse, error)
	// contains filtered or unexported methods
}

MarketdataServer is the server API for Marketdata service. All implementations must embed UnimplementedMarketdataServer for forward compatibility.

type MockMarketdataClient

type MockMarketdataClient struct {
	mock.Mock
}

MockMarketdataClient is an autogenerated mock type for the MarketdataClient type

func NewMockMarketdataClient

func NewMockMarketdataClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMarketdataClient

NewMockMarketdataClient creates a new instance of MockMarketdataClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMarketdataClient) DownloadHistoricalData

DownloadHistoricalData provides a mock function with given fields: ctx, in, opts

func (*MockMarketdataClient) GetAsset

GetAsset provides a mock function with given fields: ctx, in, opts

func (*MockMarketdataClient) GetIndex

GetIndex provides a mock function with given fields: ctx, in, opts

type MockMarketdataServer

type MockMarketdataServer struct {
	mock.Mock
}

MockMarketdataServer is an autogenerated mock type for the MarketdataServer type

func NewMockMarketdataServer

func NewMockMarketdataServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMarketdataServer

NewMockMarketdataServer creates a new instance of MockMarketdataServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMarketdataServer) DownloadHistoricalData

DownloadHistoricalData provides a mock function with given fields: _a0, _a1

func (*MockMarketdataServer) GetAsset

GetAsset provides a mock function with given fields: _a0, _a1

func (*MockMarketdataServer) GetIndex

GetIndex provides a mock function with given fields: _a0, _a1

type MockTradingClient

type MockTradingClient struct {
	mock.Mock
}

MockTradingClient is an autogenerated mock type for the TradingClient type

func NewMockTradingClient

func NewMockTradingClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTradingClient

NewMockTradingClient creates a new instance of MockTradingClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTradingClient) GetOrders

GetOrders provides a mock function with given fields: ctx, in, opts

func (*MockTradingClient) GetPortfolio

GetPortfolio provides a mock function with given fields: ctx, in, opts

func (*MockTradingClient) PlaceOrder

PlaceOrder provides a mock function with given fields: ctx, in, opts

type MockTradingServer

type MockTradingServer struct {
	mock.Mock
}

MockTradingServer is an autogenerated mock type for the TradingServer type

func NewMockTradingServer

func NewMockTradingServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTradingServer

NewMockTradingServer creates a new instance of MockTradingServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTradingServer) GetOrders

GetOrders provides a mock function with given fields: _a0, _a1

func (*MockTradingServer) GetPortfolio

GetPortfolio provides a mock function with given fields: _a0, _a1

func (*MockTradingServer) PlaceOrder

PlaceOrder provides a mock function with given fields: _a0, _a1

type MockUnsafeMarketdataServer

type MockUnsafeMarketdataServer struct {
	mock.Mock
}

MockUnsafeMarketdataServer is an autogenerated mock type for the UnsafeMarketdataServer type

func NewMockUnsafeMarketdataServer

func NewMockUnsafeMarketdataServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUnsafeMarketdataServer

NewMockUnsafeMarketdataServer creates a new instance of MockUnsafeMarketdataServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

type MockUnsafeTradingServer

type MockUnsafeTradingServer struct {
	mock.Mock
}

MockUnsafeTradingServer is an autogenerated mock type for the UnsafeTradingServer type

func NewMockUnsafeTradingServer

func NewMockUnsafeTradingServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUnsafeTradingServer

NewMockUnsafeTradingServer creates a new instance of MockUnsafeTradingServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

type OHLC

type OHLC struct {
	Symbol    string                 `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Open      float64                `protobuf:"fixed64,3,opt,name=open,proto3" json:"open,omitempty"`
	High      float64                `protobuf:"fixed64,4,opt,name=high,proto3" json:"high,omitempty"`
	Low       float64                `protobuf:"fixed64,5,opt,name=low,proto3" json:"low,omitempty"`
	Close     float64                `protobuf:"fixed64,6,opt,name=close,proto3" json:"close,omitempty"`
	Volume    uint64                 `protobuf:"varint,7,opt,name=volume,proto3" json:"volume,omitempty"`
	// contains filtered or unexported fields
}

func (*OHLC) Descriptor deprecated

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

Deprecated: Use OHLC.ProtoReflect.Descriptor instead.

func (*OHLC) GetClose

func (x *OHLC) GetClose() float64

func (*OHLC) GetHigh

func (x *OHLC) GetHigh() float64

func (*OHLC) GetLow

func (x *OHLC) GetLow() float64

func (*OHLC) GetOpen

func (x *OHLC) GetOpen() float64

func (*OHLC) GetSymbol

func (x *OHLC) GetSymbol() string

func (*OHLC) GetTimestamp

func (x *OHLC) GetTimestamp() *timestamppb.Timestamp

func (*OHLC) GetVolume

func (x *OHLC) GetVolume() uint64

func (*OHLC) ProtoMessage

func (*OHLC) ProtoMessage()

func (*OHLC) ProtoReflect

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

func (*OHLC) Reset

func (x *OHLC) Reset()

func (*OHLC) String

func (x *OHLC) String() string

type Order

type Order struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Amount int32  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*Order) Descriptor deprecated

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

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetAmount

func (x *Order) GetAmount() int32

func (*Order) GetSymbol

func (x *Order) GetSymbol() string

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 PlaceOrderRequest

type PlaceOrderRequest struct {
	Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
	// contains filtered or unexported fields
}

func (*PlaceOrderRequest) Descriptor deprecated

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

Deprecated: Use PlaceOrderRequest.ProtoReflect.Descriptor instead.

func (*PlaceOrderRequest) GetOrder

func (x *PlaceOrderRequest) GetOrder() *Order

func (*PlaceOrderRequest) ProtoMessage

func (*PlaceOrderRequest) ProtoMessage()

func (*PlaceOrderRequest) ProtoReflect

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

func (*PlaceOrderRequest) Reset

func (x *PlaceOrderRequest) Reset()

func (*PlaceOrderRequest) String

func (x *PlaceOrderRequest) String() string

type PlaceOrderResponse

type PlaceOrderResponse struct {
	// contains filtered or unexported fields
}

func (*PlaceOrderResponse) Descriptor deprecated

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

Deprecated: Use PlaceOrderResponse.ProtoReflect.Descriptor instead.

func (*PlaceOrderResponse) ProtoMessage

func (*PlaceOrderResponse) ProtoMessage()

func (*PlaceOrderResponse) ProtoReflect

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

func (*PlaceOrderResponse) Reset

func (x *PlaceOrderResponse) Reset()

func (*PlaceOrderResponse) String

func (x *PlaceOrderResponse) String() string

type Portfolio

type Portfolio struct {
	Timestamp         *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	CashFlow          float64                `protobuf:"fixed64,2,opt,name=cash_flow,json=cashFlow,proto3" json:"cash_flow,omitempty"`
	StartingCash      float64                `protobuf:"fixed64,3,opt,name=starting_cash,json=startingCash,proto3" json:"starting_cash,omitempty"`
	PortfolioValue    float64                `protobuf:"fixed64,4,opt,name=portfolio_value,json=portfolioValue,proto3" json:"portfolio_value,omitempty"`
	Pnl               float64                `protobuf:"fixed64,5,opt,name=pnl,proto3" json:"pnl,omitempty"`
	Returns           float64                `protobuf:"fixed64,6,opt,name=returns,proto3" json:"returns,omitempty"`
	Cash              float64                `protobuf:"fixed64,7,opt,name=cash,proto3" json:"cash,omitempty"`
	PositionsValue    float64                `protobuf:"fixed64,8,opt,name=positions_value,json=positionsValue,proto3" json:"positions_value,omitempty"`
	PositionsExposure float64                `protobuf:"fixed64,9,opt,name=positions_exposure,json=positionsExposure,proto3" json:"positions_exposure,omitempty"`
	Positions         []*Position            `protobuf:"bytes,10,rep,name=positions,proto3" json:"positions,omitempty"`
	// contains filtered or unexported fields
}

func (*Portfolio) Descriptor deprecated

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

Deprecated: Use Portfolio.ProtoReflect.Descriptor instead.

func (*Portfolio) GetCash

func (x *Portfolio) GetCash() float64

func (*Portfolio) GetCashFlow

func (x *Portfolio) GetCashFlow() float64

func (*Portfolio) GetPnl

func (x *Portfolio) GetPnl() float64

func (*Portfolio) GetPortfolioValue

func (x *Portfolio) GetPortfolioValue() float64

func (*Portfolio) GetPositions

func (x *Portfolio) GetPositions() []*Position

func (*Portfolio) GetPositionsExposure

func (x *Portfolio) GetPositionsExposure() float64

func (*Portfolio) GetPositionsValue

func (x *Portfolio) GetPositionsValue() float64

func (*Portfolio) GetReturns

func (x *Portfolio) GetReturns() float64

func (*Portfolio) GetStartingCash

func (x *Portfolio) GetStartingCash() float64

func (*Portfolio) GetTimestamp

func (x *Portfolio) GetTimestamp() *timestamppb.Timestamp

func (*Portfolio) ProtoMessage

func (*Portfolio) ProtoMessage()

func (*Portfolio) ProtoReflect

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

func (*Portfolio) Reset

func (x *Portfolio) Reset()

func (*Portfolio) String

func (x *Portfolio) String() string

type Position

type Position struct {
	Symbol        string                 `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Amount        int32                  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	CostBasis     float64                `protobuf:"fixed64,3,opt,name=cost_basis,json=costBasis,proto3" json:"cost_basis,omitempty"`
	LastSalePrice float64                `protobuf:"fixed64,4,opt,name=last_sale_price,json=lastSalePrice,proto3" json:"last_sale_price,omitempty"`
	LastSaleDate  *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_sale_date,json=lastSaleDate,proto3" json:"last_sale_date,omitempty"`
	// contains filtered or unexported fields
}

func (*Position) Descriptor deprecated

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

Deprecated: Use Position.ProtoReflect.Descriptor instead.

func (*Position) GetAmount

func (x *Position) GetAmount() int32

func (*Position) GetCostBasis

func (x *Position) GetCostBasis() float64

func (*Position) GetLastSaleDate

func (x *Position) GetLastSaleDate() *timestamppb.Timestamp

func (*Position) GetLastSalePrice

func (x *Position) GetLastSalePrice() float64

func (*Position) GetSymbol

func (x *Position) GetSymbol() string

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) ProtoReflect

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

func (*Position) Reset

func (x *Position) Reset()

func (*Position) String

func (x *Position) String() string

type TradingClient

type TradingClient interface {
	GetPortfolio(ctx context.Context, in *GetPortfolioRequest, opts ...grpc.CallOption) (*GetPortfolioResponse, error)
	GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error)
	PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error)
}

TradingClient is the client API for Trading 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 NewTradingClient

func NewTradingClient(cc grpc.ClientConnInterface) TradingClient

type TradingServer

type TradingServer interface {
	GetPortfolio(context.Context, *GetPortfolioRequest) (*GetPortfolioResponse, error)
	GetOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error)
	PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error)
	// contains filtered or unexported methods
}

TradingServer is the server API for Trading service. All implementations must embed UnimplementedTradingServer for forward compatibility.

type UnimplementedMarketdataServer

type UnimplementedMarketdataServer struct{}

UnimplementedMarketdataServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedMarketdataServer) GetAsset

func (UnimplementedMarketdataServer) GetIndex

type UnimplementedTradingServer

type UnimplementedTradingServer struct{}

UnimplementedTradingServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTradingServer) GetOrders

func (UnimplementedTradingServer) GetPortfolio

func (UnimplementedTradingServer) PlaceOrder

type UnsafeMarketdataServer

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

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

type UnsafeTradingServer

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

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

Jump to

Keyboard shortcuts

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